# hethenthira/reconnectify architecture

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

- Interactive diagram: https://gitdiagram.com/hethenthira/reconnectify
- Repository: https://github.com/hethenthira/reconnectify

## Overview

Reconnectify is a student–alumni networking application: users register or log in, then use protected community features to discover peers, connect, communicate, and participate in the network. The client is a routed React app with shared authentication and API services; an Express server exposes domain routes backed by MongoDB models. The graph preserves the documented client capabilities, but many page-to-endpoint and route-to-model links are unsampled, so those relationships are omitted rather than inferred.

Main entry points: [`Client/src/App.jsx`](https://github.com/hethenthira/reconnectify/blob/main/Client/src/App.jsx) (Route shell), [`Client/src/services/api.js`](https://github.com/hethenthira/reconnectify/blob/main/Client/src/services/api.js) (API client), [`Server/Server/server.js`](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/server.js) (HTTP server), [`Client/src/context/MessageContext.jsx`](https://github.com/hethenthira/reconnectify/blob/main/Client/src/context/MessageContext.jsx) (Unread messages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client app"]
  node_app["Route shell<br/>[App.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_identity["Identity and profiles"]
  node_authctx["Auth state<br/>[AuthContext.jsx]"]
  node_authhook["Auth hook<br/>[useAuth.js]"]
  node_registration["Registration<br/>[Register.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_directory["Member directory<br/>[Directory.jsx]"]
  node_adminui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_authroutes["Auth routes<br/>[auth.js]"]
  node_useroutes["User routes<br/>[users.js]"]
  node_usermodel[("User records<br/>[User.js]")]
end

subgraph group_community["Community features"]
  node_feed["Community feed<br/>[Feed.jsx]"]
  node_connections["Connections<br/>[Connections.jsx]"]
  node_messages["Messaging<br/>[Messages.jsx]"]
  node_messagectx["Unread messages<br/>[MessageContext.jsx]"]
  node_events["Events<br/>[Events.jsx]"]
  node_opportunities["Opportunities<br/>[Opportunities.jsx]"]
  node_dashboard["Member dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_server["Server and data"]
  node_server["HTTP server<br/>[server.js]"]
  node_authmw["JWT authorization<br/>[auth.js]"]
  node_domainroutes["Domain routes"]
  node_db["MongoDB connection<br/>[db.js]"]
end

node_member(("Member"))
node_mongodb[("MongoDB")]
node_socket["Socket service"]

node_member -->|"browses"| node_app
node_app -->|"checks auth"| node_authhook
node_app -->|"routes to"| node_registration
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_directory
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_feed
node_app -->|"routes to"| node_messages
node_app -->|"routes to"| node_events
node_app -->|"routes to"| node_opportunities
node_app -->|"routes to"| node_dashboard
node_member -->|"registers or logs in"| node_authctx
node_authctx -->|"calls auth API"| node_api
node_authctx -->|"updates profile"| node_api
node_profile -->|"calls profile API"| node_api
node_feed -->|"loads and changes posts"| node_api
node_messages -->|"calls messaging API"| node_api
node_messagectx -->|"fetches unread count"| node_api
node_messagectx -->|"reads identity"| node_authhook
node_messagectx -.->|"connects for updates"| node_socket
node_api -.->|"sends HTTP requests"| node_server
node_server -->|"mounts routes"| node_authroutes
node_server -->|"mounts routes"| node_useroutes
node_server -->|"mounts routes"| node_domainroutes
node_authroutes -->|"reads and writes"| node_usermodel
node_useroutes -->|"reads and updates"| node_usermodel
node_useroutes -->|"guards endpoints"| node_authmw
node_server -->|"connects"| node_mongodb
node_db -.->|"configures connection"| node_mongodb

click node_app "https://github.com/hethenthira/reconnectify/blob/main/Client/src/App.jsx"
click node_authctx "https://github.com/hethenthira/reconnectify/blob/main/Client/src/context/AuthContext.jsx"
click node_authhook "https://github.com/hethenthira/reconnectify/blob/main/Client/src/hooks/useAuth.js"
click node_api "https://github.com/hethenthira/reconnectify/blob/main/Client/src/services/api.js"
click node_registration "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Register.jsx"
click node_profile "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Profile.jsx"
click node_directory "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Directory.jsx"
click node_adminui "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/AdminDashboard.jsx"
click node_feed "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Feed.jsx"
click node_connections "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Connections.jsx"
click node_messages "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Messages.jsx"
click node_messagectx "https://github.com/hethenthira/reconnectify/blob/main/Client/src/context/MessageContext.jsx"
click node_events "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Events.jsx"
click node_opportunities "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Opportunities.jsx"
click node_dashboard "https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Dashboard.jsx"
click node_server "https://github.com/hethenthira/reconnectify/blob/main/Server/Server/server.js"
click node_authroutes "https://github.com/hethenthira/reconnectify/blob/main/Server/Server/routes/auth.js"
click node_useroutes "https://github.com/hethenthira/reconnectify/blob/main/Server/Server/routes/users.js"
click node_authmw "https://github.com/hethenthira/reconnectify/blob/main/Server/Server/middleware/auth.js"
click node_usermodel "https://github.com/hethenthira/reconnectify/blob/main/Server/Server/models/User.js"
click node_domainroutes "https://github.com/hethenthira/reconnectify/tree/main/Server/Server/routes"
click node_db "https://github.com/hethenthira/reconnectify/blob/main/Server/Server/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_api toneBlue
class node_authctx,node_authhook,node_registration,node_profile,node_directory,node_adminui,node_authroutes,node_useroutes,node_usermodel,node_mongodb toneAmber
class node_feed,node_connections,node_messages,node_messagectx,node_events,node_opportunities,node_dashboard toneMint
class node_server,node_authmw,node_domainroutes,node_db toneRose
class node_member,node_socket toneIndigo
```

## Components

### Client app

- [Route shell](https://github.com/hethenthira/reconnectify/blob/main/Client/src/App.jsx): `Client/src/App.jsx`
- [API client](https://github.com/hethenthira/reconnectify/blob/main/Client/src/services/api.js): `Client/src/services/api.js`

### Identity and profiles

- [Auth state](https://github.com/hethenthira/reconnectify/blob/main/Client/src/context/AuthContext.jsx): `Client/src/context/AuthContext.jsx`
- [Auth hook](https://github.com/hethenthira/reconnectify/blob/main/Client/src/hooks/useAuth.js): `Client/src/hooks/useAuth.js`
- [Registration](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Register.jsx): `Client/src/pages/Register.jsx`
- [Profile](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Profile.jsx): `Client/src/pages/Profile.jsx`
- [Member directory](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Directory.jsx): `Client/src/pages/Directory.jsx`
- [Admin dashboard](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/AdminDashboard.jsx): `Client/src/pages/AdminDashboard.jsx`
- [Auth routes](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/routes/auth.js): `Server/Server/routes/auth.js`
- [User routes](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/routes/users.js): `Server/Server/routes/users.js`
- [User records](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/models/User.js): `Server/Server/models/User.js`

### Community features

- [Community feed](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Feed.jsx): `Client/src/pages/Feed.jsx`
- [Connections](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Connections.jsx): `Client/src/pages/Connections.jsx`
- [Messaging](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Messages.jsx): `Client/src/pages/Messages.jsx`
- [Unread messages](https://github.com/hethenthira/reconnectify/blob/main/Client/src/context/MessageContext.jsx): `Client/src/context/MessageContext.jsx`
- [Events](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Events.jsx): `Client/src/pages/Events.jsx`
- [Opportunities](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Opportunities.jsx): `Client/src/pages/Opportunities.jsx`
- [Member dashboard](https://github.com/hethenthira/reconnectify/blob/main/Client/src/pages/Dashboard.jsx): `Client/src/pages/Dashboard.jsx`

### Server and data

- [HTTP server](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/server.js): `Server/Server/server.js`
- [JWT authorization](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/middleware/auth.js): `Server/Server/middleware/auth.js`
- [Domain routes](https://github.com/hethenthira/reconnectify/tree/main/Server/Server/routes): `Server/Server/routes`
- [MongoDB connection](https://github.com/hethenthira/reconnectify/blob/main/Server/Server/config/db.js): `Server/Server/config/db.js`

### Other components

- **Member**
- **MongoDB**
- **Socket service**

## Connections

- Member → Route shell: browses (evidence: `Client/src/App.jsx`)
- Route shell → Auth hook: checks auth (evidence: `Client/src/App.jsx`)
- Route shell → Registration: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Profile: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Member directory: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Admin dashboard: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Community feed: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Messaging: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Events: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Opportunities: routes to (evidence: `Client/src/App.jsx`)
- Route shell → Member dashboard: routes to (evidence: `Client/src/App.jsx`)
- Member → Auth state: registers or logs in (evidence: `Client/src/context/AuthContext.jsx`)
- Auth state → API client: calls auth API (evidence: `Client/src/context/AuthContext.jsx`)
- Auth state → API client: updates profile (evidence: `Client/src/context/AuthContext.jsx`)
- Profile → API client: calls profile API (evidence: `Client/src/pages/Profile.jsx`)
- Community feed → API client: loads and changes posts (evidence: `Client/src/pages/Feed.jsx`)
- Messaging → API client: calls messaging API (evidence: `Client/src/pages/Messages.jsx`)
- Unread messages → API client: fetches unread count (evidence: `Client/src/context/MessageContext.jsx`)
- Unread messages → Auth hook: reads identity (evidence: `Client/src/context/MessageContext.jsx`)
- Unread messages → Socket service: connects for updates (evidence: `Client/src/context/MessageContext.jsx`)
- API client → HTTP server: sends HTTP requests
- HTTP server → Auth routes: mounts routes (evidence: `Server/Server/server.js`)
- HTTP server → User routes: mounts routes (evidence: `Server/Server/server.js`)
- HTTP server → Domain routes: mounts routes (evidence: `Server/Server/server.js`)
- Auth routes → User records: reads and writes (evidence: `Server/Server/routes/auth.js`)
- User routes → User records: reads and updates (evidence: `Server/Server/routes/users.js`)
- User routes → JWT authorization: guards endpoints (evidence: `Server/Server/routes/users.js`)
- HTTP server → MongoDB: connects (evidence: `Server/Server/server.js`)
- MongoDB connection → MongoDB: configures connection
