Skip to main content

Attendance Layered Architecture

Summary​

Attendance uses pragmatic layers with inward-facing domain and application abstractions and outward infrastructure adapters.

Audience​

Developers, architects, and QA engineers.

Layer responsibilities​

Presentation authenticates, interprets request context, invokes scoped application services, and maps result categories to responses. Application services coordinate use cases and reference domain/repository ports. Domain code owns aggregates, invariants, events, and calculation. Infrastructure implements persistence and external adapters. Program.cs is the composition root.

The service is layered rather than separated into independent assemblies. Infrastructure can reference domain and application types; domain code does not reference EF Core or HTTP. Query composition crosses through repository-provided IQueryable ports, which is pragmatic but leaks persistence-query semantics into the application layer. This is a confirmed design trade-off, not a claim of strict clean-architecture isolation.

Source References​

  • microservices/src/attendance-service/Program.cs
  • microservices/src/attendance-service/Api/Endpoints.cs
  • microservices/src/attendance-service/Application/Common/Abstractions.cs
  • microservices/src/attendance-service/Domain/Repositories.cs
  • microservices/src/attendance-service/Infrastructure/Persistence.cs

See Also​

Keywords​

  • Attendance Service
  • Attendance Layered Architecture

Revision Information​

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly