How abdessamadberahhou/courierapi works
Project Type and Purpose
• This is a standalone ASP.NET Core Web API (“CourierAPI”) built on .NET 5.0.
• It exposes endpoints for user authentication, courier management, file uploads, and user administration.
File Structure
• Top-level folders:
• Controllers – HTTP entry points (AuthenticationController, CourierController, UserController, WeatherForecastController)
• Services – business-logic and helper services (authentication, token generation/validation, repositories, password hashing)
• Models – domain entities, EF Core DbContexts, request/response DTOs
• Migrations – EF Core schema migrations and snapshots
• wwwroot/Upload – static file host for uploaded files
• Startup.cs & Program.cs – host configuration and DI setup
• appsettings*.json – configuration for connection strings, auth settings, environments
• Patterns: layered architecture (Controller → Service → Repository → EF Core DbContext → Database), repository pattern, service layer, DI container
README
• Minimal, but name “CourierAPI” confirms it’s a RESTful backend for courier operations.
Details to Capture
• Startup/Program bootstrap → registers middleware and services
• Controllers wired into services via DI
• Each service’s dependency on one or more repositories or helpers (token generator, validator, hasher)
• EF Core migrations managing database schema
• appsettings configuration feeding into AuthConfiguartion and DbContext options