How wolfowi/coriander-backend works
Project Type & Purpose
• This is a single-service, RESTful backend API (“CoriCore API”) for a Human Resources management system.
• Built with ASP.NET Core 9.0, EF Core, and PostgreSQL, exposing endpoints for authentication, user/employee management, leave, equipment, meetings, performance reviews, and “gatherings.”
File Structure & Patterns
• Layered, monolithic architecture with clear separation of concerns:
• Controllers/ – HTTP entry points (REST endpoints)
• Services/ – Business logic implementations
• Interfaces/ – Service contracts (dependency‐injection abstractions)
• DTOs/ – Input/output models for API surface
• Models/ – EF Core entity classes
• Data/ – DbContext and database configuration
• Migrations/ – EF Core schema evolution scripts
• wwwroot/ – Static assets & uploaded files
• Program.cs & appsettings.json – Startup, DI registration, middleware pipeline
• Integration/config: Dockerfile, .github/workflows, .env templates.
• Testing harness: CoriCore.Tests covers controller, service, and database tests.
Key Architectural Insights from README
• Layered design (Presentation → Business → Data).
• Technology ecosystem: JWT, Google OAuth, BCrypt, MailKit, RestSharp, Cloudinary.
• External integrations (email, OAuth provider, image storage).
• Containerization (Docker), CI/CD (GitHub Actions → Render).
• Swagger/OpenAPI for API documentation.
Detailed Elements to Capture
• Authentication flow (JWT issuance & verification).
• Service interface → implementation relationships.
• EF Core migrations triggering schema updates.
• External callouts: Google OAuth token endpoint, SMTP host, Cloudinary API.
• Docker multi-stage build flow: build → publish → runtime image.
• CI/CD triggers and automatic deployment.