How baocao155/fresha-clone works
Fresha is a small Nx workspace with a NestJS API and an Angular web shell. The API’s evidenced product workflow is user CRUD: an HTTP client reaches the API, user routes delegate to service logic, storage accesses MySQL, and results are wrapped for responses. The README describes Nx rather than product capabilities; the web source shown only establishes Angular startup. Some module wiring and web behavior are not sampled, so those links are omitted.
Main entry points: user.controller.ts User routes · main.ts API bootstrap · user.service.ts User service · base.storage.ts Base storage
Components 19
Application runtime
- API bootstrap
apps/api/src/main.ts - API module
apps/api/src/app/app.module.ts - Angular bootstrap
apps/web/src/main.ts - Web module
apps/web/src/app/app.module.ts
User management
- User module
libs/api/user/src/lib/api-user.module.ts - User routes
libs/api/user/src/lib/user.controller.ts - User service
libs/api/user/src/lib/user.service.ts - User storage
libs/api/user/src/lib/user.storage.ts - User entity
libs/api/user/src/lib/entity/user.entity.ts - Create DTO
libs/api/user/src/lib/dto/userCreate.dto.ts - Update DTO
libs/api/user/src/lib/dto/userUpdate.dto.ts - User model
libs/shared/data-access/model/src/lib/user.model.ts
Shared API foundation
- Base storage
libs/api/shared/abstract/src/lib/storage/base.storage.ts - Success responses
libs/api/shared/common/src/lib/util/getSuccessResponse.ts - Exception filters
libs/api/shared/filter/src/lib/all-exception.filter.ts - Database exception
libs/api/shared/exception/src/lib/system/database.exception.ts
Other components
- HTTP client
- Web visitor
- MySQL database
Connections 16
- HTTP client → API bootstrap: sends requests
- API bootstrap → API module: starts
- API module → User module: imports
- Web visitor → Angular bootstrap: opens app
- Angular bootstrap → Web module: bootstraps
- User routes → User service: calls
- User service → User storage: calls
- User storage → Base storage: inherits operations
- Base storage → MySQL database: reads and writes
- Base storage → Database exception: wraps failures
- User service → User entity: operates on
- User routes → Create DTO: accepts
- User routes → Update DTO: accepts
- User routes → User model: maps responses
- User routes → Success responses: wraps results
- API bootstrap → Exception filters: registers