How guiriosoficial/tmb-challenge-api works
Project type and purpose
• This is a .NET 9 Back-End API for the “TMB-Challenge.”
• It exposes REST endpoints (OrdersController) and a WebSocket endpoint (WebSocketController).
• It persists data to a PostgreSQL database (via Entity Framework Core) and integrates with Azure Service Bus for asynchronous order processing.
File structure
• Top-level entry: Program.cs configures services and middleware.
• Config/ holds external service configurations (AzureServiceBus, JSON serializer).
• Controllers/ handle HTTP and WS requests.
• Data/ defines the EF Core ApplicationDbContext.
• Repositories/Interfaces + Implementations implement the Repository pattern, abstracting data access.
• Services/Interfaces + Implementations implement business logic.
• Workers/ contains background services (OrderWorker) consuming from Azure Service Bus.
• Migrations/ define the EF schema versions.
• appsettings.*.json + .env drive configuration.
• docker-compose.yml orchestrates API, DB, and migrator profiles.
Key architectural insights from README
• Layered architecture: Controllers → Services → Repositories → Database.
• Async processing with Azure Service Bus queue.
• Real-time updates via WebSocket.
• Supports Docker-based deployment with profiles for migrations and app.
Detail
• Configuration entry points (appsettings.json, .env).
• Don’t omit the Azure Service Bus integration and Worker component—they’re central to the async processing requirement.