# sabnekarvineel/fondora-x architecture

> Architecture diagram of the GitHub repository sabnekarvineel/fondora-x, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sabnekarvineel/fondora-x
- Repository: https://github.com/sabnekarvineel/fondora-x

## Overview

Fondora-X is a role-based networking platform for students, freelancers, startups, and investors. Users register or log in, then use social feeds, profiles, messaging, search, jobs, and funding features. The React app communicates with an Express API backed by MongoDB; JWT middleware protects API routes, and Socket.IO supports live messaging and presence. The tree and README establish broad product capabilities, but many feature controllers and screens were not sampled, so their internal call relationships are omitted rather than inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/App.jsx) (App routes), [`backend/server.js`](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/server.js) (HTTP server), [`backend/controllers/postController.js`](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/postController.js) (Posts and feed), [`backend/models/User.js`](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/User.js) (User records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routes<br/>[App.jsx]"]
  node_authctx["Auth state<br/>[AuthContext.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_profileui["Profile<br/>[Profile.jsx]"]
  node_searchui["Search<br/>[Search.jsx]"]
  node_fundingui["Funding detail<br/>[FundingDetail.jsx]"]
  node_jobui["Job detail<br/>[JobDetail.jsx]"]
  node_adminui["Admin<br/>[Admin.jsx]"]
  node_settingsui["Settings<br/>[Settings.jsx]"]
end

subgraph group_api["API and identity"]
  node_server["HTTP server<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_authcontroller["Authentication<br/>[authController.js]"]
  node_authmw["JWT protection<br/>[auth.js]"]
end

subgraph group_social["Social and messaging"]
  node_posts["Posts and feed<br/>[postController.js]"]
  node_postroutes["Post routes<br/>[postRoutes.js]"]
  node_messages["Messaging"]
  node_messageroutes["Message routes<br/>[messageRoutes.js]"]
  node_encryption["Encryption keys"]
  node_socket["Live events<br/>[socketHandler.js]"]
end

subgraph group_market["Marketplace"]
  node_marketfeatures["Jobs and funding"]
end

subgraph group_data["Persistence and realtime"]
  node_userstore[("User records<br/>[User.js]")]
  node_poststore[("Post records<br/>[Post.js]")]
  node_messagestore[("Message records<br/>[Message.js]")]
  node_conversationstore[("Conversations<br/>[Conversation.js]")]
  node_notification["Notifications"]
  node_db["MongoDB connection<br/>[db.js]"]
end

node_user(("Platform user"))

node_user -->|"uses"| node_app
node_app -->|"reads auth state"| node_authctx
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_profileui
node_app -->|"routes to"| node_searchui
node_app -->|"routes to"| node_fundingui
node_app -->|"routes to"| node_jobui
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_settingsui
node_authctx -->|"calls auth API"| node_authroutes
node_server -->|"connects"| node_db
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_postroutes
node_server -->|"mounts"| node_messageroutes
node_server -->|"initializes"| node_socket
node_authroutes -->|"routes requests"| node_authcontroller
node_authroutes -->|"protects routes"| node_authmw
node_authcontroller -->|"reads and writes"| node_userstore
node_postroutes -->|"routes requests"| node_posts
node_postroutes -->|"protects routes"| node_authmw
node_posts -->|"reads and writes"| node_poststore
node_posts -->|"queries users"| node_userstore
node_posts -->|"creates notifications"| node_notification
node_posts -.->|"emits events"| node_socket
node_messageroutes -->|"routes requests"| node_messages
node_messageroutes -->|"protects routes"| node_authmw
node_messages -->|"reads and writes"| node_messagestore
node_messages -->|"reads and writes"| node_conversationstore
node_messages -->|"checks participants"| node_userstore
node_encryption -->|"stores key data"| node_userstore
node_encryption -->|"stores shared keys"| node_conversationstore
node_socket -->|"authenticates sockets"| node_userstore
node_user -.->|"uses jobs and funding"| node_marketfeatures

click node_app "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/App.jsx"
click node_authctx "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/context/AuthContext.jsx"
click node_dashboard "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Dashboard.jsx"
click node_profileui "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Profile.jsx"
click node_searchui "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Search.jsx"
click node_fundingui "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/FundingDetail.jsx"
click node_jobui "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/JobDetail.jsx"
click node_adminui "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Admin.jsx"
click node_settingsui "https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Settings.jsx"
click node_server "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/server.js"
click node_authroutes "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/routes/authRoutes.js"
click node_authcontroller "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/authController.js"
click node_authmw "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/middleware/auth.js"
click node_posts "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/postController.js"
click node_postroutes "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/routes/postRoutes.js"
click node_messages "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/messageController.js"
click node_messageroutes "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/routes/messageRoutes.js"
click node_encryption "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/encryptionController.js"
click node_socket "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/socket/socketHandler.js"
click node_marketfeatures "https://github.com/sabnekarvineel/fondora-x/tree/main/backend/controllers"
click node_userstore "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/User.js"
click node_poststore "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/Post.js"
click node_messagestore "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/Message.js"
click node_conversationstore "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/Conversation.js"
click node_notification "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/notificationController.js"
click node_db "https://github.com/sabnekarvineel/fondora-x/blob/main/backend/config/db.js"

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_app,node_authctx,node_dashboard,node_profileui,node_searchui,node_fundingui,node_jobui,node_adminui,node_settingsui,node_user toneBlue
class node_server,node_authroutes,node_authcontroller,node_authmw toneAmber
class node_posts,node_postroutes,node_messages,node_messageroutes,node_encryption,node_socket toneMint
class node_marketfeatures toneRose
class node_userstore,node_poststore,node_messagestore,node_conversationstore,node_notification,node_db toneIndigo
```

## Components

### Web client

- [App routes](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth state](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Dashboard](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Dashboard.jsx): `frontend/src/components/Dashboard.jsx`
- [Profile](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Profile.jsx): `frontend/src/components/Profile.jsx`
- [Search](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Search.jsx): `frontend/src/components/Search.jsx`
- [Funding detail](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/FundingDetail.jsx): `frontend/src/components/FundingDetail.jsx`
- [Job detail](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/JobDetail.jsx): `frontend/src/components/JobDetail.jsx`
- [Admin](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Admin.jsx): `frontend/src/components/Admin.jsx`
- [Settings](https://github.com/sabnekarvineel/fondora-x/blob/main/frontend/src/components/Settings.jsx): `frontend/src/components/Settings.jsx`

### API and identity

- [HTTP server](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/server.js): `backend/server.js`
- [Auth routes](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Authentication](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [JWT protection](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`

### Social and messaging

- [Posts and feed](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/postController.js): `backend/controllers/postController.js`
- [Post routes](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/routes/postRoutes.js): `backend/routes/postRoutes.js`
- [Messaging](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/messageController.js): `backend/controllers/messageController.js`
- [Message routes](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/routes/messageRoutes.js): `backend/routes/messageRoutes.js`
- [Encryption keys](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/encryptionController.js): `backend/controllers/encryptionController.js`
- [Live events](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/socket/socketHandler.js): `backend/socket/socketHandler.js`

### Marketplace

- [Jobs and funding](https://github.com/sabnekarvineel/fondora-x/tree/main/backend/controllers): `backend/controllers`

### Persistence and realtime

- [User records](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/User.js): `backend/models/User.js`
- [Post records](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/Post.js): `backend/models/Post.js`
- [Message records](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/Message.js): `backend/models/Message.js`
- [Conversations](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/models/Conversation.js): `backend/models/Conversation.js`
- [Notifications](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/controllers/notificationController.js): `backend/controllers/notificationController.js`
- [MongoDB connection](https://github.com/sabnekarvineel/fondora-x/blob/main/backend/config/db.js): `backend/config/db.js`

### Other components

- **Platform user**

## Connections

- Platform user → App routes: uses (evidence: `frontend/src/App.jsx`)
- App routes → Auth state: reads auth state (evidence: `frontend/src/App.jsx`)
- App routes → Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Profile: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Search: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Funding detail: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Job detail: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Admin: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Settings: routes to (evidence: `frontend/src/App.jsx`)
- Auth state → Auth routes: calls auth API (evidence: `frontend/src/context/AuthContext.jsx`)
- HTTP server → MongoDB connection: connects (evidence: `backend/server.js`)
- HTTP server → Auth routes: mounts (evidence: `backend/server.js`)
- HTTP server → Post routes: mounts (evidence: `backend/server.js`)
- HTTP server → Message routes: mounts (evidence: `backend/server.js`)
- HTTP server → Live events: initializes (evidence: `backend/server.js`)
- Auth routes → Authentication: routes requests
- Auth routes → JWT protection: protects routes
- Authentication → User records: reads and writes (evidence: `backend/controllers/authController.js`)
- Post routes → Posts and feed: routes requests (evidence: `backend/routes/postRoutes.js`)
- Post routes → JWT protection: protects routes (evidence: `backend/routes/postRoutes.js`)
- Posts and feed → Post records: reads and writes (evidence: `backend/controllers/postController.js`)
- Posts and feed → User records: queries users (evidence: `backend/controllers/postController.js`)
- Posts and feed → Notifications: creates notifications (evidence: `backend/controllers/postController.js`)
- Posts and feed → Live events: emits events (evidence: `backend/controllers/postController.js`)
- Message routes → Messaging: routes requests (evidence: `backend/routes/messageRoutes.js`)
- Message routes → JWT protection: protects routes (evidence: `backend/routes/messageRoutes.js`)
- Messaging → Message records: reads and writes (evidence: `backend/controllers/messageController.js`)
- Messaging → Conversations: reads and writes (evidence: `backend/controllers/messageController.js`)
- Messaging → User records: checks participants (evidence: `backend/controllers/messageController.js`)
- Encryption keys → User records: stores key data (evidence: `backend/controllers/encryptionController.js`)
- Encryption keys → Conversations: stores shared keys (evidence: `backend/controllers/encryptionController.js`)
- Live events → User records: authenticates sockets (evidence: `backend/socket/socketHandler.js`)
- Platform user → Jobs and funding: uses jobs and funding
