Hey guys (and girls maybe, why not?), this is the second post dedicated to my project management system. After the quick overview I will dive deeper in the project structure aaaand I will also upload a video demonstrating Tasks' core functionalities.
1. Project files and folders
Folder structure is represented on the printscreen below and shows all main folders:
lib is the folder that contains most of the functional code, in fact this is the core of the app. As seen from __init__.py, the folder is initialized as a library/package with a couple of modules. The next folder is static which holds a couple of subfolders:- cke - contains the files for CKEditor, a rich text editor implemented in the system;
- css - stores all Bootstrap 5.0 CSS files;
- dpicker - stores the files for the datetime picker based on jquery, also implemented successfully in the system;
- js - stores all Bootstrap 5.0 JavaScript files;
The last folder is templates and its function is to keep all html files needed for the frontend, i.e. the part visible for the user. The entire thing is imported in dev.py and you need to run this file in order to launch the app. I had to rework data models a couple of times during project development so I wrote a short script removing/creating all data models (data model == table in a database, roughly explained) - db_reset.py.
2. Library modules
Each .py file in the lib folder is in fact a module, so here is what each module does:
- config.py - this is containing a single class containing database configuration settings - URI and a secret key;
- forms.py - this is containing classes defining forms for user registration/login/profile update; these classes inherit FlaskForm and are used in the user routing;
- models.py - here are 7 classes defining separate data model each;
- routing files - project/resource/task/user_routing.py; here are the routes for each segment of the app;
3. Database and models
For this project I am using sqlite as it is somewhat autonomous (i.e. the entire db is in a single file) which is excellent for training projects. However, if aiming for larger projects with big databases it is good to consider PostgreSQL/MySQL, SQLAlchemy allows for relatively easy transition to these RDBMS. I am using SQLiteStudio to visualize/edit the db, very useful free software that does not need installation. Here are the models used in the project:
- project - contains the information for the project (name, description, status, etc.)
- project_assignment - each project can have multiple teammates assigned to it, so this table contains data for each assignment;
- resources - here are stored details for each resource assigned to a given project; resource is used in the context of a link to a cloud folder where project documentation is stored;
- task_assignment - similarly to project_assignment model, this one will be storing details for each task assignment... when I add this functionality; so far only one team member can be assigned to a task;
- tasks - stores task details;
- user - stores user details; important to keep in mind - it is important to have the first user (id == 1) with details below, otherwise the system will not work properly:
- note - I had in mind adding a chat room as functionality for each project, however, I decided to stop before doing so in order to avoid the "eternal improvement" bias; maybe I will add such functionality on a later stage;
Няма коментари:
Публикуване на коментар