How shreyao3/task_manager works
Project Type and Purpose
• TaskNexus is a full-stack web application for advanced task management.
• Built on Python/Flask following an MVC pattern.
• Key features: task CRUD, ML-based prioritization, email notifications, analytics, responsive UI, authentication.
File Structure
• Top-level:
• app.py / run.py: Flask app initialization and route handlers (Controllers).
• models/: ORM models for Users, Tasks, plus ML model wrapper.
• ml/: Offline ML artifacts (pickled encoders, model, scaler) and training script.
• static/: Frontend assets (CSS, JS) served by Flask static route.
• templates/: Jinja2 views (HTML) rendered by controllers.
• Configuration: requirements.txt, database connection in app.py, email creds via environment/config.
README Insights
• MVC layers explicitly described.
• SQL Server DB with tables for users, tasks, categories, types, reminders.
• ML component for auto-prioritization.
• Email/SMTP for notifications.
• Client-side and server-side validation, OTP auth, session management.
a. Main Components
• Client Browser (UI)
• Flask Web Server (app.py, run.py) – Controllers
• Templates + Static Assets – Views
• Data Layer – SQL Server Database
• ML Service – ml_model component loaded at runtime
• Email Service – external SMTP (Gmail)
• Offline Training Pipeline – train_model.py (optional to show)
b. Relationships and Interactions
1. User interacts via Browser → HTTP(s) requests → Flask Web Server
2. Flask routes call Controllers → query/update Database via models/task_model & user_model
3. For new/edit task, Controller invokes ML Model component to predict priority
4. Controllers render HTML via Templates + inject data; static assets served separately
5. For notifications: Controllers send emails via SMTP service
6. Session/auth flows: Controllers validate inputs, query user_model, manage sessions
7. Analytics: Controllers aggregate data from DB, pass to statistics template
c. Architectural Patterns & Principles
• MVC separation: clear division of Models / Views / Controllers
• Single Flask app monolith but layered for maintainability
• ML component affixed to business logic layer (wrapper model)
• External dependencies segregated (DB, SMTP)
d. Key Technologies & Libraries
• Flask (Werkzeug, Jinja2)
• SQLAlchemy or raw driver for SQL Server
• Pandas / scikit-learn for ML
• SMTP library for email
• HTML5, CSS3, JavaScript for front end