How danielshaitovs/user-service works
This is a NestJS user and access-management API, despite the starter-template README. Its principal workflow is an HTTP request entering a controller, passing to a domain pipeline for user, role, or store operations, and using services for domain work; sign-in additionally resolves assigned roles and stores before issuing a JWT. The graph preserves those domain branches and the role-permission and user-assignment capabilities. Several service implementations and module registrations were not sampled, so their internal links are omitted rather than inferred.
Main entry points: app.module.ts Application wiring · role.pipeline.ts User-role operations · auth.service.ts Sign-in service · store.pipeline.ts Store operations
Components 24
API runtime
- HTTP bootstrap
src/main.ts - Application wiring
src/app.module.ts - PostgreSQL
- User audit
src/user/services/audit.service.ts - Shared cache
src/base/service/cache.service.ts
Authentication
- Auth endpoints
src/auth/auth.controller.ts - Sign-in service
src/auth/auth.service.ts - Token cache
src/auth/cache.service.ts
Roles and permissions
- Role endpoints
src/role/controllers/role.controller.ts - Role operations
src/role/role.pipeline.ts - Role domain services
src/role/services - Permission endpoints
src/role/permission/controllers/permission.controller.ts - Permission operations
src/role/permission/permission.pipeline.ts
Users and stores
- User endpoints
src/user/controllers/user.controller.ts - User operations
src/user/user.pipeline.ts - User domain services
src/user/services/user - User-role endpoints
src/user/controllers/roles.controller.ts - User-role operations
src/user/role.pipeline.ts - User-role services
src/user/services/role/role.service.ts - User-store services
src/user/services/store/store.service.ts - Store endpoints
src/store/controllers/store.controller.ts - Store operations
src/store/store.pipeline.ts - Store domain services
src/store/services
Other components
- API client
Connections 26
- API client → HTTP bootstrap: sends HTTP
src/main.ts - HTTP bootstrap → Application wiring: creates app
src/main.ts - Application wiring → PostgreSQL: configures database
src/app.module.ts - Application wiring → Auth endpoints: registers module
src/app.module.ts - Application wiring → User endpoints: registers module
src/app.module.ts - Application wiring → Role endpoints: registers module
src/app.module.ts - Application wiring → Store endpoints: registers module
src/app.module.ts - Auth endpoints → Sign-in service: delegates sign-in
src/auth/auth.controller.ts - Sign-in service → User-role operations: loads permissions
src/auth/auth.service.ts - Sign-in service → User-store services: loads assigned stores
src/auth/auth.service.ts - Sign-in service → Token cache: stores token
src/auth/auth.service.ts - User endpoints → User operations: delegates requests
src/user/controllers/user.controller.ts - User operations → User domain services: delegates domain work
src/user/user.pipeline.ts - User operations → User audit: records changes
src/user/user.pipeline.ts - User-role endpoints → User-role operations: delegates requests
src/user/controllers/roles.controller.ts - User-role operations → User-role services: manages assignments
src/user/role.pipeline.ts - User-role operations → User audit: records assignments
src/user/role.pipeline.ts - User-role operations → Shared cache: caches permissions
src/user/role.pipeline.ts - Role endpoints → Role operations: delegates requests
src/role/controllers/role.controller.ts - Role operations → Role domain services: delegates domain work
src/role/role.pipeline.ts - Permission endpoints → Permission operations: delegates requests
src/role/permission/controllers/permission.controller.ts - Store endpoints → Store operations: delegates requests
src/store/controllers/store.controller.ts - Store operations → Store domain services: delegates domain work
src/store/store.pipeline.ts - Store operations → User audit: records changes
src/store/store.pipeline.ts - Store operations → Shared cache: caches store data
src/store/store.pipeline.ts - Token cache → Shared cache: uses shared cache
src/auth/cache.service.ts