How pcdaco/pcdaco-be works
Project Type & Purpose
• This is a backend API project for a full-stack application that connects car owners and drivers.
• It implements Clean Architecture with separate layers for Presentation (API), Application (UseCases/Business Logic), Domain, Infrastructure (services like email, payment, and encryption), and Persistence.
• That the overall flow supports features such as user management, car listings, booking transactions, contract management, and integrated third-party services.
Main Components
• Client: Mobile/Web clients (act as external systems).
• Presentation/API Layer: Contains the API endpoints (controllers) and middleware (e.g., authentication, exception handling).
• Application (UseCases) Layer: Encompasses business logic, including command/queries and background jobs for asynchronous processing.
• Domain Layer: The core of the system with domain entities (users, cars, bookings, etc.) and business rules.
• Infrastructure Layer: Implements services such as email, PayOS, encryption, and media handling.
• Persistence Layer: The database layer (using EF Core) and migrations for data storage.
• External Services: Integration points for Payment Gateways, SMS/Email providers, GPS tracking, and Cloud Media services.
Relationships & Interactions
• API Endpoints interact with multiple middleware components that manage request preprocessing and error handling.
• The Application layer consumes the business logic (commands and queries) and otherwise interacts with both the domain and infrastructure.
• The Infrastructure layer connects outward to external services such as the Payment Gateway and Cloud Media, and inward to the Domain and Application layers.
• Finally, the Persistence layer sits at the bottom, serving as the data-access implementation for saving domain entities.
Incorporate Architectural Patterns & Technologies
• Mention important technologies and frameworks (ASP.NET Core Web API, Entity Framework Core, .NET SDK, SQL Server/PostgreSQL).
• For background jobs, indicate microservices or scheduled job handling (booking expiration, reminders, etc.) located within the Application layer.
• Out the integration points with external services such as payment gateways and GPS tracking.