# saiv4568/sis-escolar architecture

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

- Interactive diagram: https://gitdiagram.com/saiv4568/sis-escolar
- Repository: https://github.com/saiv4568/sis-escolar

## Overview

1. **Overall shape**
   - This is a Laravel monolith for a school/academic management system.
   - The app is centered on server-rendered Blade pages plus Livewire components for interactive CRUD screens, with Eloquent models backed by database migrations.

2. **Primary user-facing areas**
   - There are two main UI paths:
     - Traditional authentication/profile pages and a few controller-driven pages.
     - A larger Livewire-based admin area for managing academic records and users.
   - The `resources/views` tree shows this split clearly: `auth`, `layouts`, `home`, `users`, `reportes`, and `livewire` views.

3. **Domain modules**
   - The core business entities are school objects: `Estudiante`, `Personal`, `Gestion`, `Materia`, `Grado`, `Aula`, `Designacion`, `Matricula`, `Contenido`, `Evaluacion`, `Nota`, `Presentacion`, `Rol`, and `User`.
   - The Livewire components mirror these entities one-to-one in many cases, which suggests each component owns a module’s list/create/edit/delete workflow.

4. **Request flow**
   - Browser requests enter through `routes/web.php` and are handled either by controllers or Livewire components.
   - Controllers are used for authentication, profile, home, and user-facing pages.
   - Livewire components likely handle most stateful interaction without full page reloads, while still rendering Blade views on the server.

5. **Persistence layer**
   - Data is modeled with Eloquent in `app/Models` and persisted via explicit migrations in `database/migrations`.
   - The migration set is domain-heavy and includes both identity/auth tables and the academic tables, indicating a relational schema with strong entity boundaries.

6. **Authentication and authorization**
   - Standard Laravel auth scaffolding is present: login, registration, password reset, verification, confirmation.
   - There is a dedicated `Rol` model and a `rols` table, implying role-based access control layered on top of Laravel auth.
   - Middleware in `app/Http/Middleware` and `app/Http/Kernel.php` enforce session, CSRF, guest/auth redirects, and request hygiene.

7. **Validation and business rules**
   - Input validation is handled through Laravel request objects, such as `ProfileUpdateRequest`.
   - This suggests the app keeps some domain rules in form/request validation rather than only in controllers or components.

8. **Reporting subsystem**
   - The `resources/views/reportes` templates and the `Reportes` Livewire component form a reporting boundary.
   - These views likely generate printable or exportable academic reports such as final grades by student, subject, or trimester.
   - Reporting is separated from the CRUD screens, which is useful when drawing the architecture diagram as its own output branch.

9. **UI composition**
   - Layouts live in `resources/views/layouts`, with a dedicated guest layout and an app layout.
   - Static assets are served from `public` and `resources` pipelines, including Bootstrap, Font Awesome, and custom CSS/JS.
   - The front end is mostly Blade-driven rather than SPA-driven.

10. **Localization**
   - The app is localized in English and Spanish via `lang/en` and `lang/es`.
   - That means labels, auth messages, validation text, and UI copy are likely language-aware across the system.

11. **Supporting application structure**
   - `app/Providers` contains standard Laravel service providers, so the app follows conventional framework bootstrapping.
   - `app/Console` and `routes/console.php` exist for scheduled or CLI tasks, though the repo tree does not show heavy background-job usage.
   - `routes/api.php` and broadcasting files are present but do not appear central to the architecture.

12. **Operational boundaries**
   - The application boundary is a typical Laravel stack: HTTP request in, session/auth/middleware, controller or Livewire handling, Eloquent DB access, Blade response out.
   - Storage directories are standard Laravel runtime areas for logs, cache, sessions, and framework-generated views.
   - No separate service tier is evident; the system appears self-contained inside one Laravel codebase.

13. **What to emphasize in a diagram**
   - Place `Livewire` as the main interaction layer for academic administration.
   - Place `Controllers/Auth/Profile` as a smaller conventional web layer.
   - Draw Eloquent models and migrations as the domain/data boundary beneath both.
   - Show `Reportes` as an output-focused subsystem distinct from CRUD modules.
   - Show `Roles/User/Auth` as the cross-cutting access-control boundary spanning the rest of the app.

Main entry points: [`routes/web.php`](https://github.com/saiv4568/sis-escolar/blob/main/routes/web.php) (Web routes), [`resources/views/livewire/base.blade.php`](https://github.com/saiv4568/sis-escolar/blob/main/resources/views/livewire/base.blade.php) (Admin views), [`app/Models/Estudiante.php`](https://github.com/saiv4568/sis-escolar/blob/main/app/Models/Estudiante.php) (School models), [`app/Http/Controllers/ProfileController.php`](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/ProfileController.php) (Profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["UI Layer"]
  node_routes_web["Web routes<br/>router<br/>[web.php]"]
  node_home_controller["Home<br/>controller<br/>[HomeController.php]"]
  node_profile_controller["Profile<br/>controller"]
  node_user_controller["Users<br/>controller<br/>[UserController.php]"]
  node_livewire_base["Livewire base<br/>component base<br/>[Base.php]"]
  node_livewire_academic["Academic CRUD<br/>livewire components<br/>[Estudiantes.php]"]
  node_livewire_admin["Admin users<br/>livewire components<br/>[Usuarios.php]"]
  node_view_layouts["Layouts<br/>[app.blade.php]"]
  node_view_livewire["Admin views<br/>blade views<br/>[base.blade.php]"]
  node_assets["Static assets<br/>frontend assets<br/>[app.js]"]
end

subgraph group_domain["Domain Layer"]
  node_models_core[("School models<br/>eloquent models<br/>[Estudiante.php]")]
  node_migrations["Schema<br/>migrations"]
end

subgraph group_access["Access Control"]
  node_view_auth["Auth views<br/>blade views<br/>[login.blade.php]"]
  node_profile_request["Profile request<br/>form request"]
  node_middleware["Middleware<br/>[Authenticate.php]"]
end

subgraph group_reports["Reports"]
  node_livewire_reportes["Reportes UI<br/>livewire component<br/>[Reportes.php]"]
  node_view_reportes["Report views<br/>blade views"]
end

subgraph group_infra["Framework"]
  node_kernel["HTTP kernel<br/>framework bootstrap<br/>[Kernel.php]"]
  node_providers["Providers"]
  node_lang["Localization<br/>translation files<br/>[en.json]"]
end

node_routes_web -->|"home"| node_home_controller
node_routes_web -->|"profile"| node_profile_controller
node_routes_web -->|"users"| node_user_controller
node_routes_web -->|"admin screens"| node_livewire_academic
node_routes_web -->|"roles/users"| node_livewire_admin
node_routes_web -->|"reports"| node_livewire_reportes
node_home_controller -->|"renders"| node_view_layouts
node_profile_controller -->|"validates"| node_profile_request
node_profile_controller -->|"renders"| node_view_auth
node_user_controller -->|"renders"| node_view_livewire
node_livewire_base -->|"renders"| node_view_livewire
node_livewire_academic -->|"CRUDs"| node_models_core
node_livewire_academic -->|"renders"| node_view_livewire
node_livewire_admin -->|"manages"| node_models_core
node_livewire_admin -->|"renders"| node_view_livewire
node_livewire_reportes -->|"renders"| node_view_reportes
node_livewire_reportes -->|"aggregates"| node_models_core
node_models_core -->|"persisted by"| node_migrations
node_middleware -->|"registered in"| node_kernel
node_kernel -->|"protects"| node_routes_web
node_providers -->|"bootstraps"| node_kernel
node_lang -->|"localizes"| node_view_auth
node_lang -->|"localizes"| node_view_livewire
node_assets -->|"included by"| node_view_layouts

click node_routes_web "https://github.com/saiv4568/sis-escolar/blob/main/routes/web.php"
click node_home_controller "https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/HomeController.php"
click node_profile_controller "https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/ProfileController.php"
click node_user_controller "https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/UserController.php"
click node_livewire_base "https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Base.php"
click node_livewire_academic "https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Estudiantes.php"
click node_livewire_admin "https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Usuarios.php"
click node_livewire_reportes "https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Reportes.php"
click node_view_layouts "https://github.com/saiv4568/sis-escolar/blob/main/resources/views/layouts/app.blade.php"
click node_view_auth "https://github.com/saiv4568/sis-escolar/blob/main/resources/views/auth/login.blade.php"
click node_view_livewire "https://github.com/saiv4568/sis-escolar/blob/main/resources/views/livewire/base.blade.php"
click node_view_reportes "https://github.com/saiv4568/sis-escolar/blob/main/resources/views/reportes/notasFinalesEstudiante.blade.php"
click node_models_core "https://github.com/saiv4568/sis-escolar/blob/main/app/Models/Estudiante.php"
click node_migrations "https://github.com/saiv4568/sis-escolar/blob/main/database/migrations/2024_05_07_130519_create_estudiantes_table.php"
click node_profile_request "https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Requests/ProfileUpdateRequest.php"
click node_middleware "https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Middleware/Authenticate.php"
click node_kernel "https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Kernel.php"
click node_providers "https://github.com/saiv4568/sis-escolar/blob/main/app/Providers/AppServiceProvider.php"
click node_lang "https://github.com/saiv4568/sis-escolar/blob/main/lang/en.json"
click node_assets "https://github.com/saiv4568/sis-escolar/blob/main/resources/js/app.js"

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_routes_web,node_home_controller,node_profile_controller,node_user_controller,node_livewire_base,node_livewire_academic,node_livewire_admin,node_view_layouts,node_view_livewire,node_assets toneBlue
class node_models_core,node_migrations toneAmber
class node_view_auth,node_profile_request,node_middleware toneMint
class node_livewire_reportes,node_view_reportes toneRose
class node_kernel,node_providers,node_lang toneIndigo
```

## Components

### UI Layer

Blade pages and interactive Livewire screens

- [Web routes](https://github.com/saiv4568/sis-escolar/blob/main/routes/web.php): router · Main HTTP entry point that dispatches browser requests to controllers or Livewire pages · `routes/web.php`
- [Home](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/HomeController.php): controller · Landing and authenticated home page controller · `app/Http/Controllers/HomeController.php`
- [Profile](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/ProfileController.php): controller · Profile editing and account self-service controller · `app/Http/Controllers/ProfileController.php`
- [Users](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Controllers/UserController.php): controller · Controller-driven user management page(s) · `app/Http/Controllers/UserController.php`
- [Livewire base](https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Base.php): component base · Shared Livewire component base for admin CRUD screens · `app/Livewire/Base.php`
- [Academic CRUD](https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Estudiantes.php): livewire components · Stateful admin modules for school records such as students, grades, subjects, enrollment, grades, and class designations · `app/Livewire/Estudiantes.php`
- [Admin users](https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Usuarios.php): livewire components · Interactive management for users and roles · `app/Livewire/Usuarios.php`
- [Layouts](https://github.com/saiv4568/sis-escolar/blob/main/resources/views/layouts/app.blade.php): blade layouts · App and guest shells plus shared navigation · `resources/views/layouts/app.blade.php`
- [Admin views](https://github.com/saiv4568/sis-escolar/blob/main/resources/views/livewire/base.blade.php): blade views · Blade templates backing the Livewire CRUD modules · `resources/views/livewire/base.blade.php`
- [Static assets](https://github.com/saiv4568/sis-escolar/blob/main/resources/js/app.js): frontend assets · Compiled JS/CSS and vendor assets for the Blade interface · `resources/js/app.js`

### Domain Layer

Eloquent models and database schema

- [School models](https://github.com/saiv4568/sis-escolar/blob/main/app/Models/Estudiante.php): eloquent models · Primary academic entities and user/role models · `app/Models/Estudiante.php`
- [Schema](https://github.com/saiv4568/sis-escolar/blob/main/database/migrations/2024_05_07_130519_create_estudiantes_table.php): migrations · Relational schema for auth, roles, and academic records · `database/migrations/2024_05_07_130519_create_estudiantes_table.php`

### Access Control

Authentication, roles, and request protection

- [Auth views](https://github.com/saiv4568/sis-escolar/blob/main/resources/views/auth/login.blade.php): blade views · Login, registration, password reset, verification, and profile pages · `resources/views/auth/login.blade.php`
- [Profile request](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Requests/ProfileUpdateRequest.php): form request · Validation and update rules for profile changes · `app/Http/Requests/ProfileUpdateRequest.php`
- [Middleware](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Middleware/Authenticate.php): http middleware · Auth, guest redirect, CSRF, signature, and request hygiene protections · `app/Http/Middleware/Authenticate.php`

### Reports

Report generation and printable academic outputs

- [Reportes UI](https://github.com/saiv4568/sis-escolar/blob/main/app/Livewire/Reportes.php): livewire component · Reporting interface that drives academic report views · `app/Livewire/Reportes.php`
- [Report views](https://github.com/saiv4568/sis-escolar/blob/main/resources/views/reportes/notasFinalesEstudiante.blade.php): blade views · Printable academic report templates · `resources/views/reportes/notasFinalesEstudiante.blade.php`

### Framework

Laravel bootstrapping and shared application services

- [HTTP kernel](https://github.com/saiv4568/sis-escolar/blob/main/app/Http/Kernel.php): framework bootstrap · Registers middleware stack and request pipeline · `app/Http/Kernel.php`
- [Providers](https://github.com/saiv4568/sis-escolar/blob/main/app/Providers/AppServiceProvider.php): service providers · Application bootstrapping and authorization/service wiring · `app/Providers/AppServiceProvider.php`
- [Localization](https://github.com/saiv4568/sis-escolar/blob/main/lang/en.json): translation files · English and Spanish strings for auth, validation, and UI text · `lang/en.json`

## Connections

- Web routes → Home: home · Routes homepage and authenticated landing pages
- Web routes → Profile: profile · Routes account profile actions
- Web routes → Users: users · Routes controller-driven user pages
- Web routes → Academic CRUD: admin screens · Dispatches most academic management screens to Livewire
- Web routes → Admin users: roles/users · Dispatches admin access-management screens
- Web routes → Reportes UI: reports · Dispatches reporting pages to Livewire
- Home → Layouts: renders · Uses the app layout for server-rendered pages
- Profile → Profile request: validates · Applies request validation for profile updates
- Profile → Auth views: renders · Uses auth/profile Blade templates
- Users → Admin views: renders · Uses Blade views for user management pages
- Livewire base → Admin views: renders · Provides the shared Livewire screen shell
- Academic CRUD → School models: CRUDs · Reads and writes the academic domain models
- Academic CRUD → Admin views: renders · Backs the interactive admin templates
- Admin users → School models: manages · Manages users and roles through the domain layer
- Admin users → Admin views: renders · Backs admin user-management templates
- Reportes UI → Report views: renders · Produces report-specific Blade outputs
- Reportes UI → School models: aggregates · Collects academic data for reports
- School models → Schema: persisted by · Models are backed by explicit relational migrations
- Middleware → HTTP kernel: registered in · Middleware stack is assembled in the HTTP kernel
- HTTP kernel → Web routes: protects · Applies the request pipeline before routing
- Providers → HTTP kernel: bootstraps · Framework service providers support request handling and auth setup
- Localization → Auth views: localizes · Provides translated UI and auth text
- Localization → Admin views: localizes · Provides translated labels and messages
- Static assets → Layouts: included by · Static assets are loaded by the Blade layouts
