How piyushdoorwar/domain-driven-design works
Project type and purpose
• This is a backend Web API built with .NET 8 following Domain-Driven Design (DDD) and Clean Architecture.
• It exposes REST endpoints (documented via Swagger) for managing books in a library, coordinating business logic (borrowing books) with a PostgreSQL database via Entity Framework Core.
File structure
• Top-level “ddd” project folder contains:
• Controllers (HTTP entry points)
• Application (Use-case handlers, e.g. BorrowBookHandler)
• Domain (Core entities, e.g. Book)
• Infrastructure (EF Core repository implementations, DbContext, migrations)
• Program.cs & Properties (application startup & configuration)
• appsettings.json (connection strings, environment config)
• Migrations (database schema history & seeding)
• This layered structure maps directly to the DDD/Clean-Architecture pattern.
README for additional insights
• Confirms technology stack: .NET 8, PostgreSQL, EF Core, Swagger.
• Emphasizes four layers: Domain, Application, Infrastructure, Controllers.
• Describes use cases (CRUD, BorrowBook use case) and configuration steps.