How codefactory-co/nestjs-lv1 works
This is a NestJS server starter whose source tree implements a social application API: email registration and token-based authentication, user profiles and follows, posts and images, comments, and chats/messages. HTTP controllers delegate domain operations to services; TypeORM entities represent persisted state, while shared pagination and request infrastructure support those domains. The README describes Nest rather than the application, so feature coverage comes from the source tree and excerpts. Chat gateway behavior and several unsampled integrations are represented only where the index supports a relationship.
Main entry points: posts.service.ts Post Logic · posts.controller.ts Posts API · comments.controller.ts Comments API · auth.service.ts Token and Auth Logic
Components 24
Application Entry
- Nest Bootstrap
src/main.ts - Application Modules
src/app.module.ts
Identity and Users
- Auth API
src/auth/auth.controller.ts - Token and Auth Logic
src/auth/auth.service.ts - Bearer Token Guard
src/auth/guard/bearer-token.guard.ts - Users API
src/users/users.controller.ts - User and Follow Logic
src/users/users.service.ts - User Records
src/users/entity/users.entity.ts
Social Content
- Posts API
src/posts/posts.controller.ts - Post Logic
src/posts/posts.service.ts - Post Records
src/posts/entity/posts.entity.ts - Post Images
src/posts/image/images.service.ts - Comments API
src/posts/comments/comments.controller.ts - Comment Logic
src/posts/comments/comments.service.ts - Comment Records
src/posts/comments/entity/comments.entity.ts
Chat and Messaging
- Chats API
src/chats/chats.controller.ts - Chat Logic
src/chats/chats.service.ts - Chat Records
src/chats/entity/chats.entity.ts - Messages API
src/chats/messages/messages.controller.ts - Message Logic
src/chats/messages/messages.service.ts - Message Records
src/chats/messages/entity/messages.entity.ts
Shared Infrastructure
- Pagination Helpers
src/common/common.service.ts
Other components
- API Client
- PostgreSQL
Connections 24
- API Client → Auth API: requests
- API Client → Users API: requests
- API Client → Posts API: requests
- API Client → Comments API: requests
- API Client → Chats API: requests
- API Client → Messages API: requests
- Nest Bootstrap → Application Modules: loads
src/main.ts - Application Modules → PostgreSQL: configures
src/app.module.ts - Auth API → Token and Auth Logic: delegates to
src/auth/auth.controller.ts - Bearer Token Guard → Token and Auth Logic: validates with
src/auth/guard/bearer-token.guard.ts - Token and Auth Logic → User and Follow Logic: looks up users
src/auth/auth.service.ts - Users API → User and Follow Logic: delegates to
src/users/users.controller.ts - User and Follow Logic → User Records: reads and writes
src/users/users.service.ts - Posts API → Post Logic: delegates to
src/posts/posts.controller.ts - Posts API → Post Images: creates images
src/posts/posts.controller.ts - Post Logic → Post Records: reads and writes
src/posts/posts.service.ts - Post Logic → Pagination Helpers: uses pagination
src/posts/posts.service.ts - Comments API → Comment Logic: delegates to
src/posts/comments/comments.controller.ts - Comments API → Post Logic: updates comment count
src/posts/comments/comments.controller.ts - Comment Logic → Comment Records: reads and writes
src/posts/comments/comments.service.ts - Chats API → Chat Logic: delegates to
src/chats/chats.controller.ts - Chat Logic → Chat Records: uses entity
src/chats/chats.service.ts - Messages API → Message Logic: delegates to
src/chats/messages/messages.controller.ts - Message Logic → Message Records: uses entity
src/chats/messages/messages.service.ts