How nkosinathiz/student_planner-app works
Project Type & Purpose
• Type: Full-stack web application built with Django (MVT pattern).
• Purpose: A student productivity and wellness planner featuring task tracking, smart scheduling, emotional diary, and a dynamic calendar.
Main Components
a. Presentation Layer (Frontend)
• HTML templates in student_app/templates (home.html, notes.html, schedule.html, etc.)
• CSS styles (inline or static directory if added)
• JavaScript snippets for real-time clock and dynamic calendar updates
• Browser/UI client
b. Application Layer (Backend)
• Django project: student_planner/
• settings.py (configuration, middleware, installed apps)
• urls.py (root URL router)
• wsgi.py / asgi.py (deployment entry points)
• Django app: student_app/
• models.py (Task, Note, Schedule, UserProfile, etc.)
• views.py (functions or class-based views handling requests)
• urls.py (app-specific URL patterns)
• admin.py (Django admin registration)
• tests.py (unit tests)
c. Data Layer
• SQLite database (db.sqlite3) storing users, tasks, schedules, diary entries
• Django ORM handling SQL queries
d. (Optional) External/Infrastructure Services
• Authentication (built-in Django auth using admin/admin for now)
• Future integrations: email/SMS reminders, third-party calendar APIs
Component Relationships & Data Flows
• User via Browser ➔ HTTP requests (GET/POST) to Django URLs (student_planner/urls.py → student_app/urls.py)
• URL dispatcher maps to Views ➔ Views invoke Models (ORM) to read/write db.sqlite3
• Views render Templates (HTML/CSS/JS) with context data and return HTTP responses
• JavaScript in templates can call additional HTTP endpoints (AJAX) for dynamic calendar or task updates
• manage.py as CLI entry for migrations, dev server, testing
Architectural Patterns & Design Principles
• Model-View-Template (MVT): clear separation of data (models), business logic/controllers (views), and presentation (templates)
• Single Django project containing one primary app (student_app) — easy to split into multiple apps if features grow
• RESTful-style URL endpoints (e.g., /tasks/create/, /notes/) for CRUD operations
• Use of Django admin for quick data inspection and management