How pvarentsov/typescript-clean-architecture works
IPoster is a NestJS application for account creation and managing media and posts. Users enter through REST endpoints; authors can manage their own media and draft posts, while authors and guests can browse published posts. The post controller excerpt shows request-to-use-case dispatch; the README documents the broader media and user capabilities. The graph groups runtime concerns by responsibility; unsampled implementation details and wiring are not inferred.
Main entry points: PostController.ts Post endpoints · AuthController.ts Auth endpoints · MediaController.ts Media endpoints · UserController.ts User endpoints
Components 19
REST API
- Auth endpoints
src/application/api/http-rest/controller/AuthController.ts - Media endpoints
src/application/api/http-rest/controller/MediaController.ts - Post endpoints
src/application/api/http-rest/controller/PostController.ts - User endpoints
src/application/api/http-rest/controller/UserController.ts
Identity and Access
- Authentication
src/application/api/http-rest/auth/HttpAuthService.ts
Domain Use Cases
- User use cases
src/core/domain/user/usecase - Media use cases
src/core/domain/media/usecase - Post use cases
src/core/domain/post/usecase - User model
src/core/domain/user/entity/User.ts - Media model
src/core/domain/media/entity/Media.ts - Post model
src/core/domain/post/entity/Post.ts - Repository options
src/core/common/persistence/RepositoryOptions.ts
Application Services
- User services
src/core/service/user/usecase - Media services
src/core/service/media/usecase - Post services
src/core/service/post/usecase
Infrastructure
- PostgreSQL persistence
src/infrastructure/adapter/persistence/typeorm - Media file storage
src/infrastructure/adapter/persistence/media-file/MinioMediaFileStorageAdapter.ts - Message buses
src/infrastructure/adapter/message
Other components
- User
Connections 6
- User → Auth endpoints: creates account
- User → Media endpoints: manages media
- User → Post endpoints: manages posts
- User → User endpoints: uses accounts
- Post endpoints → Post use cases: dispatches use cases
src/application/api/http-rest/controller/PostController.ts - User → Post endpoints: browses published posts