# rishi0754eegzvbhxhnh/social-app architecture

> Architecture diagram of the GitHub repository rishi0754eegzvbhxhnh/social-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rishi0754eegzvbhxhnh/social-app
- Repository: https://github.com/rishi0754eegzvbhxhnh/social-app

## Overview

This is an Angular frontend for a MEAN-stack social application; the backend is a separate service. The main flow is a user entering routed, often authenticated screens, where components load or mutate account, follow, publication, and message data through Angular services to the API. The graph preserves those distinct capabilities and the shared model layer. Relationships are limited to routes and calls supported by excerpts, SOURCE INDEX references, or the README; unsampled behavior is not inferred.

Main entry points: [`src/app/services/user.service.ts`](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/user.service.ts) (User service), [`src/app/app.routing.ts`](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/app.routing.ts) (App routes), [`src/app/messages/messages.routing.ts`](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/messages.routing.ts) (Message routes), [`src/app/services/follow.service.ts`](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/follow.service.ts) (Follow service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and routing"]
  node_routes["App routes<br/>[app.routing.ts]"]
  node_home["Home<br/>[home.component.ts]"]
end

subgraph group_accounts["Accounts and social"]
  node_login["Login<br/>[login.component.ts]"]
  node_register["Registration"]
  node_user_edit["Account editing"]
  node_users["People directory<br/>[users.component.ts]"]
  node_profile["User profile"]
  node_following["Following list"]
  node_followed["Followers list"]
end

subgraph group_publications["Publications"]
  node_sidebar["Post composer"]
  node_timeline["Timeline"]
  node_publications_view["User publications"]
end

subgraph group_messaging["Direct messages"]
  node_message_routes["Message routes"]
  node_message_main["Messages home<br/>[main.component.ts]"]
  node_message_add["Compose message<br/>[add.component.ts]"]
  node_received["Received messages"]
  node_sent["Sent messages"]
  node_conversation["Conversation"]
  node_message_users["Message recipients<br/>[users.component.ts]"]
end

subgraph group_shared["Services and models"]
  node_guard["Auth guard<br/>[user.guard.ts]"]
  node_user_service["User service<br/>[user.service.ts]"]
  node_follow_service["Follow service<br/>[follow.service.ts]"]
  node_publication_service["Publication service"]
  node_upload_service["Upload service<br/>[upload.service.ts]"]
  node_message_service["Message service<br/>[message.service.ts]"]
  node_user_model["User model<br/>[user.ts]"]
  node_follow_model["Follow model<br/>[follow.ts]"]
  node_publication_model["Publication model<br/>[publication.ts]"]
  node_message_model["Message model<br/>[message.ts]"]
end

node_person(("Social user"))
node_api{{"Social backend API"}}

node_person -->|"opens screens"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_register
node_routes -->|"routes to"| node_user_edit
node_routes -->|"routes to"| node_users
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_following
node_routes -->|"routes to"| node_followed
node_routes -->|"routes to"| node_timeline
node_routes -->|"guards access"| node_guard
node_message_routes -->|"routes to"| node_message_main
node_message_routes -->|"routes to"| node_message_add
node_message_routes -->|"routes to"| node_received
node_message_routes -->|"routes to"| node_sent
node_message_routes -->|"routes to"| node_conversation
node_message_routes -->|"routes to"| node_message_users
node_message_routes -->|"guards access"| node_guard
node_home -->|"loads identity"| node_user_service
node_login -->|"authenticates"| node_user_service
node_register -->|"registers account"| node_user_service
node_user_edit -->|"updates account"| node_user_service
node_user_edit -->|"uploads image"| node_upload_service
node_users -->|"loads people"| node_user_service
node_users -->|"manages follows"| node_follow_service
node_profile -->|"loads profile"| node_user_service
node_profile -->|"manages follows"| node_follow_service
node_following -->|"loads profile"| node_user_service
node_following -->|"loads follows"| node_follow_service
node_followed -->|"loads profile"| node_user_service
node_followed -->|"loads followers"| node_follow_service
node_sidebar -->|"creates posts"| node_publication_service
node_sidebar -->|"uploads media"| node_upload_service
node_timeline -->|"loads posts"| node_publication_service
node_publications_view -->|"loads posts"| node_publication_service
node_message_add -->|"sends message"| node_message_service
node_received -->|"loads inbox"| node_message_service
node_sent -->|"loads sent"| node_message_service
node_conversation -->|"loads conversation"| node_message_service
node_message_add -->|"loads recipients"| node_user_service
node_message_add -->|"loads follows"| node_follow_service
node_conversation -->|"loads participant"| node_user_service
node_conversation -->|"loads follows"| node_follow_service
node_message_users -->|"loads people"| node_user_service
node_message_users -->|"loads follows"| node_follow_service
node_received -->|"loads users"| node_user_service
node_received -->|"loads follows"| node_follow_service
node_sent -->|"loads users"| node_user_service

click node_routes "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/app.routing.ts"
click node_message_routes "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/messages.routing.ts"
click node_home "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/home/home.component.ts"
click node_login "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/login/login.component.ts"
click node_register "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/register/register.component.ts"
click node_user_edit "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/user-edit/user-edit.component.ts"
click node_guard "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/user.guard.ts"
click node_users "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/users/users.component.ts"
click node_profile "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/profile/profile.component.ts"
click node_following "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/following/following.component.ts"
click node_followed "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/followed/followed.component.ts"
click node_sidebar "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/sidebar/sidebar.component.ts"
click node_timeline "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/timeline/timeline.component.ts"
click node_publications_view "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/publications/publications.component.ts"
click node_message_main "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/main/main.component.ts"
click node_message_add "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/add/add.component.ts"
click node_received "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/received/received.component.ts"
click node_sent "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/sended/sended.component.ts"
click node_conversation "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/conversation/conversation.component.ts"
click node_message_users "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/users/users.component.ts"
click node_user_service "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/user.service.ts"
click node_follow_service "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/follow.service.ts"
click node_publication_service "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/publication.service.ts"
click node_upload_service "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/upload.service.ts"
click node_message_service "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/message.service.ts"
click node_user_model "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/user.ts"
click node_follow_model "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/follow.ts"
click node_publication_model "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/publication.ts"
click node_message_model "https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/message.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_routes,node_home,node_person toneBlue
class node_login,node_register,node_user_edit,node_users,node_profile,node_following,node_followed toneAmber
class node_sidebar,node_timeline,node_publications_view,node_api toneMint
class node_message_routes,node_message_main,node_message_add,node_received,node_sent,node_conversation,node_message_users toneRose
class node_guard,node_user_service,node_follow_service,node_publication_service,node_upload_service,node_message_service,node_user_model,node_follow_model,node_publication_model,node_message_model toneIndigo
```

## Components

### App and routing

- [App routes](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/app.routing.ts): `src/app/app.routing.ts`
- [Home](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/home/home.component.ts): `src/app/components/home/home.component.ts`

### Accounts and social

- [Login](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/login/login.component.ts): `src/app/components/login/login.component.ts`
- [Registration](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/register/register.component.ts): `src/app/components/register/register.component.ts`
- [Account editing](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/user-edit/user-edit.component.ts): `src/app/components/user-edit/user-edit.component.ts`
- [People directory](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/users/users.component.ts): `src/app/components/users/users.component.ts`
- [User profile](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/profile/profile.component.ts): `src/app/components/profile/profile.component.ts`
- [Following list](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/following/following.component.ts): `src/app/components/following/following.component.ts`
- [Followers list](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/followed/followed.component.ts): `src/app/components/followed/followed.component.ts`

### Publications

- [Post composer](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/sidebar/sidebar.component.ts): `src/app/components/sidebar/sidebar.component.ts`
- [Timeline](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/timeline/timeline.component.ts): `src/app/components/timeline/timeline.component.ts`
- [User publications](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/components/publications/publications.component.ts): `src/app/components/publications/publications.component.ts`

### Direct messages

- [Message routes](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/messages.routing.ts): `src/app/messages/messages.routing.ts`
- [Messages home](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/main/main.component.ts): `src/app/messages/components/main/main.component.ts`
- [Compose message](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/add/add.component.ts): `src/app/messages/components/add/add.component.ts`
- [Received messages](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/received/received.component.ts): `src/app/messages/components/received/received.component.ts`
- [Sent messages](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/sended/sended.component.ts): `src/app/messages/components/sended/sended.component.ts`
- [Conversation](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/conversation/conversation.component.ts): `src/app/messages/components/conversation/conversation.component.ts`
- [Message recipients](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/messages/components/users/users.component.ts): `src/app/messages/components/users/users.component.ts`

### Services and models

- [Auth guard](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/user.guard.ts): `src/app/services/user.guard.ts`
- [User service](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/user.service.ts): `src/app/services/user.service.ts`
- [Follow service](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/follow.service.ts): `src/app/services/follow.service.ts`
- [Publication service](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/publication.service.ts): `src/app/services/publication.service.ts`
- [Upload service](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/upload.service.ts): `src/app/services/upload.service.ts`
- [Message service](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/services/message.service.ts): `src/app/services/message.service.ts`
- [User model](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/user.ts): `src/app/models/user.ts`
- [Follow model](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/follow.ts): `src/app/models/follow.ts`
- [Publication model](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/publication.ts): `src/app/models/publication.ts`
- [Message model](https://github.com/rishi0754eegzvbhxhnh/social-app/blob/main/src/app/models/message.ts): `src/app/models/message.ts`

### Other components

- **Social user**
- **Social backend API**

## Connections

- Social user → App routes: opens screens (evidence: `src/app/app.routing.ts`)
- App routes → Home: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Login: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Registration: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Account editing: routes to (evidence: `src/app/app.routing.ts`)
- App routes → People directory: routes to (evidence: `src/app/app.routing.ts`)
- App routes → User profile: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Following list: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Followers list: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Timeline: routes to (evidence: `src/app/app.routing.ts`)
- App routes → Auth guard: guards access (evidence: `src/app/app.routing.ts`)
- Message routes → Messages home: routes to (evidence: `src/app/messages/messages.routing.ts`)
- Message routes → Compose message: routes to (evidence: `src/app/messages/messages.routing.ts`)
- Message routes → Received messages: routes to (evidence: `src/app/messages/messages.routing.ts`)
- Message routes → Sent messages: routes to (evidence: `src/app/messages/messages.routing.ts`)
- Message routes → Conversation: routes to (evidence: `src/app/messages/messages.routing.ts`)
- Message routes → Message recipients: routes to (evidence: `src/app/messages/messages.routing.ts`)
- Message routes → Auth guard: guards access (evidence: `src/app/messages/messages.routing.ts`)
- Home → User service: loads identity (evidence: `src/app/components/home/home.component.ts`)
- Login → User service: authenticates (evidence: `src/app/components/login/login.component.ts`)
- Registration → User service: registers account (evidence: `src/app/components/register/register.component.ts`)
- Account editing → User service: updates account (evidence: `src/app/components/user-edit/user-edit.component.ts`)
- Account editing → Upload service: uploads image (evidence: `src/app/components/user-edit/user-edit.component.ts`)
- People directory → User service: loads people (evidence: `src/app/components/users/users.component.ts`)
- People directory → Follow service: manages follows (evidence: `src/app/components/users/users.component.ts`)
- User profile → User service: loads profile (evidence: `src/app/components/profile/profile.component.ts`)
- User profile → Follow service: manages follows (evidence: `src/app/components/profile/profile.component.ts`)
- Following list → User service: loads profile (evidence: `src/app/components/following/following.component.ts`)
- Following list → Follow service: loads follows (evidence: `src/app/components/following/following.component.ts`)
- Followers list → User service: loads profile (evidence: `src/app/components/followed/followed.component.ts`)
- Followers list → Follow service: loads followers (evidence: `src/app/components/followed/followed.component.ts`)
- Post composer → Publication service: creates posts (evidence: `src/app/components/sidebar/sidebar.component.ts`)
- Post composer → Upload service: uploads media (evidence: `src/app/components/sidebar/sidebar.component.ts`)
- Timeline → Publication service: loads posts (evidence: `src/app/components/timeline/timeline.component.ts`)
- User publications → Publication service: loads posts (evidence: `src/app/components/publications/publications.component.ts`)
- Compose message → Message service: sends message (evidence: `src/app/messages/components/add/add.component.ts`)
- Received messages → Message service: loads inbox (evidence: `src/app/messages/components/received/received.component.ts`)
- Sent messages → Message service: loads sent (evidence: `src/app/messages/components/sended/sended.component.ts`)
- Conversation → Message service: loads conversation (evidence: `src/app/messages/components/conversation/conversation.component.ts`)
- Compose message → User service: loads recipients (evidence: `src/app/messages/components/add/add.component.ts`)
- Compose message → Follow service: loads follows (evidence: `src/app/messages/components/add/add.component.ts`)
- Conversation → User service: loads participant (evidence: `src/app/messages/components/conversation/conversation.component.ts`)
- Conversation → Follow service: loads follows (evidence: `src/app/messages/components/conversation/conversation.component.ts`)
- Message recipients → User service: loads people (evidence: `src/app/messages/components/users/users.component.ts`)
- Message recipients → Follow service: loads follows (evidence: `src/app/messages/components/users/users.component.ts`)
- Received messages → User service: loads users (evidence: `src/app/messages/components/received/received.component.ts`)
- Received messages → Follow service: loads follows (evidence: `src/app/messages/components/received/received.component.ts`)
- Sent messages → User service: loads users (evidence: `src/app/messages/components/sended/sended.component.ts`)
