How systemsscalability/epetparadise works
Main Components
• Presentation Layer:
– Represented by the “EPP.Presentation” project.
– Contains Controllers (for Entities, Management, Transactions) that expose REST endpoints.
– Includes configuration files and launch settings for local development.
• Application Layer:
– Found in the “EPP.Application” project.
– Contains DTOs, Services (grouped into Entities, Management, and Transactions), and Validation routines.
– Acts as the business logic layer that coordinates requests between the presentation layer and the domain/data layers.
• Domain Layer:
– Located in the “EPP.Domain” project.
– Holds the core domain models (Entities like Customer, Administrator, Product, Provider, as well as Management and Transaction models).
– Represents the core business rules and entities.
• Infrastructure Layer:
– Provided by the “EPP.Infrastructure” project.
– Contains the DataContext, Migrations, and any data access logic (typically using Entity Framework Core).
– Responsible for interacting with the database.
• Database:
– Although not visible directly in the code, the README instructs to “run the database up with Docker.” This indicates that a PostgreSQL or similar DB is being containerized (often along with Pgadmin for management via the docker-compose command).
• Containerization & Deployment:
– The project includes a “Dockerfile” and “docker-compose.yml” which build the API container and set up the database service.
– “deployment.yaml” describes the Kubernetes Deployment and Service configuration for container orchestration.
Relationships and Data Flow
• Clients (could be external consumers or front-end apps) interact with the API exposed by the Presentation layer.
• The Presentation layer’s controllers call the Application services to process incoming requests.
• Application services use domain models (from the Domain layer) and interact with the Infrastructure layer for database operations.
• The Infrastructure layer handles the data persistence, connecting to the external database service.
• On the deployment side, the API container (running this backend) is orchestrated by Kubernetes which ensures availability and horizontal scaling.
Architectural Patterns and Technologies
• Layered/Clean Architecture:
• Containerization & Microservices Deployment:
– Show how the Docker image (built from the Dockerfile) is deployed as a container in a Kubernetes Pod.
– Include details like the Kubernetes Deployment (with replicas) and Service (for load balancing).
– Include mention of Horizontal Pod Autoscaler (HPA) as described in the README for dynamic scaling.
• Data Persistence:
– Indicate usage of Entity Framework Core (in Infrastructure) and integration with a containerized database.
• DevOps/CI-CD Aspects: