عن المشروع

This repository provides a production-shaped TypeScript backend boilerplate designed to accelerate development by handling infrastructure setup and enforcing architectural discipline. Built on Fastify, Awilix, Prisma, and BullMQ, it organizes code into strict clean architecture layers (Domain, Application, Infrastructure, Presentation, Composition Root) with dependencies pointing inward. Crucially, these layer boundaries are enforced automatically in CI using dependency-cruiser, preventing architectural drift. Key features include: - **HTTP & API**: Fastify 5 with Zod validation, versioned endpoints, Swagger UI, and uniform error handling. - **Auth & Security**: Argon2 hashing, JWT access/refresh tokens, email verification, password reset, and compile-time permission catalogs for RBAC. - **Persistence**: Prisma with MariaDB, implementing a Unit of Work pattern for transactions. - **Jobs & Events**: Transactional outbox pattern, Redis-backed BullMQ queues, and a dedicated worker process. - **Observability**: Integrated Pino logging with correlation IDs, Prometheus metrics, OpenTelemetry tracing, and a pre-configured Grafana/Loki/Tempo stack. - **Quality**: 100% coverage requirements for domain/application layers, ESLint/Prettier, and Testcontainers for integration testing. The project ships with a working user/auth/RBAC vertical slice to serve as a reference for adding new features. It supports easy renaming via a single `APP_NAME` environment variable and includes comprehensive Docker Compose configurations for local development.