How v-checha/nestjs-template works
This repository is a NestJS backend template with a Refine/React admin panel. Its main workflow is a client request entering a controller, being dispatched through CQRS, and supporting identity, authorization, user/role management, or file operations. The README also documents email verification, password reset, i18n, and health monitoring. Paths and capabilities are grounded in the tree and README; because most handlers and integrations were not sampled, uncertain internal call wiring is intentionally omitted.
Main entry points: application Commands and queries · storage.controller.ts Storage endpoints · storage.service.ts Storage service · storage.module.ts Provider selection
Components 22
API and CQRS
- Auth endpoints
src/presentation/modules/auth/auth.controller.ts - User endpoints
src/presentation/modules/user/user.controller.ts - Admin endpoints
src/presentation/modules/admin - Storage endpoints
src/presentation/modules/storage/storage.controller.ts - Commands and queries
src/application
Identity and Access
- Authentication services
src/core/services/auth.service.ts - User services
src/core/services/user.service.ts - Roles and permissions
src/core/services/role.service.ts - Identity records
src/infrastructure/repositories - Email delivery
src/presentation/modules/auth/providers/email.provider.ts
Admin Management
- Admin panel
admin/src/App.tsx - Admin user workflows
src/presentation/modules/admin/admin-user.controller.ts - Role workflows
src/presentation/modules/admin/admin-role.controller.ts
File Storage
- Storage service
src/core/services/storage.service.ts - File records
src/infrastructure/repositories/file.repository.ts - Provider selection
src/infrastructure/storage/storage.module.ts - MinIO provider
src/infrastructure/storage/providers/minio.provider.ts - AWS S3 provider
src/infrastructure/storage/providers/s3.provider.ts
Operations
- Health monitoring
src/presentation/modules/health/health.controller.ts - Internationalization
src/infrastructure/i18n/i18n.module.ts
Other components
- API client
- Object storage
Connections 19
- API client → Auth endpoints: requests identity
- API client → User endpoints: requests profile
- API client → Admin endpoints: requests admin
- API client → Storage endpoints: requests files
- Auth endpoints → Commands and queries: dispatches commands
- User endpoints → Commands and queries: dispatches CQRS
- Admin endpoints → Commands and queries: dispatches CQRS
- Storage endpoints → Commands and queries: dispatches CQRS
- Admin panel → Admin endpoints: uses admin API
- Admin user workflows → User services
- Role workflows → Roles and permissions
- Storage endpoints → Storage service
- Storage service → File records: reads and writes
- Storage service → Provider selection: uses provider
- Provider selection → MinIO provider: selects MinIO
- Provider selection → AWS S3 provider: selects S3
- MinIO provider → Object storage: stores objects
- AWS S3 provider → Object storage: stores objects
- Health monitoring → Commands and queries: dispatches queries