How dinhnhat2504/doanwebthitracnghiem works
Project type and purpose
• This is a full-stack, monolithic web application built on ASP.NET Core MVC.
• Purpose: an online testing platform with three user roles (Admin, Teacher, Student) plus general public pages (login, register, home).
File structure
• Top-level directories
• Areas/Admin, Areas/Teacher, Areas/Student – each holds MVC Controllers, Views, and Models for that role’s UI.
• Controllers – global controllers for home and user management.
• Views/Shared, Views/Home, Views/Users – common layouts, partials, and root-level UI.
• Models – EF Core entity classes that map to database tables.
• Data – AppDbContext for DbSets and EF Core configuration.
• Migrations – EF Core schema migration files.
• Repositories + Interfaces (I…Repository) – data access layer using the Repository pattern.
• Services – business-logic/services layer (e.g., ChatbotService, EmailService).
• Middleware – custom authorization middleware for each role.
• ViewModel – DTOs passed between Controllers and Views.
• wwwroot – static assets (CSS, JS, images, Tailwind, Bootstrap, jQuery).
Key architecture insights from README and code
• Uses layered MVC architecture: Presentation (Views + Controllers), Business (Services), Data (Repositories + EF Core + Database).
• Dependency Injection is configured in Program.cs.
• Supports role-based authorization via custom middleware.
• Integrates external services: email sending, AI/chatbot.
• Static files served from wwwroot; UI styled with Bootstrap and Tailwind CSS, dynamic behavior via jQuery.