# akabhishek2316/studentdeck architecture

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

- Interactive diagram: https://gitdiagram.com/akabhishek2316/studentdeck
- Repository: https://github.com/akabhishek2316/studentdeck

## Overview

StudentDeck is a student campus community platform. Students browse or publish marketplace listings, academic resources, events, and lost-and-found reports; authenticated students also manage profiles and saved items and message one another. The React client routes these experiences to an Express API, whose controllers enforce domain operations and persist records; messaging and notifications can also dispatch Socket.IO events, and media uses Cloudinary. Unsampled routes and controllers are represented as domain subsystems where the tree supports them; their detailed behavior is not assumed.

Main entry points: [`server/server.js`](https://github.com/akabhishek2316/studentdeck/blob/main/server/server.js) (HTTP and socket server), [`client/src/App.jsx`](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/App.jsx) (Page routing), [`server/controllers/messageController.js`](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/messageController.js) (Message operations), [`server/controllers/marketplaceController.js`](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/marketplaceController.js) (Marketplace operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student interface"]
  node_app["Page routing<br/>[App.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_community["Campus content"]
  node_market_ui["Marketplace pages<br/>[Marketplace.jsx]"]
  node_academic_ui["Academic pages<br/>[Academic.jsx]"]
  node_events_ui["Event pages<br/>[Events.jsx]"]
  node_lost_ui["Lost &amp; found pages<br/>[LostFound.jsx]"]
end

subgraph group_identity["Identity and activity"]
  node_messages_ui["Messaging interface<br/>[Messages.jsx]"]
  node_profile_ui["Profile and saves<br/>[Profile.jsx]"]
end

subgraph group_backend["API services"]
  node_server["HTTP and socket server<br/>[server.js]"]
  node_auth["Authentication<br/>[authController.js]"]
  node_market_api["Marketplace operations"]
  node_academic_api["Academic operations"]
  node_events_api["Event operations<br/>[eventController.js]"]
  node_lost_api["Lost &amp; found operations"]
  node_messages_api["Message operations"]
  node_notifications["Notifications"]
end

subgraph group_data["Persistence and integrations"]
  node_users[("User records<br/>[User.js]")]
  node_market_records[("Listing records<br/>[Marketplace.js]")]
  node_academic_records[("Resource records")]
  node_event_records[("Event records<br/>[Event.js]")]
  node_lost_records[("Lost-item records<br/>[LostFound.js]")]
  node_conversations[("Conversation records<br/>[Conversation.js]")]
  node_messages[("Message records<br/>[Message.js]")]
  node_notification_records[("Notification records<br/>[Notification.js]")]
end

node_student(("Student"))
node_cloudinary["Cloudinary media"]
node_mongodb[("MongoDB")]

node_student -->|"browses and submits"| node_app
node_app -->|"routes to"| node_market_ui
node_app -->|"routes to"| node_academic_ui
node_app -->|"routes to"| node_events_ui
node_app -->|"routes to"| node_lost_ui
node_app -->|"routes to"| node_messages_ui
node_app -->|"routes to"| node_profile_ui
node_messages_ui -->|"calls"| node_api
node_profile_ui -->|"calls"| node_api
node_api -->|"sends API requests"| node_server
node_server -->|"routes auth requests"| node_auth
node_server -->|"routes marketplace requests"| node_market_api
node_server -->|"routes resource requests"| node_academic_api
node_server -->|"routes event requests"| node_events_api
node_server -->|"routes lost-item requests"| node_lost_api
node_server -->|"routes message requests"| node_messages_api
node_market_api -->|"reads and writes"| node_market_records
node_academic_api -->|"reads and writes"| node_academic_records
node_events_api -->|"reads and writes"| node_event_records
node_lost_api -->|"reads and writes"| node_lost_records
node_messages_api -->|"reads and writes"| node_conversations
node_messages_api -->|"reads and writes"| node_messages
node_auth -.->|"manages accounts"| node_users
node_messages_api -->|"looks up participants"| node_users
node_market_api -->|"deletes media"| node_cloudinary
node_academic_api -->|"manages files"| node_cloudinary
node_market_api -->|"creates announcements"| node_notifications
node_academic_api -->|"creates announcements"| node_notifications
node_notifications -->|"selects recipients"| node_users
node_notifications -->|"stores notifications"| node_notification_records
node_messages_api -->|"emits message events"| node_server
node_server -->|"updates delivery status"| node_messages
node_market_records -.->|"persists in"| node_mongodb
node_academic_records -.->|"persists in"| node_mongodb
node_event_records -.->|"persists in"| node_mongodb
node_lost_records -.->|"persists in"| node_mongodb
node_users -.->|"persists in"| node_mongodb
node_messages -.->|"persists in"| node_mongodb
node_notification_records -.->|"persists in"| node_mongodb

click node_app "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/App.jsx"
click node_api "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/api.js"
click node_market_ui "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Marketplace.jsx"
click node_academic_ui "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Academic.jsx"
click node_events_ui "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Events.jsx"
click node_lost_ui "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/LostFound.jsx"
click node_messages_ui "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Messages.jsx"
click node_profile_ui "https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Profile.jsx"
click node_server "https://github.com/akabhishek2316/studentdeck/blob/main/server/server.js"
click node_auth "https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/authController.js"
click node_market_api "https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/marketplaceController.js"
click node_academic_api "https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/academicController.js"
click node_events_api "https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/eventController.js"
click node_lost_api "https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/lostFoundController.js"
click node_messages_api "https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/messageController.js"
click node_notifications "https://github.com/akabhishek2316/studentdeck/blob/main/server/utils/notificationHelper.js"
click node_users "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/User.js"
click node_market_records "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Marketplace.js"
click node_academic_records "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/AcademicResource.js"
click node_event_records "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Event.js"
click node_lost_records "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/LostFound.js"
click node_conversations "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Conversation.js"
click node_messages "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Message.js"
click node_notification_records "https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Notification.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_market_ui,node_academic_ui,node_events_ui,node_lost_ui,node_mongodb toneAmber
class node_messages_ui,node_profile_ui toneMint
class node_server,node_auth,node_market_api,node_academic_api,node_events_api,node_lost_api,node_messages_api,node_notifications toneRose
class node_users,node_market_records,node_academic_records,node_event_records,node_lost_records,node_conversations,node_messages,node_notification_records,node_student,node_cloudinary toneIndigo
```

## Components

### Student interface

- [Page routing](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [API client](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/api.js): `client/src/api.js`

### Campus content

- [Marketplace pages](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Marketplace.jsx): `client/src/pages/Marketplace.jsx`
- [Academic pages](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Academic.jsx): `client/src/pages/Academic.jsx`
- [Event pages](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Events.jsx): `client/src/pages/Events.jsx`
- [Lost & found pages](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/LostFound.jsx): `client/src/pages/LostFound.jsx`

### Identity and activity

- [Messaging interface](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Messages.jsx): `client/src/pages/Messages.jsx`
- [Profile and saves](https://github.com/akabhishek2316/studentdeck/blob/main/client/src/pages/Profile.jsx): `client/src/pages/Profile.jsx`

### API services

- [HTTP and socket server](https://github.com/akabhishek2316/studentdeck/blob/main/server/server.js): `server/server.js`
- [Authentication](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Marketplace operations](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/marketplaceController.js): `server/controllers/marketplaceController.js`
- [Academic operations](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/academicController.js): `server/controllers/academicController.js`
- [Event operations](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/eventController.js): `server/controllers/eventController.js`
- [Lost & found operations](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/lostFoundController.js): `server/controllers/lostFoundController.js`
- [Message operations](https://github.com/akabhishek2316/studentdeck/blob/main/server/controllers/messageController.js): `server/controllers/messageController.js`
- [Notifications](https://github.com/akabhishek2316/studentdeck/blob/main/server/utils/notificationHelper.js): `server/utils/notificationHelper.js`

### Persistence and integrations

- [User records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/User.js): `server/models/User.js`
- [Listing records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Marketplace.js): `server/models/Marketplace.js`
- [Resource records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/AcademicResource.js): `server/models/AcademicResource.js`
- [Event records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Event.js): `server/models/Event.js`
- [Lost-item records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/LostFound.js): `server/models/LostFound.js`
- [Conversation records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Conversation.js): `server/models/Conversation.js`
- [Message records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Message.js): `server/models/Message.js`
- [Notification records](https://github.com/akabhishek2316/studentdeck/blob/main/server/models/Notification.js): `server/models/Notification.js`

### Other components

- **Student**
- **Cloudinary media**
- **MongoDB**

## Connections

- Student → Page routing: browses and submits (evidence: `client/src/App.jsx`)
- Page routing → Marketplace pages: routes to (evidence: `client/src/App.jsx`)
- Page routing → Academic pages: routes to (evidence: `client/src/App.jsx`)
- Page routing → Event pages: routes to (evidence: `client/src/App.jsx`)
- Page routing → Lost & found pages: routes to (evidence: `client/src/App.jsx`)
- Page routing → Messaging interface: routes to (evidence: `client/src/App.jsx`)
- Page routing → Profile and saves: routes to (evidence: `client/src/App.jsx`)
- Messaging interface → API client: calls (evidence: `client/src/pages/Messages.jsx`)
- Profile and saves → API client: calls (evidence: `client/src/pages/Profile.jsx`)
- API client → HTTP and socket server: sends API requests (evidence: `README.md`)
- HTTP and socket server → Authentication: routes auth requests (evidence: `server/server.js`)
- HTTP and socket server → Marketplace operations: routes marketplace requests (evidence: `server/server.js`)
- HTTP and socket server → Academic operations: routes resource requests (evidence: `server/server.js`)
- HTTP and socket server → Event operations: routes event requests (evidence: `server/server.js`)
- HTTP and socket server → Lost & found operations: routes lost-item requests (evidence: `server/server.js`)
- HTTP and socket server → Message operations: routes message requests (evidence: `server/server.js`)
- Marketplace operations → Listing records: reads and writes (evidence: `server/controllers/marketplaceController.js`)
- Academic operations → Resource records: reads and writes (evidence: `server/controllers/academicController.js`)
- Event operations → Event records: reads and writes (evidence: `server/controllers/eventController.js`)
- Lost & found operations → Lost-item records: reads and writes (evidence: `server/controllers/lostFoundController.js`)
- Message operations → Conversation records: reads and writes (evidence: `server/controllers/messageController.js`)
- Message operations → Message records: reads and writes (evidence: `server/controllers/messageController.js`)
- Authentication → User records: manages accounts
- Message operations → User records: looks up participants (evidence: `server/controllers/messageController.js`)
- Marketplace operations → Cloudinary media: deletes media (evidence: `server/controllers/marketplaceController.js`)
- Academic operations → Cloudinary media: manages files (evidence: `server/controllers/academicController.js`)
- Marketplace operations → Notifications: creates announcements (evidence: `server/controllers/marketplaceController.js`)
- Academic operations → Notifications: creates announcements (evidence: `server/controllers/academicController.js`)
- Notifications → User records: selects recipients (evidence: `server/utils/notificationHelper.js`)
- Notifications → Notification records: stores notifications (evidence: `server/utils/notificationHelper.js`)
- Message operations → HTTP and socket server: emits message events (evidence: `server/controllers/messageController.js`)
- HTTP and socket server → Message records: updates delivery status (evidence: `server/server.js`)
- Listing records → MongoDB: persists in
- Resource records → MongoDB: persists in
- Event records → MongoDB: persists in
- Lost-item records → MongoDB: persists in
- User records → MongoDB: persists in
- Message records → MongoDB: persists in
- Notification records → MongoDB: persists in
