How gid-oss/dataui-nestjs-crud works
Main Components Identification
The system should be represented as a modular microframework with three main packages:
a) Core Components (@dataui/crud):
• Interceptors, decorators, and validation components
• Configuration service and reflection helpers
b) Request Handling (@dataui/crud-request):
• RequestQueryBuilder and RequestQueryParser
• Validation and exception handling components
• Query parsing flow
c) Database Integration (@dataui/crud-typeorm):
• TypeOrmCrudService as the base service layer
• Connection to various database systems (MySQL, PostgreSQL)
• Entity-service relationship
Relationships and Interactions
• Client Request → RequestQueryParser → Controller → Service → Database
• How the CRUD decorator integrates with NestJS controllers
• Relationship between DTOs, entities, and responses
Architectural Pattern Representation
Use these visual elements:
• Hexagonal architecture pattern showing clear separation of:
• Core business logic (inner layer)
• Controllers and DTOs (middle layer)
• External interfaces (outer layer)
• Blue: Core CRUD functionality
• Green: Request handling components
• Orange: Database integration
• Gray: External interfaces
Component Details
Specific elements:
┌─ Client Layer ─────────────────────┐
• RequestQueryBuilder │
• ┬──────────────────────┘
• ↓
┌─ API Layer ──┴─────────────────────┐
• ┌─ @Crud Decorator ─┐ │
• Controllers │ │
• Interceptors │ │
• Validators │ │
• ┬─┘ │
• ┬─────────────────┘
• ↓
┌─ Service Layer ──┴─────────────────┐
• ┌─ TypeOrmCrudService ─┐ │
• CRUD Operations │ │
• Query Building │ │
• ┬───┘ │
• ┬────────────────┘
• ↓
┌─ Database Layer ─┴─────────────────┐
• MySQL / PostgreSQL │
• ┘
Integration Points
Integration with:
• NestJS framework
• TypeORM
• Swagger documentation
• Frontend applications