| Category | Files | Output |
|---|---|---|
| Common | constant, dictionary, signal | Type definitions, translations, API contracts |
| Backend | document, service | MongoDB models, business logic |
| Frontend | store, Template, Unit, View, Zone, Util | State management, UI components |
| File | Description |
|---|---|
constant.ts | Defines data schemas (Input, Object, Light, Full, Insight) and enums using the via() builder pattern. |
dictionary.ts | Provides multi-language translations for model names, field labels, enum values, API descriptions, and error messages. |
signal.ts | Defines API endpoints (queries, mutations, subscriptions) and their type contracts between frontend and backend. |
| File | Description |
|---|---|
document.ts | Creates MongoDB Document/Model from constant schema. Defines database queries, filters, and data processing logic (Redis cache, text search, etc.). |
service.ts | Implements domain-specific business logic. Handles complex operations, validations, and interactions with other services. |
| File | Type | Description |
|---|---|---|
store.ts | Client | Global state management with Zustand. Defines domain-related state and actions. |
Template.tsx | Client | Form components for Create/Update operations with integrated state management. |
Unit.tsx | Server | Card/list item components for displaying multiple items. Uses LightModel for efficient rendering. |
View.tsx | Server | Detail view components for single item display. Uses full Model with all properties. |
Zone.tsx | Client | Page container components that compose Template, Unit, View into complete UI sections. |
Util.tsx | Client | Specialized utility components for domain-specific features (buttons, badges, etc.). |
| Pattern | Example | Description |
|---|---|---|
model.*.ts | product.constant.ts | Logic files (lowercase) |
Model.*.tsx | Product.View.tsx | React components (PascalCase) |