How darkarmor616/studyplan works
1. Overall shape
- This is a single Django monolith called StudyPlan.
- The repository has one Django project package (studyplan/) and one main app (core/), so the architecture is centralized rather than split into microservices or multiple apps.
2. Core runtime and framework
- The application runs on Python 3.10+ / Django 4.2.
- manage.py, studyplan/settings.py, studyplan/urls.py, and studyplan/wsgi.py form the standard Django project boundary.
- Persistence is handled with SQLite in development, with migrations tracked under core/migrations/.
3. Primary domain boundary: core app
- The core app contains the domain logic for the whole product: study planning, disciplines, activities/exams, schedules, study logs, dashboards, and reports.
- This app is the main architectural unit; there are no separate bounded-context apps in the repository.
4. User-facing features mapped to subsystems
- Authentication and user onboarding: registration and login pages (cadastro.html, registro_form.html, login.html).
- Discipline management: discipline CRUD pages (disciplina_form.html, disciplina_lista.html).
- Activities/exams management: activity/task CRUD pages (atividade_form.html, atividade_lista.html) with completion and priority support.
- Study schedule management: planning sessions through cronograma_form.html and cronograma_lista.html.
- Study time tracking: logs and totals via registro_form.html and registro_lista.html.
- Calendar and reporting: monthly/weekly calendars plus a reports page (calendario_mensal.html, calendario_semanal.html, relatorios.html).
5. Request flow through the app
- Django routes requests from studyplan/urls.py into core/urls.py.
- View functions in core/views.py coordinate each page: they read/update models, validate input through forms, and choose the template to render.
- The flow is the classic Django server-side rendering path: browser request → URL dispatcher → view → model/form logic → template response.
6. Data model and business rules
- core/models.py is the persistence and domain-rule layer.
- Based on the README requirements, the models likely represent users, disciplines, activities/provas, study schedules, and time records.
- Business rules exposed by the app include activity priority, overdue/upcoming reminders, completion state, and total hours studied per discipline.
7. Forms as the input boundary
- core/forms.py isolates validation and form structure from the views.
- This keeps create/edit actions consistent across disciplines, activities, cronogram entries, and time registrations.
- The architecture suggests a standard Django “model + form + view” pattern rather than custom API endpoints.
8. Template layer and UI composition
- All UI is server-rendered with Django templates under core/templates/core/.
- base.html provides the shared layout, while the other templates are feature-specific screens.
- Bootstrap 5.3 and Bootstrap Icons provide the visual system, so the front end is mostly presentation-focused rather than a separate SPA.
9. Dashboard, reminders, and calendar as aggregation views
- dashboard.html, the calendar pages, and relatorios.html are aggregation screens rather than simple CRUD forms.
- These pages likely combine multiple model queries into summarized views: upcoming/late activities, study progress, scheduled sessions, and historical totals.
- This is the main “analytics” boundary in the app, but it remains inside the monolith.
10. Operational and deployment boundary
- Procfile, railway.json, nixpacks.toml, runtime.txt, and build.sh show the app is designed for deployment on a platform like Railway.
- The project is built to run as a WSGI web app, not as a background worker system.
- There is no evidence of external services or message queues; reminders and reports appear to be computed inside Django request handling.
11. Architectural summary for diagramming
- Draw one main web application box containing the Django project and the core app.
- Inside core, separate the user interface/templates, request handlers/views, validation/forms, and persistence/models.
- Show the database as a single SQLite-backed store behind Django ORM.
- The key business flows are: authentication, discipline CRUD, activity CRUD with reminders and priority, schedule planning, study-hour logging, calendar views, and report aggregation.
Main entry points: views.py views · manage.py manage.py · settings.py settings · Procfile deploy config
Components 19
Django project
Framework boundary and app wiring
- manage.py · Django command entry point
manage.py - settings · Project configuration and installed app wiring
studyplan/settings.py - project urls · Top-level URL dispatcher
studyplan/urls.py - wsgi · WSGI application entry
studyplan/wsgi.py
Core app
Domain logic, views, forms, models, and templates
- core urls · App routes for study planning features
core/urls.py - views · Page controllers coordinating models, forms, and templates
core/views.py - forms · Input validation and form definitions
core/forms.py - models · Persistence and business rules
core/models.py - migrations · Database schema evolution for the core app
core/migrations/0001_initial.py - base layout · Shared page chrome and styling
core/templates/core/base.html - auth screens · Registration and login pages
core/templates/core/login.html - disciplines · Discipline CRUD pages
core/templates/core/disciplina_lista.html - activities · Activity and exam management pages
core/templates/core/atividade_lista.html - schedule · Cronograma planning pages
core/templates/core/cronograma_lista.html - study logs · Study time entry and history pages
core/templates/core/registro_lista.html - calendar · Monthly and weekly calendar views
core/templates/core/calendario_mensal.html - reports · Aggregated progress and summary pages
core/templates/core/relatorios.html
Deployment
Runtime and build configuration
- deploy config · Railway and Nixpacks deployment settings
Procfile
Other components
- SQLite DB · Primary development datastore behind the ORM
Connections 20
- manage.py → settings: loads · Management commands use project settings
- manage.py → project urls: runs · Command entry starts the Django app
- wsgi → settings: configures · WSGI app uses project settings
- project urls → core urls: routes · Top-level routes hand off to the core app
- core urls → views: dispatches · URL patterns resolve to page handlers
- views → forms: validates · Create and edit flows use forms
- views → models: reads/writes · Views coordinate persistence and business rules
- views → base layout: renders · All screens share the base layout
- views → auth screens: renders · Authentication and onboarding pages
- views → disciplines: renders · Discipline management pages
- views → activities: renders · Activity and exam management pages
- views → schedule: renders · Cronograma planning pages
- views → study logs: renders · Study log pages
- views → calendar: renders · Calendar aggregation views
- views → reports: renders · Summary and reporting views
- models → SQLite DB: persists · Django ORM stores domain data in SQLite
- migrations → SQLite DB: evolves · Schema changes are applied to the database
- settings → SQLite DB: configures · Database backend is defined in settings
- deploy config → wsgi: starts · Deployment runs the WSGI web process
- deploy config → manage.py: builds · Deployment scripts support Django management and startup