How giorgospap2/abacus-hiring works
Project Type and Purpose
• This is a full-stack, web-based hiring application.
• Frontend: Angular Single-Page App in the abacus_hiring.client folder.
• Backend: ASP.NET Core Web API solution (Abacus_Hiring.Server + supporting class-library projects) organized around a Clean Architecture + CQRS pattern.
• Purpose: Manage user sign-up, login, hiring applications (create, update, delete, view), generate PDFs, and send email notifications.
File Structure
• Top-level split:
• abacus_hiring.client — Angular code: models, services, pages, routing, pipes, assets.
• Abacus_Hiring.Server (.csproj, Controllers, Program.cs, settings) — the Web API entry point.
• Abacus_hiring.Server.Application — application layer: abstractions (IEmailService, IHiringApplicationRepository), commands, queries, handlers, dependency-injection glue.
• Abacus_hiring.Server.Domain — domain layer: entities (User, HiringApplication, EmailObligation, ApplicationStatus), DTOs for create/update/view models.
• Abacus_hiring.Server.Infrastructure — infrastructure layer: EF Core DbContext, Migrations, Repositories, BackgroundServices (EmailSendingService), external-service adapters (EmailService), dependency-injection.
• Additional files: HTTP-client scripts (.http), EF migration SQL, launchSettings, appsettings.json.
README
• It is currently a placeholder; it does not define architecture explicitly. We rely on code structure.
Main Components and Their Interactions
a. Frontend (Angular SPA)
– Runs in user’s browser.
– Hosts pages for Sign-Up, Log-In, User Home, Application Forms, File Upload, Email Forms.
– Communicates via HTTP/HTTPS to the Web API.
b. Web API (ASP.NET Core)
– Controllers (HiringController) receive HTTP requests (REST endpoints).
– Forward commands/queries to Application layer.
c. Application Layer (CQRS)
– Commands: e.g., CreateUser, InitializeHiringApplication, UpdateHiringApplication, CreatePDF, CreateEmailObligation.
– Queries: e.g., GetUserByCredentials, GetAllHiringApplications, GetHiringApplicationById/Token.
– Handlers implement business logic and orchestrate domain entities & infrastructure services.
d. Domain Layer
– Defines core entities, aggregates, and DTOs.
e. Infrastructure Layer
– Persistence: EF Core DbContext → SQL Database.
– Repositories implement IHiringApplicationRepository and IEmailService interfaces.
– BackgroundServices: EmailSendingService reads queued EmailObligation entities and sends via SMTP.
– MigrationUtility scripts for DB schema.
f. External Services
– SMTP Email provider (for outgoing mails).
– PDF library (invoked in CreatePDFHandler).
Architectural Patterns and Design Principles
• Clean Architecture / Onion: clear dependency rule (outer layers depend on inner).
• CQRS: separation of commands (state changes) and queries (data retrieval).
• Repository pattern: abstracts data access.
• Dependency-Injection (Microsoft.Extensions.DependencyInjection) in each project’s DependencyInjection.cs.