How teo-information/sistema-de-gesti-n-educativa works
Project type and purpose
• This is a full-stack web application built with Django (an MVC/MVT framework).
• Purpose: manage students, courses, enrollments (matrículas) and grades (notas) in an educational institution.
Files and folder analysis
• Top-level Django project:
• sistema_educativo/ – core settings, URLs, ASGI/WGSI entry points
• manage.py – Django CLI
• Django apps (each represents a bounded context):
• estudiantes/ – student CRUD logic
• cursos/ – course CRUD logic
• matriculas/ – enrollment workflows
• notas/ – grade tracking
• Templates and static assets:
• templates/ – HTML views (per-app subfolders + base layout + auth)
• static/ – CSS/JS (Bootstrap, custom)
• Deployment/configuration:
• Dockerfile, docker-compose.yml, Procfile (Heroku), render.yaml (Render.com)
• requirements.txt, build.sh for build steps
Key architectural patterns and technologies
• Django MVT: Models (in models.py) ↔ Views (in views.py) ↔ Templates (HTML)
• Central URL dispatcher (sistema_educativo/urls.py)
• Django ORM and relational database service (likely PostgreSQL defined in Docker Compose)
• Static file handling via Django’s staticfiles + Bootstrap 5 + Crispy Forms
• Authentication (login) via Django’s contrib auth + custom registration template
• Containerization (Docker), cloud deployment (Heroku/Render)
Main components
a. Client Browser
– Sends HTTP(S) requests (HTML, JSON)
– Renders HTML/CSS/JS (Bootstrap, custom JS)
b. Web Server / Application Layer
– Django application inside Docker container
– URL router → App Views → Templates or JSON
– Uses Django Crispy Forms for form rendering
c. Business Logic Modules (Django apps)
– estudiantes, cursos, matriculas, notas
– Each module: Models, Forms, Views, URLs, Templates
d. Database Layer
– Managed by Django ORM
– Postgres or SQLite (per docker-compose.yml)
e. Admin Interface
– Django Admin site for superusers
f. Deployment Infrastructure
– Docker Engine, Docker Compose
– Cloud Runner (Heroku/Render)
Component relationships and data flow
• Browser → (HTTP) → Load Balancer / Proxy (if any) → Docker container running Django
• Django URL Router → App-specific View → Query/Update DB via ORM → Render Template or Redirect → Response
• Static file requests → Served from Django staticfiles or CDN
• Admin user flows: same path but with /admin/ URL
• CI/CD builds via build.sh → Docker image → Push to cloud
Architectural patterns and design principles
• Separation of concerns: MVT layers, modular apps
• Single responsibility per Django app (students, courses, enrollments, grades)
• Configuration-as-code: Dockerfiles, Compose, Procfile, Render manifests
• Reusability/DRY: shared base templates, Crispy Forms, common static assets