How hazzem-web/linkup-socialmedia works
LinkUp is an Express/TypeScript social-network backend. Its implemented request path starts at the app bootstrap, dispatches to feature routers, and handles authentication and profile operations through service and persistence layers. The README also describes posts, messaging, and media, though the sampled sources do not establish their internal behavior. Edges reflect the bootstrap, sampled calls, or explicit README claims; unsampled feature internals are left unconnected where their relationships are not evidenced.
Main entry points: app.controller.ts App bootstrap · auth.service.ts Authentication · user.service.ts Profile management · env.service.ts Environment config
Components 24
HTTP and realtime entry
- App bootstrap
src/app.controller.ts - Server entry
src/main.ts - Request middleware
src/middleware/auth.middleware.ts - Request validation
src/middleware/validation.middleware.ts - Socket connection
src/app.controller.ts
Social features
- Auth endpoints
src/modules/auth/auth.controller.ts - Authentication
src/modules/auth/auth.service.ts - Profile endpoints
src/modules/users/user.controller.ts - Profile management
src/modules/users/user.service.ts - Posts and engagement
src/modules/posts/post.controller.ts - Messaging
src/modules/messages/message.controller.ts
Identity and integrations
- Redis service
src/common/services/redis.service.ts - JWT tokens
src/common/services/token.service.ts - Password security
src/common/services/security.service.ts - Email events
src/common/utils/email/email.events.ts - Media storage
src/common/services/s3.service.ts - Push notifications
src/common/services/firebase.service.ts - Environment config
src/config/env.service.ts
Persistence and models
- Generic repository
src/database/repository/base.repository.ts - Social data models
src/database/models/post.model.ts
Other components
- API client
- MongoDB
- Email provider
- AWS S3
Connections 30
- API client → App bootstrap: sends requests
- Server entry → App bootstrap: starts app
src/main.ts - App bootstrap → Auth endpoints: mounts router
src/app.controller.ts - App bootstrap → Profile endpoints: mounts router
src/app.controller.ts - App bootstrap → Posts and engagement: mounts router
src/app.controller.ts - App bootstrap → Messaging: mounts router
src/app.controller.ts - Auth endpoints → Authentication: calls
src/modules/auth/auth.controller.ts - Profile endpoints → Profile management: calls
src/modules/users/user.controller.ts - Auth endpoints → Request validation: uses
src/modules/auth/auth.controller.ts - Profile endpoints → Request middleware: uses
src/modules/users/user.controller.ts - Authentication → Generic repository: queries users
src/modules/auth/auth.service.ts - Authentication → Social data models: uses user model
src/modules/auth/auth.service.ts - Profile management → Generic repository: queries users
src/modules/users/user.service.ts - Profile management → Social data models: uses user model
src/modules/users/user.service.ts - App bootstrap → MongoDB: connects database
src/app.controller.ts - Authentication → Password security: hashes passwords
src/modules/auth/auth.service.ts - Authentication → JWT tokens: issues tokens
src/modules/auth/auth.service.ts - Authentication → Redis service: checks OTP
src/modules/auth/auth.service.ts - Request middleware → JWT tokens: verifies bearer
src/middleware/auth.middleware.ts - Request middleware → Redis service: checks revocation
src/middleware/auth.middleware.ts - Authentication → Email events: emits email events
src/modules/auth/auth.service.ts - Email events → Email provider: sends email
README.md - Profile management → Media storage: manages profile media
src/modules/users/user.service.ts - Media storage → AWS S3: stores media
README.md - Profile management → Push notifications: sends notification
src/modules/users/user.service.ts - App bootstrap → Socket connection: opens socket server
src/app.controller.ts - Generic repository → MongoDB: persists model queries
- Environment config → Redis service: configures connection
src/common/services/redis.service.ts - Environment config → Media storage: configures storage
src/common/services/s3.service.ts - Environment config → JWT tokens: configures signatures
src/common/services/token.service.ts