# camilo13/sistemaacademico architecture

> Architecture diagram of the GitHub repository camilo13/sistemaacademico, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/camilo13/sistemaacademico
- Repository: https://github.com/camilo13/sistemaacademico

## Overview

1. This is a Laravel-based school information system. The core runtime is a standard PHP/Laravel MVC app: HTTP requests enter through `public/index.php`, pass through middleware, are routed in `routes/web.php`, and are handled by controllers in `app/Http/Controllers`.

2. The application is organized by business module rather than by technical layer. The main modules are:
   - Académico: year, periods, grades, groups, subjects, schedules, enrollments, subject enrollment, grades/notes, and report cards.
   - Docente: teacher dashboards for attendance, groups, schedules, and grade entry.
   - Estudiante: student views for attendance, schedule, grades, and report cards.
   - Admin: user and configuration management.
   - Biblioteca: library content and resources, split into gestion and lectura.
   - Portal/Publico: public-facing site content such as carousel and events.
   - Solicitudes: request management and submission flow.
   - Perfil: user profile management.
   - Dashboard: role-specific landing pages for admin, teacher, and student.

3. The boundary between roles is explicit. `app/Http/Middleware/VerificarRol.php` suggests authorization is enforced by role at the route/controller level, and the separate dashboard controllers and menu layouts indicate each role sees a different navigation and feature set.

4. Data is stored in Eloquent models under `app/Models`, with one model per domain entity: users, academic years, periods, grades, groups, subjects, assignments, enrollments, enrollment-subject links, grades, schedules, attendance, library materials/resources, requests, settings, carousel items, and events. The migrations under `database/migrations` define the schema backbone for these entities.

5. Academic workflow is one of the main data flows in the system. Administrative controllers create the school structure first: sede, grado, materia, grupo, anio lectivo, periodo, and asignacion. Those entities then feed downstream flows for inscripcion, inscripcion_materia, horario, nota, asistencia, and boletin generation.

6. There is a dedicated report-generation layer in `app/Services`. `CalculoAcademicoService` and `BoletinService` indicate business rules for computing grades/averages and assembling report card output are isolated from controllers. That separation is important: controllers likely orchestrate requests, while services own calculation logic and report composition.

7. The UI is server-rendered with Blade templates under `resources/views`. View folders mirror the controller/module structure, which makes the screen architecture easy to map: each module has its own create/edit/index/show pages, plus role-specific dashboards and layout shells for admin, docente, estudiante, and publico.

8. Static front-end assets are split in two tracks. `resources/` contains the Laravel build assets, while `public/css`, `public/js`, and `public/img` hold the app’s compiled and module-scoped assets. The CSS/JS tree is also organized by module, so each subsystem can have its own styling and client-side behavior without a shared SPA layer.

9. The public site is a separate presentation boundary from the authenticated system. Public pages in `resources/views/publico` and controllers under `app/Http/Controllers/public` serve informational pages like inicio, eventos, contacto, and sobrenosotros, backed by public-facing carousel and event content in the portal module.

10. The library subsystem is a distinct content-management area. It has management controllers and views for authorship/administration of materials and resources, plus read-only “lectura” controllers and views for consumers. This indicates a curator/reader split rather than a single CRUD surface.

11. There is a small auxiliary Python component under `python/` that appears to generate analytics artifacts. The checked-in outputs in `python/storage/app/public/reporte_analisis` suggest it produces a CSV and PDF report, likely as an offline or batch analysis companion to the Laravel app rather than part of the main request path.

12. Persistence and file handling are standard Laravel infrastructure. The app uses migrations/seeders for database lifecycle, `storage/` for logs and generated files, and the public disk for downloadable outputs. The presence of PDF preview pages and generated report files suggests document export is a meaningful output boundary in the system.

13. Operationally, this repository is a monolith with clear internal module boundaries, not a microservice architecture. The key diagram should show one Laravel app at the center, role-based entry points around it, a shared relational datastore beneath it, and a separate Python reporting sidecar for analysis/export artifacts.

Main entry points: [`app/Models`](https://github.com/camilo13/sistemaacademico/tree/main/app/Models) (Eloquent models), [`app/Http/Controllers/Modulos/Dashboard`](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Dashboard) (Dashboards), [`app/Http/Controllers`](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers) (Controllers), [`app/Http/Controllers/Modulos/Academico`](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Academico) (Enrollment flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_laravel["Laravel app"]
  node_n_public_index["Front entry<br/>php entrypoint<br/>[index.php]"]
  node_n_middleware{{"Role guard<br/>middleware<br/>[VerificarRol.php]"}}
  node_n_routes["Web routes<br/>route map<br/>[web.php]"]
  node_n_base_ctrl["Controllers"]
  node_n_views["Blade views<br/>server views"]
end

subgraph group_grp_academico["Académico"]
  node_n_services["Academic services<br/>business services"]
  node_n_acad_estructura["School structure<br/>acad module"]
  node_n_acad_flujo["Enrollment flow<br/>acad module"]
  node_n_acad_boletin["Report cards<br/>acad module"]
end

subgraph group_grp_roles["Role UIs"]
  node_n_docente["Teacher tools<br/>role module"]
  node_n_estudiante["Student tools<br/>role module"]
  node_n_dashboards["Dashboards<br/>role landing"]
end

subgraph group_grp_content["Content modules"]
  node_n_admin["Admin module"]
  node_n_biblioteca["Library<br/>content module"]
  node_n_portal["Public portal<br/>content module"]
  node_n_publico["Public pages<br/>public site"]
  node_n_solicitudes["Requests<br/>workflow module"]
  node_n_perfil["Profile<br/>user module"]
end

subgraph group_grp_data["Data & storage"]
  node_n_models[("Eloquent models<br/>domain models")]
  node_n_migrations["Migrations<br/>schema backbone"]
  node_n_storage[("Storage<br/>files and logs")]
  node_n_python["Analytics sidecar<br/>python batch<br/>[app.py]"]
end

node_n_public_index -->|"bootstraps"| node_n_middleware
node_n_middleware -->|"authorizes"| node_n_routes
node_n_routes -->|"dispatches"| node_n_base_ctrl
node_n_base_ctrl -->|"renders"| node_n_views
node_n_base_ctrl -->|"reads/writes"| node_n_models
node_n_models -->|"defined by"| node_n_migrations
node_n_acad_estructura -->|"builds core data"| node_n_models
node_n_acad_flujo -->|"operates on"| node_n_models
node_n_acad_flujo -->|"uses rules"| node_n_services
node_n_acad_boletin -->|"composes"| node_n_services
node_n_services -->|"exports"| node_n_storage
node_n_dashboards -->|"routes to"| node_n_docente
node_n_dashboards -->|"routes to"| node_n_estudiante
node_n_dashboards -->|"routes to"| node_n_admin
node_n_docente -->|"enters"| node_n_acad_flujo
node_n_estudiante -->|"views"| node_n_acad_boletin
node_n_admin -->|"manages"| node_n_models
node_n_biblioteca -->|"manages"| node_n_models
node_n_portal -->|"publishes"| node_n_models
node_n_publico -->|"consumes"| node_n_portal
node_n_solicitudes -->|"tracks"| node_n_models
node_n_perfil -->|"updates"| node_n_models
node_n_python -->|"produces"| node_n_storage
node_n_python -->|"complements"| node_n_acad_boletin

click node_n_public_index "https://github.com/camilo13/sistemaacademico/blob/main/public/index.php"
click node_n_middleware "https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Middleware/VerificarRol.php"
click node_n_routes "https://github.com/camilo13/sistemaacademico/blob/main/routes/web.php"
click node_n_base_ctrl "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers"
click node_n_views "https://github.com/camilo13/sistemaacademico/tree/main/resources/views"
click node_n_services "https://github.com/camilo13/sistemaacademico/tree/main/app/Services"
click node_n_acad_estructura "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Academico/Estructura"
click node_n_acad_flujo "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Academico"
click node_n_acad_boletin "https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Controllers/Modulos/Academico/BoletinController.php"
click node_n_docente "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Docente"
click node_n_estudiante "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Estudiante"
click node_n_dashboards "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Dashboard"
click node_n_admin "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Admin"
click node_n_biblioteca "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Biblioteca"
click node_n_portal "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Portal"
click node_n_publico "https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Controllers/public/PublicController.php"
click node_n_solicitudes "https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Solicitudes"
click node_n_perfil "https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Controllers/Modulos/Perfil/PerfilController.php"
click node_n_models "https://github.com/camilo13/sistemaacademico/tree/main/app/Models"
click node_n_migrations "https://github.com/camilo13/sistemaacademico/tree/main/database/migrations"
click node_n_storage "https://github.com/camilo13/sistemaacademico/tree/main/storage"
click node_n_python "https://github.com/camilo13/sistemaacademico/blob/main/python/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n_public_index,node_n_middleware,node_n_routes,node_n_base_ctrl,node_n_views toneBlue
class node_n_services,node_n_acad_estructura,node_n_acad_flujo,node_n_acad_boletin toneAmber
class node_n_docente,node_n_estudiante,node_n_dashboards toneMint
class node_n_admin,node_n_biblioteca,node_n_portal,node_n_publico,node_n_solicitudes,node_n_perfil toneRose
class node_n_models,node_n_migrations,node_n_storage,node_n_python toneIndigo
```

## Components

### Laravel app

Main PHP/Laravel monolith and request lifecycle

- [Front entry](https://github.com/camilo13/sistemaacademico/blob/main/public/index.php): php entrypoint · HTTP entry into the Laravel app · `public/index.php`
- [Role guard](https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Middleware/VerificarRol.php): middleware · Enforces role-based access across routes · `app/Http/Middleware/VerificarRol.php`
- [Web routes](https://github.com/camilo13/sistemaacademico/blob/main/routes/web.php): route map · Main HTTP routing surface · `routes/web.php`
- [Controllers](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers): mvc controllers · Central controller layer for all modules · `app/Http/Controllers`
- [Blade views](https://github.com/camilo13/sistemaacademico/tree/main/resources/views): server views · Server-rendered screens and layouts · `resources/views`

### Académico

Core school-operations workflow

- [Academic services](https://github.com/camilo13/sistemaacademico/tree/main/app/Services): business services · Grade calculation and report composition · `app/Services`
- [School structure](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Academico/Estructura): acad module · Sede, grado, materia, grupo, año y periodo setup · `app/Http/Controllers/Modulos/Academico/Estructura`
- [Enrollment flow](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Academico): acad module · Asignación, inscripción, materias, horario, notas y asistencia · `app/Http/Controllers/Modulos/Academico`
- [Report cards](https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Controllers/Modulos/Academico/BoletinController.php): acad module · Boletines and printable academic summaries · `app/Http/Controllers/Modulos/Academico/BoletinController.php`

### Role UIs

Dashboards and role-specific presentation layers

- [Teacher tools](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Docente): role module · Attendance, groups, schedules, and grade entry · `app/Http/Controllers/Modulos/Docente`
- [Student tools](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Estudiante): role module · Attendance, schedule, grades, and boletín views · `app/Http/Controllers/Modulos/Estudiante`
- [Dashboards](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Dashboard): role landing · Role-specific landing pages for admin, teacher, and student · `app/Http/Controllers/Modulos/Dashboard`

### Content modules

Public site, library, requests, and profile features

- [Admin module](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Admin): admin module · User and configuration management · `app/Http/Controllers/Modulos/Admin`
- [Library](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Biblioteca): content module · Gestion and lectura split for materials and resources · `app/Http/Controllers/Modulos/Biblioteca`
- [Public portal](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Portal): content module · Carousel and events for the public site · `app/Http/Controllers/Modulos/Portal`
- [Public pages](https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Controllers/public/PublicController.php): public site · Inicio, eventos, contacto, and about pages · `app/Http/Controllers/public/PublicController.php`
- [Requests](https://github.com/camilo13/sistemaacademico/tree/main/app/Http/Controllers/Modulos/Solicitudes): workflow module · Solicitud submission and management flow · `app/Http/Controllers/Modulos/Solicitudes`
- [Profile](https://github.com/camilo13/sistemaacademico/blob/main/app/Http/Controllers/Modulos/Perfil/PerfilController.php): user module · User profile management · `app/Http/Controllers/Modulos/Perfil/PerfilController.php`

### Data & storage

Persistent models, migrations, and generated artifacts

- [Eloquent models](https://github.com/camilo13/sistemaacademico/tree/main/app/Models): domain models · Shared domain entities for users, academic data, library, portal, and requests · `app/Models`
- [Migrations](https://github.com/camilo13/sistemaacademico/tree/main/database/migrations): schema backbone · Database schema definitions for the monolith · `database/migrations`
- [Storage](https://github.com/camilo13/sistemaacademico/tree/main/storage): files and logs · Logs, generated PDFs, and downloadable artifacts · `storage`
- [Analytics sidecar](https://github.com/camilo13/sistemaacademico/blob/main/python/app.py): python batch · Offline analytics/report generation companion · `python/app.py`

## Connections

- Front entry → Role guard: bootstraps · Requests enter the Laravel pipeline
- Role guard → Web routes: authorizes · Role checks gate route access
- Web routes → Controllers: dispatches · Routes resolve to controller actions
- Controllers → Blade views: renders · Controllers return Blade screens
- Controllers → Eloquent models: reads/writes · Controllers coordinate domain persistence
- Eloquent models → Migrations: defined by · Model entities map to schema migrations
- School structure → Eloquent models: builds core data · Creates the school structure used downstream
- Enrollment flow → Eloquent models: operates on · Enrollment, schedule, grades, and attendance
- Enrollment flow → Academic services: uses rules · Academic operations depend on calculation services
- Report cards → Academic services: composes · Report cards are assembled from service logic
- Academic services → Storage: exports · Boletins and generated documents land in storage
- Dashboards → Teacher tools: routes to · Teacher dashboard links into teacher tools
- Dashboards → Student tools: routes to · Student dashboard links into student tools
- Dashboards → Admin module: routes to · Admin dashboard links into admin tools
- Teacher tools → Enrollment flow: enters · Teacher workflows feed attendance and grading
- Student tools → Report cards: views · Students consume academic summaries and grades
- Admin module → Eloquent models: manages · Admin config and user management persist to models
- Library → Eloquent models: manages · Library content and resources are stored as models
- Public portal → Eloquent models: publishes · Carousel and event content is data-backed
- Public pages → Public portal: consumes · Public pages show portal content
- Requests → Eloquent models: tracks · Requests are stored and processed through the domain model
- Profile → Eloquent models: updates · Profile changes persist on the user model
- Analytics sidecar → Storage: produces · Batch analytics outputs CSV/PDF artifacts
- Analytics sidecar → Report cards: complements · Offline analysis supports reporting workflows
