How dlgkiet/soa_final works
Based on your provided file tree and README, this project is an online course management system that follows a Layered Architecture design. It uses a .NET Core backend (with ASP.NET Core, Entity Framework Core, and JWT authentication), a React + TypeScript frontend, and a PostgreSQL database. The project is split into distinct layers—Presentation, Service, Data Access, and Core—which are clearly represented in both the file structure and the README.
Main Components
• Frontend (Presentation Layer): Represented by the "frontend" folder that contains the React application. It handles UI, routing, and API calls.
• API/Backend (Presentation Layer for API): Contained in the "API" folder with controllers (e.g., AnswerController, AuthController) that receive incoming HTTP requests.
• Service Layer: Located in the "Service" folder and its associated interfaces & implementations. This layer processes business logic and acts as a bridge between the API/controllers and data layers.
• Data Access Layer: Found in the "DataAccess" directory. It encapsulates the database context (using PostgreSQL via Npgsql) and repository implementations (e.g., AnswerRepository, CourseRepository) as per the layered design.
• Core Layer: Contained in the "Core" directory. This holds the fundamental entities and models (like Admin, Answer, Course, etc.) used across the application.
Relationships and Interactions
• The Frontend (React) calls the API endpoints exposed by the backend controllers.
• The API layer passes requests to the Service Layer, which contains core business logic.
• The Service Layer interacts with the Data Access Layer, which in turn interacts with the PostgreSQL database using Entity Framework Core.
• The Core Layer is used across layers for shared entities and validation models.
• Incorporate external services like JWT Authentication and potential Docker containerization for deployment.
Architectural Patterns & Technologies
• Layered Architecture: Show clearly how each layer (Presentation → Service → Data Access → Core) is separated.
• MVC or RESTful design in API Controllers.
• Use of specific technologies:
• ASP.NET Core for the backend API.
• Entity Framework Core for data management.
• JWT for authentication.
• React, TypeScript, TailwindCSS for the frontend UI.
• PostgreSQL as the main database.