# 1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app architecture

> Architecture diagram of the GitHub repository 1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app
- Repository: https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app

## Overview

This is a TypeScript/Express social-media backend. Its main request path is HTTP client → mounted feature controller → service logic → MongoDB/Redis or supporting integrations → JSON response; authentication middleware verifies tokens and sessions along the way. The feature map covers account confirmation and login, profiles and friendships, posts and follows, and chat/realtime infrastructure. The README gives no product detail, so feature scope comes from the source tree and indexed imports; chat event wiring is unsampled and shown only as unverified.

Main entry points: [`src/bootstrap.ts`](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/bootstrap.ts) (App Bootstrap), [`src/modules/auth/auth.services.ts`](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.services.ts) (Auth Service), [`src/middlewares/auth.middleware.ts`](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/middlewares/auth.middleware.ts) (Token Authentication), [`src/modules/post/post.controller.ts`](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.controller.ts) (Post Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Server Runtime"]
  node_bootstrap["App Bootstrap<br/>[bootstrap.ts]"]
end

subgraph group_accounts["Accounts &amp; Social"]
  node_authctl["Auth Routes<br/>[auth.controller.ts]"]
  node_authsvc["Auth Service<br/>[auth.services.ts]"]
  node_authvalidation["Auth Validation<br/>[auth.validation.ts]"]
  node_usersctl["User Routes<br/>[user.controller.ts]"]
  node_usersvc["User &amp; Friends<br/>[user.services.ts]"]
  node_userstore[("User Records<br/>[user.model.ts]")]
  node_friendstore[("Friend Requests")]
  node_followctl["Follow Routes"]
  node_followsvc["Follow Service<br/>[follow.services.ts]"]
  node_followstore[("Follow Records<br/>[follow.model.ts]")]
end

subgraph group_content["Posts &amp; Feed"]
  node_postctl["Post Routes<br/>[post.controller.ts]"]
  node_postsvc["Post &amp; Feed Service<br/>[post.services.ts]"]
  node_poststore[("Post Records<br/>[post.model.ts]")]
  node_postvalidation["Post Validation<br/>[post.validation.ts]"]
end

subgraph group_realtime["Chat &amp; Realtime"]
  node_chatctl["Chat Routes<br/>[chat.controller.ts]"]
  node_chatsvc["Chat Service<br/>[chat.services.ts]"]
  node_chatsocket["Socket Chat Service"]
  node_chatevents["Chat Events<br/>[chat.events.ts]"]
  node_chatgateway["Chat Gateway<br/>[chat.gateway.ts]"]
  node_realtimegateway["Socket Gateway<br/>[gateway.ts]"]
  node_chatstore[("Chat Records<br/>[chat.model.ts]")]
end

subgraph group_shared["Shared Infrastructure"]
  node_authmw["Token Authentication<br/>[auth.middleware.ts]"]
  node_mongo[("MongoDB")]
  node_redis[("Redis")]
  node_token["JWT Utilities<br/>[token.ts]"]
  node_rediskeys["Redis Key Helpers<br/>[redis.services.ts]"]
  node_mailer["Email Delivery<br/>[sendEmail.ts]"]
  node_otp["OTP Generator<br/>[otp.ts]"]
  node_template["Email Template<br/>[template.ts]"]
  node_validationmw["Request Validation"]
  node_success["JSON Response<br/>[successRes.ts]"]
end

node_client(("HTTP Client"))

node_client -->|"sends requests"| node_bootstrap
node_bootstrap -->|"mounts routes"| node_authctl
node_bootstrap -->|"mounts routes"| node_usersctl
node_bootstrap -->|"mounts routes"| node_postctl
node_bootstrap -->|"mounts routes"| node_followctl
node_bootstrap -->|"mounts routes"| node_chatctl
node_bootstrap -->|"connects"| node_mongo
node_bootstrap -->|"connects"| node_redis
node_bootstrap -->|"initializes sockets"| node_realtimegateway
node_authctl -->|"calls"| node_authsvc
node_authctl -->|"validates with"| node_authvalidation
node_authctl -->|"uses"| node_validationmw
node_authctl -->|"returns JSON"| node_success
node_authsvc -->|"reads and creates"| node_userstore
node_authsvc -->|"stores OTP and session"| node_redis
node_authsvc -->|"uses keys"| node_rediskeys
node_authsvc -->|"sends confirmation"| node_mailer
node_authsvc -->|"generates code"| node_otp
node_authsvc -->|"renders email"| node_template
node_authsvc -->|"creates tokens"| node_token
node_authmw -->|"verifies token"| node_token
node_authmw -->|"loads user"| node_userstore
node_authmw -->|"checks session"| node_redis
node_authmw -->|"builds session key"| node_rediskeys
node_usersctl -->|"calls"| node_usersvc
node_usersctl -->|"guards routes"| node_authmw
node_usersctl -->|"validates with"| node_validationmw
node_usersctl -->|"returns JSON"| node_success
node_usersvc -->|"reads users"| node_userstore
node_usersvc -->|"manages requests"| node_friendstore
node_usersvc -->|"checks follows"| node_followstore
node_followctl -->|"calls"| node_followsvc
node_followctl -->|"guards routes"| node_authmw
node_followctl -->|"returns JSON"| node_success
node_followsvc -->|"updates records"| node_followstore
node_followsvc -->|"checks users"| node_userstore
node_postctl -->|"calls"| node_postsvc
node_postctl -->|"guards routes"| node_authmw
node_postctl -->|"validates with"| node_validationmw
node_postctl -->|"uses schemas"| node_postvalidation
node_postctl -->|"returns JSON"| node_success
node_postsvc -->|"reads and writes"| node_poststore
node_postsvc -->|"checks friendship"| node_friendstore
node_postsvc -->|"lists friends"| node_usersvc
node_chatctl -->|"calls"| node_chatsvc
node_chatctl -->|"guards routes"| node_authmw
node_chatctl -->|"uses records"| node_chatstore
node_chatctl -->|"returns JSON"| node_success

click node_bootstrap "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/bootstrap.ts"
click node_authctl "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.controller.ts"
click node_authsvc "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.services.ts"
click node_authvalidation "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.validation.ts"
click node_authmw "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/middlewares/auth.middleware.ts"
click node_usersctl "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/user.controller.ts"
click node_usersvc "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/user.services.ts"
click node_userstore "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/models/user.model.ts"
click node_friendstore "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/models/friendRequest.model.ts"
click node_followctl "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/follow/follow.controller.ts"
click node_followsvc "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/follow/follow.services.ts"
click node_followstore "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/follow/follow.model.ts"
click node_postctl "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.controller.ts"
click node_postsvc "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.services.ts"
click node_poststore "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.model.ts"
click node_postvalidation "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.validation.ts"
click node_chatctl "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.controller.ts"
click node_chatsvc "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.services.ts"
click node_chatsocket "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.socket.services.ts"
click node_chatevents "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.events.ts"
click node_chatgateway "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.gateway.ts"
click node_realtimegateway "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/gateway/gateway.ts"
click node_chatstore "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/models/chat.model.ts"
click node_mongo "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/db/mongoose.connection.ts"
click node_redis "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/db/redis.connection.ts"
click node_token "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/security/token.ts"
click node_rediskeys "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/redis/redis.services.ts"
click node_mailer "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/email/sendEmail.ts"
click node_otp "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/email/otp.ts"
click node_template "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/email/template.ts"
click node_validationmw "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/middlewares/validation.middleware.ts"
click node_success "https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/successRes.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrap,node_client toneBlue
class node_authctl,node_authsvc,node_authvalidation,node_usersctl,node_usersvc,node_userstore,node_friendstore,node_followctl,node_followsvc,node_followstore toneAmber
class node_postctl,node_postsvc,node_poststore,node_postvalidation toneMint
class node_chatctl,node_chatsvc,node_chatsocket,node_chatevents,node_chatgateway,node_realtimegateway,node_chatstore toneRose
class node_authmw,node_mongo,node_redis,node_token,node_rediskeys,node_mailer,node_otp,node_template,node_validationmw,node_success toneIndigo
```

## Components

### Server Runtime

- [App Bootstrap](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/bootstrap.ts): `src/bootstrap.ts`

### Accounts & Social

- [Auth Routes](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.controller.ts): `src/modules/auth/auth.controller.ts`
- [Auth Service](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.services.ts): `src/modules/auth/auth.services.ts`
- [Auth Validation](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/auth/auth.validation.ts): `src/modules/auth/auth.validation.ts`
- [User Routes](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/user.controller.ts): `src/modules/user/user.controller.ts`
- [User & Friends](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/user.services.ts): `src/modules/user/user.services.ts`
- [User Records](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/models/user.model.ts): `src/modules/user/models/user.model.ts`
- [Friend Requests](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/user/models/friendRequest.model.ts): `src/modules/user/models/friendRequest.model.ts`
- [Follow Routes](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/follow/follow.controller.ts): `src/modules/follow/follow.controller.ts`
- [Follow Service](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/follow/follow.services.ts): `src/modules/follow/follow.services.ts`
- [Follow Records](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/follow/follow.model.ts): `src/modules/follow/follow.model.ts`

### Posts & Feed

- [Post Routes](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.controller.ts): `src/modules/post/post.controller.ts`
- [Post & Feed Service](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.services.ts): `src/modules/post/post.services.ts`
- [Post Records](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.model.ts): `src/modules/post/post.model.ts`
- [Post Validation](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/post/post.validation.ts): `src/modules/post/post.validation.ts`

### Chat & Realtime

- [Chat Routes](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.controller.ts): `src/modules/chat/chat.controller.ts`
- [Chat Service](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.services.ts): `src/modules/chat/chat.services.ts`
- [Socket Chat Service](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.socket.services.ts): `src/modules/chat/chat.socket.services.ts`
- [Chat Events](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.events.ts): `src/modules/chat/chat.events.ts`
- [Chat Gateway](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/chat.gateway.ts): `src/modules/chat/chat.gateway.ts`
- [Socket Gateway](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/gateway/gateway.ts): `src/modules/gateway/gateway.ts`
- [Chat Records](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/modules/chat/models/chat.model.ts): `src/modules/chat/models/chat.model.ts`

### Shared Infrastructure

- [Token Authentication](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/middlewares/auth.middleware.ts): `src/middlewares/auth.middleware.ts`
- [MongoDB](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/db/mongoose.connection.ts): `src/db/mongoose.connection.ts`
- [Redis](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/db/redis.connection.ts): `src/db/redis.connection.ts`
- [JWT Utilities](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/security/token.ts): `src/utils/security/token.ts`
- [Redis Key Helpers](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/redis/redis.services.ts): `src/utils/redis/redis.services.ts`
- [Email Delivery](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/email/sendEmail.ts): `src/utils/email/sendEmail.ts`
- [OTP Generator](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/email/otp.ts): `src/utils/email/otp.ts`
- [Email Template](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/email/template.ts): `src/utils/email/template.ts`
- [Request Validation](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/middlewares/validation.middleware.ts): `src/middlewares/validation.middleware.ts`
- [JSON Response](https://github.com/1blixen/ayman-mohamed---node-c46-sun-wed-830-pm-online---assignment-social-medi-app/blob/main/src/utils/successRes.ts): `src/utils/successRes.ts`

### Other components

- **HTTP Client**

## Connections

- HTTP Client → App Bootstrap: sends requests (evidence: `src/bootstrap.ts`)
- App Bootstrap → Auth Routes: mounts routes (evidence: `src/bootstrap.ts`)
- App Bootstrap → User Routes: mounts routes (evidence: `src/bootstrap.ts`)
- App Bootstrap → Post Routes: mounts routes (evidence: `src/bootstrap.ts`)
- App Bootstrap → Follow Routes: mounts routes (evidence: `src/bootstrap.ts`)
- App Bootstrap → Chat Routes: mounts routes (evidence: `src/bootstrap.ts`)
- App Bootstrap → MongoDB: connects (evidence: `src/bootstrap.ts`)
- App Bootstrap → Redis: connects (evidence: `src/bootstrap.ts`)
- App Bootstrap → Socket Gateway: initializes sockets (evidence: `src/bootstrap.ts`)
- Auth Routes → Auth Service: calls (evidence: `src/modules/auth/auth.controller.ts`)
- Auth Routes → Auth Validation: validates with (evidence: `src/modules/auth/auth.controller.ts`)
- Auth Routes → Request Validation: uses (evidence: `src/modules/auth/auth.controller.ts`)
- Auth Routes → JSON Response: returns JSON (evidence: `src/modules/auth/auth.controller.ts`)
- Auth Service → User Records: reads and creates (evidence: `src/modules/auth/auth.services.ts`)
- Auth Service → Redis: stores OTP and session (evidence: `src/modules/auth/auth.services.ts`)
- Auth Service → Redis Key Helpers: uses keys (evidence: `src/modules/auth/auth.services.ts`)
- Auth Service → Email Delivery: sends confirmation (evidence: `src/modules/auth/auth.services.ts`)
- Auth Service → OTP Generator: generates code (evidence: `src/modules/auth/auth.services.ts`)
- Auth Service → Email Template: renders email (evidence: `src/modules/auth/auth.services.ts`)
- Auth Service → JWT Utilities: creates tokens (evidence: `src/modules/auth/auth.services.ts`)
- Token Authentication → JWT Utilities: verifies token (evidence: `src/middlewares/auth.middleware.ts`)
- Token Authentication → User Records: loads user (evidence: `src/middlewares/auth.middleware.ts`)
- Token Authentication → Redis: checks session (evidence: `src/middlewares/auth.middleware.ts`)
- Token Authentication → Redis Key Helpers: builds session key (evidence: `src/middlewares/auth.middleware.ts`)
- User Routes → User & Friends: calls (evidence: `src/modules/user/user.controller.ts`)
- User Routes → Token Authentication: guards routes (evidence: `src/modules/user/user.controller.ts`)
- User Routes → Request Validation: validates with (evidence: `src/modules/user/user.controller.ts`)
- User Routes → JSON Response: returns JSON (evidence: `src/modules/user/user.controller.ts`)
- User & Friends → User Records: reads users (evidence: `src/modules/user/user.services.ts`)
- User & Friends → Friend Requests: manages requests (evidence: `src/modules/user/user.services.ts`)
- User & Friends → Follow Records: checks follows (evidence: `src/modules/user/user.services.ts`)
- Follow Routes → Follow Service: calls (evidence: `src/modules/follow/follow.controller.ts`)
- Follow Routes → Token Authentication: guards routes (evidence: `src/modules/follow/follow.controller.ts`)
- Follow Routes → JSON Response: returns JSON (evidence: `src/modules/follow/follow.controller.ts`)
- Follow Service → Follow Records: updates records (evidence: `src/modules/follow/follow.services.ts`)
- Follow Service → User Records: checks users (evidence: `src/modules/follow/follow.services.ts`)
- Post Routes → Post & Feed Service: calls (evidence: `src/modules/post/post.controller.ts`)
- Post Routes → Token Authentication: guards routes (evidence: `src/modules/post/post.controller.ts`)
- Post Routes → Request Validation: validates with (evidence: `src/modules/post/post.controller.ts`)
- Post Routes → Post Validation: uses schemas (evidence: `src/modules/post/post.controller.ts`)
- Post Routes → JSON Response: returns JSON (evidence: `src/modules/post/post.controller.ts`)
- Post & Feed Service → Post Records: reads and writes (evidence: `src/modules/post/post.services.ts`)
- Post & Feed Service → Friend Requests: checks friendship (evidence: `src/modules/post/post.services.ts`)
- Post & Feed Service → User & Friends: lists friends (evidence: `src/modules/post/post.services.ts`)
- Chat Routes → Chat Service: calls (evidence: `src/modules/chat/chat.controller.ts`)
- Chat Routes → Token Authentication: guards routes (evidence: `src/modules/chat/chat.controller.ts`)
- Chat Routes → Chat Records: uses records (evidence: `src/modules/chat/chat.controller.ts`)
- Chat Routes → JSON Response: returns JSON (evidence: `src/modules/chat/chat.controller.ts`)
