How bhuman-it-organization/erp-docs works
This repository copy contains backend-module and frontend-feature templates, not the running ERP stack. The example-item feature demonstrates the intended user workflow: browse/search and page records, open or edit a record, create one, and export a list. The backend example shows controller-to-service orchestration and repository-backed reads/writes, with shared auth, paging, export, and error facilities. The frontend page-to-feature wiring and several backend rule-layer calls are not shown in the excerpts, so those links are omitted or marked unverified rather than inferred.
Main entry points: example-item.controller.ts HTTP controller · example-item.service.ts Use-case service · ExampleItemListPage.tsx List and record UI · use-example-item.ts Data hooks
Components 21
Frontend feature
- Feature pages
05-templates/frontend-feature/app/(shell)/example-item/page.tsx - List and record UI
05-templates/frontend-feature/src/features/example-item/pages/ExampleItemListPage.tsx - Forms and lists
05-templates/frontend-feature/src/features/example-item/components/ExampleItemForm.tsx - Data hooks
05-templates/frontend-feature/src/features/example-item/hooks/use-example-item.ts - Endpoint table
05-templates/frontend-feature/src/features/example-item/api/example-item.endpoints.ts
Backend module
- HTTP controller
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - Use-case service
05-templates/backend-module/src/v1/example-item/service/example-item.service.ts - Example repository
05-templates/backend-module/src/v1/example-item/repository/example-item.repository.ts - Example item model
05-templates/backend-module/src/v1/example-item/model/example-item.model.ts - Request and response DTOs
05-templates/backend-module/src/v1/example-item/dto/example-item.dto.ts - Routes and permissions
05-templates/backend-module/src/v1/example-item/example-item.routes.ts - In-memory rows
05-templates/backend-module/src/v1/example-item/repository/example-item.repository.ts
Backend platform
- JWT and permission guards
05-templates/backend-module/src/shared/http/guards/jwt-auth.guard.ts - Token verifier port
05-templates/backend-module/src/shared/http/auth/access-token-verifier.ts - Read scope
05-templates/backend-module/src/shared/http/decorators/scope.decorator.ts - Keyset paging
05-templates/backend-module/src/shared/http/keyset.ts - File export
05-templates/backend-module/src/shared/http/export.ts - Error mapping
05-templates/backend-module/src/shared/errors/app-error.ts - Error catalog
05-templates/backend-module/src/shared/errors/error-codes.ts
Other components
- Staff user
- HTTP client
Connections 19
- Staff user → Feature pages: uses
- Feature pages → List and record UI: renders
- List and record UI → Forms and lists: uses
- List and record UI → Data hooks: loads data
- Data hooks → Endpoint table: uses
- Data hooks → HTTP client: requests
- HTTP client → HTTP controller: calls routes
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - HTTP controller → Use-case service: dispatches
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - Use-case service → Example repository: queries and writes
05-templates/backend-module/src/v1/example-item/service/example-item.service.ts - Example repository → In-memory rows: reads and writes
05-templates/backend-module/src/v1/example-item/repository/example-item.repository.ts - Example repository → Example item model: stores rows
05-templates/backend-module/src/v1/example-item/repository/example-item.repository.ts - HTTP controller → Request and response DTOs: uses schemas
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - HTTP controller → Routes and permissions: binds paths
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - HTTP controller → JWT and permission guards: runs guards
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - JWT and permission guards → Token verifier port: verifies token
05-templates/backend-module/src/shared/http/guards/jwt-auth.guard.ts - HTTP controller → Read scope: reads scope
05-templates/backend-module/src/v1/example-item/controller/example-item.controller.ts - Use-case service → File export: runs export
05-templates/backend-module/src/v1/example-item/service/example-item.service.ts - Use-case service → Keyset paging: uses cursors
05-templates/backend-module/src/v1/example-item/service/example-item.service.ts - Error mapping → Error catalog: looks up codes
05-templates/backend-module/src/shared/errors/app-error.ts