How jonaaxsic/gestion-estudiantil works
1. System shape
- This repo is a three-tier academic management system: an Angular frontend, a Django REST-style backend, and an edge/API worker layer that sits between the browser and the backend in deployment.
2. User-facing application
- The Frontend/ workspace is the primary UI. It is an Angular 19 single-page app with distinct routes for login, registration, admin, docente, and apoderado dashboards.
- The page structure suggests role-based experiences rather than a single generic dashboard.
3. Frontend application boundaries
- Shared UI lives under src/app/shared/components and is reused across pages through cards, headers, and tabs.
- Cross-cutting client logic is centralized in src/app/core, especially:
- auth.service.ts for session/auth state,
- auth.interceptor.ts for attaching request metadata such as auth tokens,
- admin.guard.ts for route protection,
- storage.service.ts for persistence,
- theme.service.ts for UI theming.
4. Frontend-to-API flow
- The frontend uses api.service.ts as the main data access layer, so components talk to services rather than directly to network endpoints.
- The interceptor/guard split indicates a clear boundary: components render state, services fetch data, and guards prevent unauthorized navigation.
5. Backend application boundary
- Backend/ is a Django application organized around a single core app (Backend/core), which contains the domain layer:
- models.py for persisted entities,
- serializers.py for API payload shaping,
- views.py for request handling,
- urls.py for route registration.
- This is the typical separation for a Django API-focused backend.
6. Backend runtime and entrypoints
- The backend is prepared for both WSGI and ASGI execution via wsgi.py and asgi.py, which makes it compatible with traditional hosting and async-capable deployment targets.
- manage.py and settings.py indicate a conventional Django project structure with a dedicated settings boundary.
7. Database integration
- The backend has a dedicated database.py module and a management command check_mongo.py, which strongly suggests a MongoDB-backed persistence layer rather than Django’s default relational database path.
- The README confirms MongoDB Atlas as the data store, so the backend likely acts as the application/API layer over a managed MongoDB cluster.
8. Edge/API proxy layer
- api-worker/ and Frontend/functions/api.ts indicate an edge function or worker-based proxy in front of the backend API.
- In deployment, this likely handles API routing, origin abstraction, or platform-specific request forwarding between Cloudflare-hosted frontend assets and the Django backend.
9. Deployment topology
- The repo contains Cloudflare and Render configuration: Frontend/wrangler.toml, api-worker/wrangler.*, render.yaml, and a docker-compose.yml.
- The README describes the deployment split as Cloudflare Pages for the frontend and Cloudflare Workers → Render for the API/backend path.
10. Domain features reflected in the UI
- The application is centered on institutional workflows: attendance, evaluations, annotations, meetings, and role-based access for admin, docente, and apoderado.
- This implies the main domain data flows are CRUD-heavy and role-scoped rather than public content flows.
11. Operational and maintenance concerns
- .github/workflows/keep-alive.yml suggests an operational concern for keeping a deployed service awake or reachable.
- The presence of environment templates and multiple platform configs shows the project is designed for multi-environment deployment rather than a single-host monolith.
12. How to draw the architecture
- A clean diagram would show: end user → Angular SPA → auth/API service layer → Cloudflare Worker/API proxy → Django backend → MongoDB Atlas.
- Around that, show role-based UI routes on the frontend and Django core modules on the backend as the main internal boundaries.
Main entry points: app.routes.ts App routes · apps.py Core app · worker.js API worker · shared-card.component.ts Shared UI
Components 25
Angular SPA
Browser application with role-based routes and shared client services.
- Angular app · Primary single-page application shell and route host.
Frontend/src/app/app.ts - App routes · Route definitions for login, registration, and role dashboards.
Frontend/src/app/app.routes.ts - Login · Authentication entry screen.
Frontend/src/app/pages/login/login.page.ts - Registro · User registration flow.
Frontend/src/app/pages/registro/registro.page.ts - Admin · Administrative dashboard for management workflows.
Frontend/src/app/pages/admin/admin.page.ts - Docente · Teacher dashboard and classroom workflows.
Frontend/src/app/pages/dashboard-docente/dashboard-docente.page.ts - Apoderado · Guardian dashboard and student-followup workflows.
Frontend/src/app/pages/dashboard-apoderado/dashboard-apoderado.page.ts - Shared UI · Reusable cards, headers, and tabs used across pages.
Frontend/src/app/shared/components/shared-card.component.ts - Auth service · Session state and login/logout logic.
Frontend/src/app/core/services/auth.service.ts - API service · Main frontend data access layer.
Frontend/src/app/core/services/api.service.ts - Auth interceptor · Attaches auth metadata to outgoing requests.
Frontend/src/app/core/interceptors/auth.interceptor.ts - Admin guard · Protects restricted client routes.
Frontend/src/app/core/guards/admin.guard.ts
Edge/API
Worker layer that proxies API traffic between frontend and backend.
- API worker · Edge layer that forwards or routes API requests.
api-worker/worker.js - Worker entry · Worker bootstrap for deployment runtime.
api-worker/index.js
Django API
Core backend application, domain logic, and MongoDB integration.
- Django entry · ASGI/WSGI and management entrypoints for the backend.
Backend/manage.py - Core app · Main backend application package.
Backend/core/apps.py - Models · Persisted entities for academic workflows.
Backend/core/models.py - Serializers · Shapes backend payloads for the API.
Backend/core/serializers.py - Views · HTTP request handling and orchestration.
Backend/core/views.py - URLs · Backend route registration.
Backend/core/urls.py - MongoDB · Atlas-backed persistence layer used by the backend.
Backend/core/database.py
Deployment
Platform and operational configuration across environments.
- Cloudflare · Frontend and worker deployment configuration.
Frontend/wrangler.toml - Render · Backend deployment configuration.
render.yaml - Compose · Local multi-service orchestration.
docker-compose.yml
Other components
- Users · Students, staff, and guardians using the system.
Connections 31
- Users → Angular app: uses · Users access the Angular application.
- Angular app → App routes: navigates · The app shell loads route-based pages.
- App routes → Login: maps · Route to login screen.
- App routes → Registro: maps · Route to registration screen.
- App routes → Admin: maps · Route to admin dashboard.
- App routes → Docente: maps · Route to teacher dashboard.
- App routes → Apoderado: maps · Route to guardian dashboard.
- Login → Shared UI: reuses · Pages share common presentation components.
- Registro → Shared UI: reuses · Pages share common presentation components.
- Admin → Shared UI: reuses · Pages share common presentation components.
- Docente → Shared UI: reuses · Pages share common presentation components.
- Apoderado → Shared UI: reuses · Pages share common presentation components.
- Login → Auth service: authenticates · Login flow delegates session logic to auth service.
- Angular app → API service: fetches · Application features load data through the API service.
- API service → Auth interceptor: passes through · Outgoing requests are decorated by the interceptor.
- Admin → Admin guard: protected by · Restricted navigation is guarded on the client.
- API service → API worker: calls · Frontend API traffic is routed through the worker layer.
- API worker → Worker entry: bootstraps · Worker runtime entry starts the proxy logic.
- API worker → Django entry: forwards to · Proxy layer forwards requests to the backend API.
- Django entry → Core app: loads · Backend entrypoint initializes the Django app.
- Core app → Models: contains · Domain package defines persisted entities.
- Core app → Serializers: contains · Domain package defines payload shaping.
- Core app → Views: contains · Domain package handles HTTP requests.
- Core app → URLs: contains · Domain package registers routes.
- Views → MongoDB: reads/writes · Backend persists and retrieves academic data from MongoDB.
- Serializers → Views: shapes · Serializers support request and response handling.
- URLs → Views: routes to · URLs dispatch to API handlers.
- Cloudflare → API worker: deploys · Cloudflare configuration hosts the frontend and worker.
- Render → Django entry: deploys · Render configuration hosts the Django backend.
- Compose → API worker: orchestrates · Local compose setup can include the proxy path.
- Compose → Django entry: orchestrates · Local compose setup can include the backend service.