# dicxie1/sigedo architecture

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

- Interactive diagram: https://gitdiagram.com/dicxie1/sigedo
- Repository: https://github.com/dicxie1/sigedo

## Overview

1. **Overall shape**
   - This is an **ASP.NET Core MVC** application called **Asistencia**, organized as a monolithic web app with clear layers: **Controllers → Services → Entity/DTO/ViewModel models → EF Core persistence → Razor Views/wwwroot**.
   - The app is centered on **academic management** rather than a generic CRUD site.

2. **Primary business domains**
   - The codebase is split into functional modules for **Courses, Students, Subjects, Careers, Classrooms, Schedules, Attendance, Syllabus, Grades/Gradebook, Reports, Dashboard, Accounts/Login, Attention records, and Gamification/Quiz**.
   - Each domain usually has its own controller, service logic, and dedicated Razor views/partials, which makes those modules the main diagram boxes.

3. **Presentation layer**
   - The browser interacts with the app through **Razor MVC views** under `Views/`.
   - Many views are decomposed into **partials** and script fragments, especially for course management, syllabus editing, attendance, classroom schedules, and modals.
   - The UI relies on **Bootstrap**, **FontAwesome**, **Select2**, **Summernote**, **DataTables**, and **Chart.js** via `wwwroot/lib`.

4. **Controller layer**
   - Controllers are the HTTP entry points for each subsystem, such as `CourseController`, `AttendanceController`, `AcademicTermController`, `ScheduleController`, `QuizController`, `StudentPlayController`, and `ReportsController`.
   - They appear to orchestrate request handling and pass data to views or JSON endpoints, while pushing business rules into the service layer.

5. **Service layer**
   - The main business logic lives in `Services/`, including `CourseService`, `AttendanceService`, `ScheduleService`, `SyllabusService`, `AcademicPeriodService`, `AcademicTermService`, `DashboardService`, `GamificationService`, and `GradeCalculatorService`.
   - This layer is the key boundary between UI and persistence: controllers call services, services coordinate EF Core queries and domain rules, and return DTOs/ViewModels for rendering.

6. **Persistence and data model**
   - `Data/ApplicationDbContext.cs` is the central EF Core context, with entity mappings/configurations in `Data/Configurations/`.
   - `DbSeeder.cs` indicates the app can bootstrap reference data.
   - The domain model is relational and academic-centric: `Student`, `Teacher`, `Course`, `Subject`, `Enrollment`, `Attendance`, `Schedule`, `SyllabusItem`, `StudentGrade`, `AcademicTerm`, `AcademicPeriod`, `Classroom`, and attention/gamification entities.

7. **Syllabus and academic-term workflow**
   - One of the core product areas is the **dynamic syllabus editor** described in the README.
   - The flow is: academic-term/course data is loaded, editable syllabus rows are manipulated in the browser, and the result is saved either **row-by-row** or in **batch**.
   - Supporting DTOs and view models such as `SyllabusDto`, `SyllabusPreviewRowDto`, and `TermDto` show that the UI is driven by structured projections rather than raw entities.

8. **Document import/export subsystem**
   - The `Documents/` folder contains specialized document-processing logic, especially for **attendance documents** and **Excel gradebook exports**.
   - The README says Word `.docx` import is done via **OpenXML**, with a preview step before persistence.
   - This subsystem is a separate boundary from the normal MVC flow: it transforms external document formats into internal DTOs/models, then hands them to application services.

9. **Attendance, attention, and reporting**
   - Attendance is a full workflow with enums/status helpers, document generation, and view models for reports.
   - “Attention” appears to be a second student-follow-up process, with records/participants plus notification-oriented DTOs and views.
   - Reporting is split between course-level and broader academic dashboards, including `CourseReportController`, `DashboardController`, and `ReportsController`, with computed summaries rather than simple entity listing.

10. **Gamification and real-time quiz**
   - The repository includes a **quiz/game subsystem** with `Quiz`, `GameSession`, `GamePlayer`, and `Question` models.
   - `Hubs/QuizHub.cs` indicates **SignalR-style real-time communication** for live quiz/student-play interactions.
   - The `StudentPlay` views and controller form a separate user experience from the academic admin screens, likely for synchronous classroom participation.

11. **Identity and user-facing access**
   - `ApplicationUser`, `LoginController`, `AccountController`, and account views show there is a user/authentication layer.
   - The app likely supports role-sensitive flows such as teacher/admin/student interactions, though the repo is structured as a single MVC application rather than separate services.

12. **Frontend asset strategy**
   - Static assets are bundled in `wwwroot/`, with custom JavaScript under `wwwroot/js` and many third-party libraries checked in locally.
   - Some areas lean heavily on client-side interaction, especially syllabus editing, attendance modals, course administration, calendars, and quiz/game screens.
   - `Views/*/_Scripts.cshtml` and similar partials suggest scripts are assembled per module rather than globally.

13. **Architecture boundaries to draw**
   - A good diagram would show four main boundaries: **Browser/UI**, **ASP.NET Core MVC app**, **EF Core + SQL Server persistence**, and **external document/real-time services**.
   - Inside the MVC app, the most important internal separations are **controllers**, **services**, **domain models/DTOs/view models**, and **specialized infrastructure** such as document generators and the quiz hub.

14. **Repo character**
   - This is not a microservice system; it is a **single cohesive educational management platform** with multiple feature modules sharing one database, one MVC host, and one shared domain model.

Main entry points: [`Controllers`](https://github.com/dicxie1/sigedo/tree/main/Controllers) (Controllers), [`Views`](https://github.com/dicxie1/sigedo/tree/main/Views) (Razor Views), [`Services`](https://github.com/dicxie1/sigedo/tree/main/Services) (Services), [`Data/ApplicationDbContext.cs`](https://github.com/dicxie1/sigedo/blob/main/Data/ApplicationDbContext.cs) (Db Context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser UI"]
  node_views["Razor Views<br/>presentation"]
  node_assets["Web Assets<br/>static assets"]
end

subgraph group_mvc["ASP.NET Core MVC"]
  node_program{{"App Host<br/>startup<br/>[Program.cs]"}}
  node_controllers["Controllers"]
  node_services["Services"]
  node_models[("Domain Models<br/>entities and dtos")]
  node_course["Course Module<br/>academic module"]
  node_attendance["Attendance Module<br/>workflow module"]
  node_schedule["Schedule Module<br/>timetable module"]
  node_syllabus["Syllabus Module<br/>curriculum module"]
  node_gradebook["Gradebook Module<br/>grading module"]
  node_reports["Reports Module<br/>reporting module"]
  node_play{{"Quiz & Play<br/>realtime learning"}}
  node_accounts["Accounts<br/>identity module"]
end

subgraph group_data["Persistence"]
  node_dbcontext[("Db Context<br/>ef core context")]
  node_seeder["Db Seeder<br/>seed data<br/>[DbSeeder.cs]"]
  node_mappings["Entity Configs<br/>mapping config"]
end

subgraph group_infra["Specialized Infra"]
  node_documents["Documents<br/>import-export"]
  node_hub{{"Quiz Hub<br/>signalr hub<br/>[QuizHub.cs]"}}
end

node_program -->|"routes to"| node_controllers
node_program -->|"wires"| node_services
node_program -->|"configures"| node_dbcontext
node_controllers -->|"contains"| node_course
node_controllers -->|"contains"| node_attendance
node_controllers -->|"contains"| node_schedule
node_controllers -->|"contains"| node_syllabus
node_controllers -->|"contains"| node_gradebook
node_controllers -->|"contains"| node_reports
node_controllers -->|"contains"| node_play
node_controllers -->|"contains"| node_accounts
node_course -->|"uses"| node_services
node_attendance -->|"uses"| node_services
node_schedule -->|"uses"| node_services
node_syllabus -->|"uses"| node_services
node_gradebook -->|"uses"| node_services
node_reports -->|"uses"| node_services
node_play -->|"uses"| node_services
node_services -->|"queries"| node_dbcontext
node_dbcontext -->|"applies"| node_mappings
node_dbcontext -.->|"initialized by"| node_seeder
node_controllers -->|"binds"| node_models
node_services -->|"returns"| node_models
node_views -->|"renders"| node_course
node_views -->|"renders"| node_attendance
node_views -->|"renders"| node_schedule
node_views -->|"renders"| node_syllabus
node_views -->|"renders"| node_gradebook
node_views -->|"renders"| node_reports
node_views -->|"renders"| node_play
node_views -->|"renders"| node_accounts
node_assets -->|"supports"| node_views
node_documents -->|"imports"| node_attendance
node_documents -->|"exports"| node_gradebook
node_hub -->|"streams"| node_play

click node_views "https://github.com/dicxie1/sigedo/tree/main/Views"
click node_assets "https://github.com/dicxie1/sigedo/tree/main/wwwroot"
click node_program "https://github.com/dicxie1/sigedo/blob/main/Program.cs"
click node_controllers "https://github.com/dicxie1/sigedo/tree/main/Controllers"
click node_services "https://github.com/dicxie1/sigedo/tree/main/Services"
click node_models "https://github.com/dicxie1/sigedo/tree/main/Models"
click node_course "https://github.com/dicxie1/sigedo/blob/main/Controllers/CourseController.cs"
click node_attendance "https://github.com/dicxie1/sigedo/blob/main/Controllers/AttendanceController.cs"
click node_schedule "https://github.com/dicxie1/sigedo/blob/main/Controllers/ScheduleController.cs"
click node_syllabus "https://github.com/dicxie1/sigedo/blob/main/Controllers/SyllabusController.cs"
click node_gradebook "https://github.com/dicxie1/sigedo/blob/main/Controllers/GradebookController.cs"
click node_reports "https://github.com/dicxie1/sigedo/blob/main/Controllers/ReportsController.cs"
click node_play "https://github.com/dicxie1/sigedo/blob/main/Controllers/StudentPlayController.cs"
click node_accounts "https://github.com/dicxie1/sigedo/blob/main/Controllers/AccountController.cs"
click node_dbcontext "https://github.com/dicxie1/sigedo/blob/main/Data/ApplicationDbContext.cs"
click node_seeder "https://github.com/dicxie1/sigedo/blob/main/Data/DbSeeder.cs"
click node_mappings "https://github.com/dicxie1/sigedo/tree/main/Data/Configurations"
click node_documents "https://github.com/dicxie1/sigedo/tree/main/Documents"
click node_hub "https://github.com/dicxie1/sigedo/blob/main/Hubs/QuizHub.cs"

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_views,node_assets toneBlue
class node_program,node_controllers,node_services,node_models,node_course,node_attendance,node_schedule,node_syllabus,node_gradebook,node_reports,node_play,node_accounts toneAmber
class node_dbcontext,node_seeder,node_mappings toneMint
class node_documents,node_hub toneRose
```

## Components

### Browser UI

Razor views, partials, and client-side interaction in the browser

- [Razor Views](https://github.com/dicxie1/sigedo/tree/main/Views): presentation · MVC pages, partials, and view scripts for each module · `Views`
- [Web Assets](https://github.com/dicxie1/sigedo/tree/main/wwwroot): static assets · CSS, JavaScript, libraries, images, and sounds · `wwwroot`

### ASP.NET Core MVC

HTTP entry points, application services, and shared domain models

- [App Host](https://github.com/dicxie1/sigedo/blob/main/Program.cs): startup · ASP.NET Core application bootstrap and middleware pipeline · `Program.cs`
- [Controllers](https://github.com/dicxie1/sigedo/tree/main/Controllers): web controllers · HTTP entry points for academic, account, reporting, and play flows · `Controllers`
- [Services](https://github.com/dicxie1/sigedo/tree/main/Services): business services · Core business rules for courses, attendance, schedules, syllabus, gamification, and reports · `Services`
- [Domain Models](https://github.com/dicxie1/sigedo/tree/main/Models): entities and dtos · Academic entities, DTOs, enums, and view models shared across the app · `Models`
- [Course Module](https://github.com/dicxie1/sigedo/blob/main/Controllers/CourseController.cs): academic module · Course browsing, registration, details, syllabus, assessments, and attendance tabs · `Controllers/CourseController.cs`
- [Attendance Module](https://github.com/dicxie1/sigedo/blob/main/Controllers/AttendanceController.cs): workflow module · Attendance capture, document-backed reports, and status handling · `Controllers/AttendanceController.cs`
- [Schedule Module](https://github.com/dicxie1/sigedo/blob/main/Controllers/ScheduleController.cs): timetable module · Classroom and weekly schedule management · `Controllers/ScheduleController.cs`
- [Syllabus Module](https://github.com/dicxie1/sigedo/blob/main/Controllers/SyllabusController.cs): curriculum module · Dynamic syllabus editing and preview workflows · `Controllers/SyllabusController.cs`
- [Gradebook Module](https://github.com/dicxie1/sigedo/blob/main/Controllers/GradebookController.cs): grading module · Grade calculation, gradebook views, and export-oriented flows · `Controllers/GradebookController.cs`
- [Reports Module](https://github.com/dicxie1/sigedo/blob/main/Controllers/ReportsController.cs): reporting module · Course reports, dashboard summaries, and computed analytics · `Controllers/ReportsController.cs`
- [Quiz & Play](https://github.com/dicxie1/sigedo/blob/main/Controllers/StudentPlayController.cs): realtime learning · Gamification, live quiz hosting, and student play experience · `Controllers/StudentPlayController.cs`
- [Accounts](https://github.com/dicxie1/sigedo/blob/main/Controllers/AccountController.cs): identity module · Login, profile, and user-facing access flows · `Controllers/AccountController.cs`

### Persistence

EF Core context, entity mappings, and seeded relational data

- [Db Context](https://github.com/dicxie1/sigedo/blob/main/Data/ApplicationDbContext.cs): ef core context · ApplicationDbContext and entity configuration boundary · `Data/ApplicationDbContext.cs`
- [Db Seeder](https://github.com/dicxie1/sigedo/blob/main/Data/DbSeeder.cs): seed data · Bootstraps reference and demo data · `Data/DbSeeder.cs`
- [Entity Configs](https://github.com/dicxie1/sigedo/tree/main/Data/Configurations): mapping config · EF Core configuration classes for domain persistence · `Data/Configurations`

### Specialized Infra

Document processing, realtime quiz hub, and static assets

- [Documents](https://github.com/dicxie1/sigedo/tree/main/Documents): import-export · Word attendance documents and Excel gradebook export services · `Documents`
- [Quiz Hub](https://github.com/dicxie1/sigedo/blob/main/Hubs/QuizHub.cs): signalr hub · Realtime communication for live quiz sessions · `Hubs/QuizHub.cs`

## Connections

- App Host → Controllers: routes to · Registers MVC endpoints and dispatches requests
- App Host → Services: wires · Registers application services and dependencies
- App Host → Db Context: configures · Sets up EF Core persistence and database access
- Controllers → Course Module: contains · Course-related HTTP actions
- Controllers → Attendance Module: contains · Attendance-related HTTP actions
- Controllers → Schedule Module: contains · Schedule-related HTTP actions
- Controllers → Syllabus Module: contains · Syllabus-related HTTP actions
- Controllers → Gradebook Module: contains · Gradebook-related HTTP actions
- Controllers → Reports Module: contains · Reporting and dashboard actions
- Controllers → Quiz & Play: contains · Quiz, gamification, and student play actions
- Controllers → Accounts: contains · Authentication and profile actions
- Course Module → Services: uses · Delegates business rules and data shaping
- Attendance Module → Services: uses · Delegates attendance workflows and summaries
- Schedule Module → Services: uses · Delegates timetable logic
- Syllabus Module → Services: uses · Delegates syllabus editing and preview logic
- Gradebook Module → Services: uses · Delegates grade calculation and export preparation
- Reports Module → Services: uses · Delegates report composition
- Quiz & Play → Services: uses · Delegates game session and player logic
- Services → Db Context: queries · Reads and writes academic entities through EF Core
- Db Context → Entity Configs: applies · Uses entity configuration classes
- Db Context → Db Seeder: initialized by · Loads seed/reference data at startup or setup
- Controllers → Domain Models: binds · Uses entities, DTOs, and view models for requests and responses
- Services → Domain Models: returns · Produces structured DTOs and view models
- Razor Views → Course Module: renders · Course pages and partials
- Razor Views → Attendance Module: renders · Attendance pages and partials
- Razor Views → Schedule Module: renders · Schedule pages and partials
- Razor Views → Syllabus Module: renders · Syllabus editing UI
- Razor Views → Gradebook Module: renders · Gradebook UI and scripts
- Razor Views → Reports Module: renders · Reports and dashboard pages
- Razor Views → Quiz & Play: renders · Quiz host and student play screens
- Razor Views → Accounts: renders · Login and profile screens
- Web Assets → Razor Views: supports · Client-side styling, scripting, and UI libraries
- Documents → Attendance Module: imports · Transforms attendance documents into app data
- Documents → Gradebook Module: exports · Produces Excel gradebook outputs
- Quiz Hub → Quiz & Play: streams · Supports live quiz session updates
