How ghost0140/educa works
1. Overall architecture
- This is a single ASP.NET MVC 5 monolith built on .NET Framework 4.8.
- The application is server-rendered: browser requests hit MVC controllers, which return Razor views backed by models and view models.
- Persistence is handled through Entity Framework 6 against SQL Server.
2. Functional subsystems
- The app is organized around academic administration:
- Authentication / access via AccountController
- Admin management via AdminController
- Teacher-facing workflows via DocenteController
- Public/home pages via HomeController
- The UI and routes reflect these bounded areas, with separate view folders for each feature set.
3. Presentation layer
- Views are in Views/ and are grouped by controller, with shared layout in Views/Shared/_Layout.cshtml.
- The app uses Razor views plus Bootstrap 5 styling and jQuery validation scripts.
- Important screens include course management, teacher management, attendance registration, login, and reports.
4. Controller responsibilities
- Controllers act as the main orchestration layer:
- AccountController handles login.
- AdminController exposes management UIs for courses and teachers plus reporting.
- DocenteController exposes teacher-specific pages such as assigned courses and attendance entry.
- HomeController serves generic landing and informational pages.
- The controller/view pairing is tight and conventional for MVC 5.
5. Domain model
- Core business entities live under Models/:
- People and roles: Usuario, AdministradorSistema, Docente, Estudiante
- Academic structure: Curso, Seccion, Turno, Matricula
- Operational records: AsignacionCurso, AsistenciaDocente, AsistenciaEstudiante, Notas
- These objects define the main data boundaries of the system.
6. View models as UI contracts
- Models/ViewModels/ contains forms and page-specific contracts such as:
- course create/edit and course info views
- docente create/edit views
- attendance and report views
- assignment and notes forms
- This indicates a separation between persistent entities and screen-specific data shapes, especially for create/edit/report workflows.
7. Data access layer
- Models/DB/EduControlDB.cs is the EF database context, the main gateway to SQL Server.
- Repositories under Models/DB/Repositories/ encapsulate data operations for specific areas:
- UsuarioRepository
- AsignacionCursoRepository
- AsistenciaDocenteRepository
- The repo structure suggests a layered design where controllers call repositories instead of working directly with EF everywhere.
8. Database boundary
- DB_EDUCA_EFSRT4_FINAL.sql is the authoritative SQL script for schema creation and initial data.
- The README says the database name is DB_EDUCA, so SQL Server is the only external persistence service in the architecture.
- The application’s connection string is configured in Web.config.
9. Cross-cutting configuration
- App_Start/RouteConfig.cs defines routing, BundleConfig.cs handles asset bundling, and FilterConfig.cs registers MVC filters.
- filters/NoCacheAttribute.cs is a cross-cutting concern likely used to prevent sensitive pages from being cached in the browser.
- Global.asax and Global.asax.cs are the entry points for application startup.
10. Static assets and client-side support
- The Content/ and Scripts/ folders contain the UI dependencies: Bootstrap CSS/JS, jQuery, validation, and site-specific styling.
- Images are stored under Content/Images/, split into course and docente assets.
- This is a traditional server-side MVC app with light client-side behavior rather than a SPA.
11. Typical request/data flow
- A user opens a route in the browser.
- MVC routing sends it to the relevant controller action.
- The action reads or writes data through a repository and the EF context.
- Data is mapped into a domain model or view model.
- The controller returns a Razor view, which renders HTML using the shared layout and Bootstrap styles.
12. Deployment/runtime shape
- The project is meant to run in IIS Express / IIS from Visual Studio, as described in the README.
- NuGet packages are restored locally; build outputs are not committed.
- The repository is therefore a classic Visual Studio web application with source, SQL bootstrap script, and documentation all in one solution.
Main entry points: Controllers Controllers · Models Models · App_Start App Start · Views Views
Components 22
Presentation
MVC controllers, Razor views, and static UI assets
- Controllers · Main request orchestration for login, admin, teacher, and home flows
EducaEFRT/Controllers - Account · Handles login and authentication UI
EducaEFRT/Controllers/AccountController.cs - Admin · Manages courses, teachers, and reports
EducaEFRT/Controllers/AdminController.cs - Docente · Teacher-facing workflows for assigned courses and attendance
EducaEFRT/Controllers/DocenteController.cs - Home · Public pages and site landing routes
EducaEFRT/Controllers/HomeController.cs - Views · Server-rendered Razor pages grouped by controller
EducaEFRT/Views - Layout · Common page shell and site chrome
EducaEFRT/Views/Shared/_Layout.cshtml - Admin Views · Course, teacher, and reporting screens
EducaEFRT/Views/Admin - Teacher Views · Assigned courses and attendance entry pages
EducaEFRT/Views/Docente - Login View · Login form and access entry page
EducaEFRT/Views/Account/Login.cshtml - Assets · Bootstrap, jQuery, site styles, and images
EducaEFRT/Content
Domain
Core academic entities and view models
- Models · Academic people, structure, and operational records
EducaEFRT/Models - People · Usuario, AdministradorSistema, Docente, Estudiante
EducaEFRT/Models/Usuario.cs - Academic · Curso, Seccion, Turno, Matricula
EducaEFRT/Models/Curso.cs - Records · AsignacionCurso, AsistenciaDocente, AsistenciaEstudiante, Notas
EducaEFRT/Models/AsignacionCurso.cs - ViewModels · Screen-specific forms and report contracts
EducaEFRT/Models/ViewModels
Data
EF context, repositories, and SQL boundary
- EF Context · Main gateway to SQL Server persistence
EducaEFRT/Models/DB/EduControlDB.cs - Repositories · Persistence abstractions for users, assignments, and attendance
EducaEFRT/Models/DB/Repositories - SQL Script · Schema and seed data for DB_EDUCA
DB_EDUCA_EFSRT4_FINAL.sql
Config
Application startup and cross-cutting MVC configuration
- App Start · Routing, bundling, and filters registration
EducaEFRT/App_Start - Global.asax · Application entry point and startup hook
EducaEFRT/Global.asax - NoCache · Cross-cutting no-cache behavior for sensitive pages
EducaEFRT/filters/NoCacheAttribute.cs
Connections 22
- Controllers → Account: contains · MVC controller boundary
- Controllers → Admin: contains · MVC controller boundary
- Controllers → Docente: contains · MVC controller boundary
- Controllers → Home: contains · MVC controller boundary
- Account → Login View: renders · Login screen
- Admin → Admin Views: renders · Admin management screens
- Docente → Teacher Views: renders · Teacher workflow screens
- Home → Views: renders · Public Razor pages
- Views → Layout: uses · Common layout shell
- Views → Assets: uses · Bootstrap, jQuery, and site CSS
- Controllers → ViewModels: binds · Controller actions exchange screen contracts
- ViewModels → Models: maps to · Forms and reports are shaped from domain data
- Models → People: includes · Identity and role entities
- Models → Academic: includes · Academic structure entities
- Models → Records: includes · Attendance, assignment, and grades
- Controllers → Repositories: queries · Controllers use repositories for persistence
- Repositories → EF Context: wraps · Repository operations run through EF context
- EF Context → SQL Script: persists to · SQL Server schema and seed source
- App Start → Global.asax: boots via · Application startup wiring
- App Start → NoCache: registers · MVC cross-cutting filter setup
- App Start → Controllers: routes to · Route configuration directs requests to controllers
- Global.asax → App Start: initializes · Startup pipeline