How abuki43/blogwebsitebackend works
Main Components
• API Endpoints: Group the different endpoints into logical categories (Articles, Authentication, Comments, Profiles) as they are implemented in the Endpoints folder.
• Data Access Layer: Reflect the Models and Dtos used to represent domain objects and data transfers. Also, include the use of Entity Framework Core and the SQLite database.
• Services: Show the JwtService and any other business logic that interacts with the endpoints.
• Configuration: Include appsettings.json files and the Program.cs bootstrap which links all components.
• External Interfaces: Incorporate the REST testing interface (using the request.http file) and the API documentation (api-documentation.md) as external artifacts that assist in development and troubleshooting.
Relationships and Interactions
• The JWT Authentication flow should be highlighted to illustrate how the AuthEndpoints utilize JwtService.
• Flow from endpoints to the database via Entity Framework Core – annotate with migration processes when showing schema evolution.
• Make clear the separation of concerns: routes handling HTTP requests vs. services performing token validation and business logic vs. data models handling persistence.
Architectural Patterns & Design Principles
• That the project follows a layered architecture pattern (API layer, Service/Business layer, Data layer).
• Separation between controllers (Endpoints) and service logic.
• If applicable, add notes on the MVC style present in ASP.NET Core and how models and DTOs differ: Models represent the database entities, and DTOs facilitate communication via the API.
• Mention dependency injection – typically seen in ASP.NET Core for services like JwtService.
Technologies, Frameworks, and Libraries
• ASP.NET Core 8.0, which powers the entire application.
• Entity Framework Core as the ORM managing interactions with SQLite.
• SQLite as the chosen database.
• JWT for authentication.
• REST Client integration (via the request.http file) as a testing tool.
• Use of configuration files (appsettings.Development.json and appsettings.json) which influence how the system is started.