Backend Architecture¶
The backend of Atlas ERP is a monolithic REST/GraphQL API built with NestJS 11. It is responsible for handling all business logic, database interactions, authentication, and background job processing.
Core Design Principles¶
- Modular Architecture: The application is divided into feature-specific modules (e.g.,
FinanceModule,HrModule,ProjectModule). This makes the codebase easier to navigate and allows teams to work independently. - Dependency Injection: NestJS's robust DI container is used extensively to keep code testable and loosely coupled.
- Data Transfer Objects (DTOs): All incoming request bodies and query parameters are strictly validated using DTO classes decorated with
class-validator. - Prisma ORM: Database access is abstracted through Prisma, providing type-safe queries.
In this section¶
- Project Structure — How the
apps/apidirectory is organized. - Modules — Deep dives into specific business domains (e.g., HR Module, Finance Module).
- Guards & Middleware — How requests are secured and transformed.
- Error Handling — Standardized error responses across the API.
- Testing — Unit and End-to-End testing strategies for the backend.