# harshrai2910/networking_system architecture

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

- Interactive diagram: https://gitdiagram.com/harshrai2910/networking_system
- Repository: https://github.com/harshrai2910/networking_system

## Overview

ConnectSD is a student networking platform. Students register or log in, build structured profiles, discover peers, send connection requests, and publish image-and-text posts; other users browse a feed and interact with posts. The React app’s API services call an Express session-based API, whose controllers coordinate MongoDB models and media/moderation services. The graph preserves the documented profile, search, network, feed, analytics, and moderation capabilities. Some feature links are documented or indexed rather than shown in full source excerpts; those evidence limits are reflected in the edges.

Main entry points: [`client/src/App.jsx`](https://github.com/harshrai2910/networking_system/blob/main/client/src/App.jsx) (React app), [`server/app.js`](https://github.com/harshrai2910/networking_system/blob/main/server/app.js) (API bootstrap), [`server/controller/userPostController.js`](https://github.com/harshrai2910/networking_system/blob/main/server/controller/userPostController.js) (Post workflow), [`server/controller/userController.js`](https://github.com/harshrai2910/networking_system/blob/main/server/controller/userController.js) (Profile management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student client"]
  node_app["React app<br/>[App.jsx]"]
  node_authui["Auth forms<br/>[signup.jsx]"]
  node_profileui["Profile editor<br/>[profile.jsx]"]
  node_discoveryui["Peer discovery"]
  node_networkui["Network views<br/>[MyNetwork.jsx]"]
  node_feedui["Feed and posts<br/>[dashboard.jsx]"]
  node_authsvc["Auth API client"]
  node_usersvc["Profile API client"]
  node_searchsvc["Search API client"]
  node_postsvc["Post API client"]
end

subgraph group_api["Express API"]
  node_apiapp["API bootstrap<br/>[app.js]"]
  node_authrouter["Auth routes<br/>[authRouter.js]"]
  node_userrouter["Profile routes<br/>[userRouter.js]"]
  node_searchrouter["Search routes<br/>[searchRouter.js]"]
  node_networkrouter["Network routes<br/>[networkRouter.js]"]
  node_postrouter["Post routes<br/>[userPostRouter.js]"]
  node_authctrl["Authentication<br/>[authController.js]"]
  node_userctrl["Profile management<br/>[userController.js]"]
  node_searchctrl["Student search"]
  node_networkctrl["Connection workflow"]
  node_postctrl["Post workflow"]
  node_upload["Media upload"]
  node_moderation["Content moderation"]
end

subgraph group_data["Domain data"]
  node_user[("User records<br/>[user.js]")]
  node_connection[("Connections<br/>[userConnections.js]")]
  node_post[("Post records<br/>[userPost.js]")]
end

subgraph group_integrations["External services"]
  node_mongo[("MongoDB")]
  node_cloudinary[("Cloudinary")]
  node_gemini["Gemini API"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"routes to"| node_authui
node_app -->|"routes to"| node_profileui
node_app -->|"routes to"| node_feedui
node_app -->|"routes to"| node_networkui
node_app -->|"routes to"| node_discoveryui
node_authui -->|"calls"| node_authsvc
node_app -->|"checks session"| node_authsvc
node_app -->|"loads profile"| node_usersvc
node_discoveryui -->|"searches peers"| node_searchsvc
node_feedui -->|"loads feed"| node_postsvc
node_apiapp -->|"mounts"| node_authrouter
node_apiapp -->|"mounts"| node_userrouter
node_apiapp -->|"mounts"| node_searchrouter
node_apiapp -->|"mounts"| node_networkrouter
node_apiapp -->|"mounts"| node_postrouter
node_authrouter -->|"dispatches"| node_authctrl
node_searchrouter -->|"dispatches"| node_searchctrl
node_userrouter -->|"dispatches"| node_userctrl
node_networkrouter -->|"dispatches"| node_networkctrl
node_postrouter -->|"dispatches"| node_postctrl
node_authctrl -->|"reads and writes"| node_user
node_userctrl -->|"reads and writes"| node_user
node_userctrl -->|"counts accepted"| node_connection
node_searchctrl -->|"searches"| node_user
node_networkctrl -->|"updates states"| node_connection
node_postctrl -->|"reads and writes"| node_post
node_postctrl -->|"checks accepted links"| node_connection
node_userctrl -->|"uploads profile image"| node_upload
node_postctrl -->|"uploads post image"| node_upload
node_postctrl -->|"moderates image"| node_moderation
node_upload -->|"uploads media"| node_cloudinary
node_moderation -.->|"checks content"| node_gemini
node_apiapp -->|"connects and stores sessions"| node_mongo
node_user -.->|"persists records"| node_mongo
node_connection -.->|"persists states"| node_mongo
node_post -.->|"persists posts"| node_mongo
node_authsvc -->|"sends credentials"| node_authrouter
node_searchsvc -->|"requests search"| node_searchrouter
node_postsvc -->|"requests post actions"| node_postrouter
node_usersvc -.->|"requests profile data"| node_userrouter

click node_app "https://github.com/harshrai2910/networking_system/blob/main/client/src/App.jsx"
click node_authui "https://github.com/harshrai2910/networking_system/blob/main/client/src/components/authentication/signup.jsx"
click node_profileui "https://github.com/harshrai2910/networking_system/blob/main/client/src/components/userProfile/profile/profile.jsx"
click node_discoveryui "https://github.com/harshrai2910/networking_system/blob/main/client/src/components/navigation/showUsersProfile.jsx"
click node_networkui "https://github.com/harshrai2910/networking_system/blob/main/client/src/components/userProfile/userNetwork/MyNetwork.jsx"
click node_feedui "https://github.com/harshrai2910/networking_system/blob/main/client/src/components/dashboard/dashboard.jsx"
click node_authsvc "https://github.com/harshrai2910/networking_system/blob/main/client/src/services/authLinkServices.js"
click node_usersvc "https://github.com/harshrai2910/networking_system/blob/main/client/src/services/userLinkServices.js"
click node_searchsvc "https://github.com/harshrai2910/networking_system/blob/main/client/src/services/searchLinkServices.js"
click node_postsvc "https://github.com/harshrai2910/networking_system/blob/main/client/src/services/userPostLinkServices.js"
click node_apiapp "https://github.com/harshrai2910/networking_system/blob/main/server/app.js"
click node_authrouter "https://github.com/harshrai2910/networking_system/blob/main/server/router/authRouter.js"
click node_userrouter "https://github.com/harshrai2910/networking_system/blob/main/server/router/userRouter.js"
click node_searchrouter "https://github.com/harshrai2910/networking_system/blob/main/server/router/searchRouter.js"
click node_networkrouter "https://github.com/harshrai2910/networking_system/blob/main/server/router/networkRouter.js"
click node_postrouter "https://github.com/harshrai2910/networking_system/blob/main/server/router/userPostRouter.js"
click node_authctrl "https://github.com/harshrai2910/networking_system/blob/main/server/controller/authController.js"
click node_userctrl "https://github.com/harshrai2910/networking_system/blob/main/server/controller/userController.js"
click node_searchctrl "https://github.com/harshrai2910/networking_system/blob/main/server/controller/searchController.js"
click node_networkctrl "https://github.com/harshrai2910/networking_system/blob/main/server/controller/networkController.js"
click node_postctrl "https://github.com/harshrai2910/networking_system/blob/main/server/controller/userPostController.js"
click node_user "https://github.com/harshrai2910/networking_system/blob/main/server/model/user.js"
click node_connection "https://github.com/harshrai2910/networking_system/blob/main/server/model/userConnections.js"
click node_post "https://github.com/harshrai2910/networking_system/blob/main/server/model/userPost.js"
click node_upload "https://github.com/harshrai2910/networking_system/blob/main/server/service/cloudinaryService.js"
click node_moderation "https://github.com/harshrai2910/networking_system/blob/main/server/service/moderationService.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_authui,node_profileui,node_discoveryui,node_networkui,node_feedui,node_authsvc,node_usersvc,node_searchsvc,node_postsvc toneBlue
class node_apiapp,node_authrouter,node_userrouter,node_searchrouter,node_networkrouter,node_postrouter,node_authctrl,node_userctrl,node_searchctrl,node_networkctrl,node_postctrl,node_upload,node_moderation toneAmber
class node_user,node_connection,node_post toneMint
class node_mongo,node_cloudinary,node_gemini toneRose
class node_student toneIndigo
```

## Components

### Student client

- [React app](https://github.com/harshrai2910/networking_system/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Auth forms](https://github.com/harshrai2910/networking_system/blob/main/client/src/components/authentication/signup.jsx): `client/src/components/authentication/signup.jsx`
- [Profile editor](https://github.com/harshrai2910/networking_system/blob/main/client/src/components/userProfile/profile/profile.jsx): `client/src/components/userProfile/profile/profile.jsx`
- [Peer discovery](https://github.com/harshrai2910/networking_system/blob/main/client/src/components/navigation/showUsersProfile.jsx): `client/src/components/navigation/showUsersProfile.jsx`
- [Network views](https://github.com/harshrai2910/networking_system/blob/main/client/src/components/userProfile/userNetwork/MyNetwork.jsx): `client/src/components/userProfile/userNetwork/MyNetwork.jsx`
- [Feed and posts](https://github.com/harshrai2910/networking_system/blob/main/client/src/components/dashboard/dashboard.jsx): `client/src/components/dashboard/dashboard.jsx`
- [Auth API client](https://github.com/harshrai2910/networking_system/blob/main/client/src/services/authLinkServices.js): `client/src/services/authLinkServices.js`
- [Profile API client](https://github.com/harshrai2910/networking_system/blob/main/client/src/services/userLinkServices.js): `client/src/services/userLinkServices.js`
- [Search API client](https://github.com/harshrai2910/networking_system/blob/main/client/src/services/searchLinkServices.js): `client/src/services/searchLinkServices.js`
- [Post API client](https://github.com/harshrai2910/networking_system/blob/main/client/src/services/userPostLinkServices.js): `client/src/services/userPostLinkServices.js`

### Express API

- [API bootstrap](https://github.com/harshrai2910/networking_system/blob/main/server/app.js): `server/app.js`
- [Auth routes](https://github.com/harshrai2910/networking_system/blob/main/server/router/authRouter.js): `server/router/authRouter.js`
- [Profile routes](https://github.com/harshrai2910/networking_system/blob/main/server/router/userRouter.js): `server/router/userRouter.js`
- [Search routes](https://github.com/harshrai2910/networking_system/blob/main/server/router/searchRouter.js): `server/router/searchRouter.js`
- [Network routes](https://github.com/harshrai2910/networking_system/blob/main/server/router/networkRouter.js): `server/router/networkRouter.js`
- [Post routes](https://github.com/harshrai2910/networking_system/blob/main/server/router/userPostRouter.js): `server/router/userPostRouter.js`
- [Authentication](https://github.com/harshrai2910/networking_system/blob/main/server/controller/authController.js): `server/controller/authController.js`
- [Profile management](https://github.com/harshrai2910/networking_system/blob/main/server/controller/userController.js): `server/controller/userController.js`
- [Student search](https://github.com/harshrai2910/networking_system/blob/main/server/controller/searchController.js): `server/controller/searchController.js`
- [Connection workflow](https://github.com/harshrai2910/networking_system/blob/main/server/controller/networkController.js): `server/controller/networkController.js`
- [Post workflow](https://github.com/harshrai2910/networking_system/blob/main/server/controller/userPostController.js): `server/controller/userPostController.js`
- [Media upload](https://github.com/harshrai2910/networking_system/blob/main/server/service/cloudinaryService.js): `server/service/cloudinaryService.js`
- [Content moderation](https://github.com/harshrai2910/networking_system/blob/main/server/service/moderationService.js): `server/service/moderationService.js`

### Domain data

- [User records](https://github.com/harshrai2910/networking_system/blob/main/server/model/user.js): `server/model/user.js`
- [Connections](https://github.com/harshrai2910/networking_system/blob/main/server/model/userConnections.js): `server/model/userConnections.js`
- [Post records](https://github.com/harshrai2910/networking_system/blob/main/server/model/userPost.js): `server/model/userPost.js`

### External services

- **MongoDB**
- **Cloudinary**
- **Gemini API**

### Other components

- **Student**

## Connections

- Student → React app: uses (evidence: `client/src/App.jsx`)
- React app → Auth forms: routes to (evidence: `client/src/App.jsx`)
- React app → Profile editor: routes to (evidence: `client/src/App.jsx`)
- React app → Feed and posts: routes to (evidence: `client/src/App.jsx`)
- React app → Network views: routes to (evidence: `client/src/App.jsx`)
- React app → Peer discovery: routes to (evidence: `client/src/App.jsx`)
- Auth forms → Auth API client: calls (evidence: `client/src/components/authentication/signup.jsx`)
- React app → Auth API client: checks session (evidence: `client/src/App.jsx`)
- React app → Profile API client: loads profile (evidence: `client/src/App.jsx`)
- Peer discovery → Search API client: searches peers (evidence: `client/src/components/navigation/showUsersProfile.jsx`)
- Feed and posts → Post API client: loads feed (evidence: `client/src/components/dashboard/dashboard.jsx`)
- API bootstrap → Auth routes: mounts (evidence: `server/app.js`)
- API bootstrap → Profile routes: mounts (evidence: `server/app.js`)
- API bootstrap → Search routes: mounts (evidence: `server/app.js`)
- API bootstrap → Network routes: mounts (evidence: `server/app.js`)
- API bootstrap → Post routes: mounts (evidence: `server/app.js`)
- Auth routes → Authentication: dispatches (evidence: `server/router/authRouter.js`)
- Search routes → Student search: dispatches (evidence: `server/router/searchRouter.js`)
- Profile routes → Profile management: dispatches (evidence: `server/router/userRouter.js`)
- Network routes → Connection workflow: dispatches (evidence: `server/router/networkRouter.js`)
- Post routes → Post workflow: dispatches (evidence: `server/router/userPostRouter.js`)
- Authentication → User records: reads and writes (evidence: `server/controller/authController.js`)
- Profile management → User records: reads and writes (evidence: `server/controller/userController.js`)
- Profile management → Connections: counts accepted (evidence: `server/controller/userController.js`)
- Student search → User records: searches (evidence: `server/controller/searchController.js`)
- Connection workflow → Connections: updates states (evidence: `server/controller/networkController.js`)
- Post workflow → Post records: reads and writes (evidence: `server/controller/userPostController.js`)
- Post workflow → Connections: checks accepted links (evidence: `server/controller/userPostController.js`)
- Profile management → Media upload: uploads profile image (evidence: `server/controller/userController.js`)
- Post workflow → Media upload: uploads post image (evidence: `server/controller/userPostController.js`)
- Post workflow → Content moderation: moderates image (evidence: `server/controller/userPostController.js`)
- Media upload → Cloudinary: uploads media (evidence: `server/service/cloudinaryService.js`)
- Content moderation → Gemini API: checks content (evidence: `README.md`)
- API bootstrap → MongoDB: connects and stores sessions (evidence: `server/app.js`)
- User records → MongoDB: persists records (evidence: `README.md`)
- Connections → MongoDB: persists states (evidence: `README.md`)
- Post records → MongoDB: persists posts (evidence: `README.md`)
- Auth API client → Auth routes: sends credentials (evidence: `client/src/services/authLinkServices.js`)
- Search API client → Search routes: requests search (evidence: `client/src/services/searchLinkServices.js`)
- Post API client → Post routes: requests post actions (evidence: `client/src/services/userPostLinkServices.js`)
- Profile API client → Profile routes: requests profile data
