How josejimenez-m/taskmanager works
Project Identification
• This is a desktop task management application built in Python, employing a graphical user interface (likely using Tkinter and related libraries such as Pillow and tkcalendar). It includes user authentication and MySQL database connectivity.
• The README and file structure reveal that its purpose is to allow users (admins and normal users) to create, update, complete, and delete tasks via a GUI, with authentication and a MySQL backend for task persistence.
High-Level Architectural Components
a. User Interface (UI):
• The UI is implicitly provided through various modules (e.g., Menu/Menu.py, styles.py) and possibly through Tkinter interfaces.
• It is responsible for displaying menus (Menu module) and forms for login and task management.
b. Authentication Module:
• Directory: Login
• Contains files for handling user authentication, including logging in (login.py) and creating users (createUser.py), as well as any utility authentication functions (auth.py).
• Interacts with a JSON file (users.json) for temporary or persistent user information.
c. Task Management Module:
• Directory: Tasks
• Contains scripts for handling CRUD operations on tasks (e.g., CreateTasks.py, DeleteTask.py, updateTask.py, CompleteTask.py, showAllTasks.py) as well as database query routines (db_queries.py).
• This module directly interacts with the MySQL database (as set up by the provided SQL script in the README).
d. Central Application Bootstrap & Configuration:
• Program_Main.py: Acts as the main entry point, responsible for bootstrapping and orchestrating the various modules.
• config.py and globals.py: Hold configuration data (such as database connection info, credentials, or other settings) and global variables/constants.
• README.md: Provides installation instructions and architectural clues, like dependencies and setup details.
• styles.py: Likely defines UI styling, ensuring a uniform look and feel.
Data Flow and Relationships
• The main program (Program_Main.py) initializes the application by loading configuration settings (from config.py and globals.py), and then routes the flow either into the Login module (for authentication) or directly to the Menu and Task management components.
• The Login module processes user credentials; after a successful login, the application transitions to the Menu module.
• The Menu module acts as a navigation layer that directs users to different task-related views.
• Task operations are handled by the Tasks module. These operations interact with the MySQL database through functions defined in db_queries.py.
• Users’ actions on the UI (such as creating, updating, or deleting tasks) trigger calls to the respective modules, which in turn execute SQL commands on the TaskManager database.
• Important external interactions include:
• MySQL database for persistent task storage.
• External libraries: Tkinter (GUI), Pillow (image support), bcrypt (secure password handling), and tkcalendar (date selection).
Architectural Patterns and Design Principles
• Modular Design: The project is cleanly divided into separate directories based on functionality (Login, Menu, Tasks). This separation simplifies understanding and maintenance.
• Separation of Concerns: Authentication, UI navigation, and task management responsibilities are clearly separated.
• Configuration Management: Dedicated configuration (config.py) and global settings (globals.py) files centralize environmental settings and constants.
• Object-Oriented or Procedural: The project might follow a procedural style given the file structure, but the separation hints at a simple MVC-like layout where the controllers (e.g., Login and Tasks modules) handle user actions and communicate with the data source.