Architecture Explanation Skill
This skill provides a deep dive into the Approvio backend architecture. It defines the responsibilities and constraints of each layer to ensure system consistency and maintainability.
API Request Flow
Request -> Controllers -> Services -> Domain + External -> Response
Detailed Layer Documentation
Learn about each layer's specific responsibilities and architectural constraints:
- •Controllers Layer: HTTP handling and data mapping.
- •Services Layer: Orchestration and business processes.
- •Domain Layer: Pure business logic and entities.
- •External Layer: Database persistence and 3rd party integrations.
- •Worker Layer: Background job processing.
- •Utils Layer: Shared helper functions.
Architectural Principles
- •Dependency Inversion: Higher-level modules (Services) should not depend on lower-level modules (External). Both should depend on abstractions (Interfaces).
- •Functional Programming: Heavy use of
fp-tsfor error handling and composition. - •Clean Architecture: Separation of concerns between external interfaces, business logic, and data persistence.