How laihuyha/angularnetcorewebapp works
Project Type and Purpose
• This is a full-stack e-commerce web application.
• Frontend: Angular single-page app under the client/ folder.
• Backend API: ASP.NET Core Web API in the API/ project, serving both JSON endpoints and static Angular files from wwwroot/.
• Domain & Business Logic: Defined in Core/ (entities, DTOs, service interfaces, specifications).
• Data & Infrastructure: In Infrastructure/ (EF Core DbContexts, repositories, Unit of Work, migrations, seed data).
• Supporting services via Docker Compose: Redis (caching), Redis-Commander (UI), and likely PostgreSQL for Identity.
File-Structure & Architectural Patterns
• Top-level layers correspond to a Clean/Onion Architecture:
• client/ (Presentation/UI)
• API/ (API Gateway / Presentation + Middleware + Authentication)
• Core/ (Domain & Application Service Interfaces)
• Infrastructure/ (Data Access, EF Core configurations, UnitOfWork, external integrations)
• The README emphasizes the Unit of Work pattern for transactional consistency across multiple repositories.
• Configuration/build scripts include Docker Compose for local dev, GitHub Actions workflows for CI (.NET, Node.js), and Angular CLI config.
Key Insights from README
• All database operations are orchestrated via a UnitOfWork that aggregates multiple generic repositories to enforce single‐transaction commits/rollbacks.
• HTTPS is enforced for the Angular dev server via mkcert.
• Redis is used for caching via ResponseCacheServices.
• Stripe is the primary payment provider, with plans to add PayPal/Braintree/MoMo in the future.