How goutamchoudharydev/connectgram works
ConnectGram is a social app for account registration and verification, publishing media posts, browsing profiles and feeds, reacting and commenting, following users, and real-time messaging. The client routes users through authenticated pages and feature services to the API; server controllers own domain operations and use repositories for persisted data. Sampled controllers establish several repository and Cloudinary interactions; the tree documents other feature modules and socket support, but their detailed wiring was not sampled, so uncertain links are omitted.
Main entry points: AppRoutes.tsx App routes · auth.controller.ts Auth controller · app.ts API application · axios.ts HTTP client
Components 32
Client app
- App routes
client/src/routes/AppRoutes.tsx - Auth pages
client/src/features/auth/pages/LoginPage.tsx - Auth service
client/src/features/auth/services/auth.service.ts - Profile page
client/src/features/profile/pages/ProfilePage.tsx - Post pages
client/src/features/post/pages/HomePage.tsx - Chat page
client/src/features/chat/pages/MessagePage.tsx - HTTP client
client/src/services/axios.ts
Identity
- Auth routes
server/src/modules/auth/auth.routes.ts - Auth controller
server/src/modules/auth/auth.controller.ts - User and verification data
server/src/repositories/user.repository.ts - Verification data access
server/src/repositories/emailVerification.repository.ts - Email delivery
server/src/utils/send-email.utils.ts
Social content
- Post routes
server/src/modules/post/post.routes.ts - Post controller
server/src/modules/post/post.controller.ts - Post data
server/src/repositories/post.repository.ts - Comment controller
server/src/modules/comment/comment.controller.ts - Comment data
server/src/repositories/comment.repository.ts - Like controller
server/src/modules/like/like.controller.ts - Like data
server/src/repositories/like.repository.ts
Community
- Follow controller
server/src/modules/follow/follow.controller.ts - Follow data
server/src/repositories/follow.repository.ts - Profile controller
server/src/modules/profile/profile.controller.ts - Chat routes
server/src/modules/chat/chat.routes.ts - Chat controller
server/src/modules/chat/chat.controller.ts - Chat data
server/src/repositories/chat.repository.ts - Realtime socket
server/src/modules/socket/socket.ts
API and persistence
- Relational database
server/src/config/datasource.config.ts - API application
server/src/app.ts - Authentication middleware
server/src/middleware/auth.middleware.ts
Other components
- User
- Mail service
- Media storage
Connections 36
- User → App routes: navigates
- App routes → Auth pages: routes to
- App routes → Profile page: routes to
- App routes → Post pages: routes to
- App routes → Chat page: routes to
- Auth pages → Auth service: requests
- Auth service → HTTP client: sends HTTP
- Profile page → HTTP client: sends HTTP
- Post pages → HTTP client: sends HTTP
- Chat page → HTTP client: sends HTTP
- HTTP client → API application: calls API
- API application → Auth routes: mounts routes
- API application → Post routes: mounts routes
- API application → Chat routes: mounts routes
- Auth routes → Auth controller: dispatches
- Post routes → Post controller: dispatches
- Chat routes → Chat controller: dispatches
- Auth controller → User and verification data: reads/writes users
- Auth controller → Verification data access: reads/writes codes
- Auth controller → Email delivery: sends verification
- Email delivery → Mail service: delivers email
- Auth controller → Authentication middleware: issues tokens
- Post controller → Post data: reads/writes posts
- Post controller → Media storage: uploads media
- Comment controller → Post data: looks up posts
- Comment controller → Comment data: reads/writes comments
- Like controller → Post data: looks up posts
- Like controller → Like data: reads/writes likes
- Follow controller → User and verification data: looks up users
- Follow controller → Follow data: reads/writes follows
- Profile controller → User and verification data: reads/writes profile
- Profile controller → Media storage: manages profile images
- Chat controller → Chat data: reads/writes conversations
- Chat controller → User and verification data: looks up users
- Realtime socket → User: realtime events
- Relational database → API application: initializes for