# namwebd/study-buddy-finder architecture

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

- Interactive diagram: https://gitdiagram.com/namwebd/study-buddy-finder
- Repository: https://github.com/namwebd/study-buddy-finder

## Overview

Study Buddy Finder is a web app for creating accounts and finding study partners through posts that can be filtered by subject and location. The main flow runs from registration or login in the React client, through the Express API, to MongoDB-backed user and post records; the dashboard then fetches and displays matching posts and supports posting and deletion. The sampled source shows the client routes, API calls, server route mounting, and data models. The README gives no additional capabilities, and the homepage implementation is not excerpted.

Main entry points: [`backend/server.js`](https://github.com/namwebd/study-buddy-finder/blob/main/backend/server.js) (Express Server), [`frontend/src/App.js`](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/App.js) (App Routing), [`frontend/src/pages/Dashboard.js`](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Dashboard.js) (Buddy Dashboard), [`frontend/src/pages/Login.js`](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Login.js) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web Client"]
  node_app["App Routing<br/>[App.js]"]
  node_navbar["Navigation<br/>[Navbar.js]"]
  node_home["Home Page<br/>[Home.js]"]
  node_login["Login<br/>[Login.js]"]
  node_register["Registration<br/>[Register.js]"]
  node_dashboard["Buddy Dashboard<br/>[Dashboard.js]"]
  node_api_config["API Configuration<br/>[config.js]"]
end

subgraph group_api["API Server"]
  node_server["Express Server<br/>[server.js]"]
  node_auth_routes["Auth Routes<br/>[auth.js]"]
  node_buddy_routes["Buddy Routes<br/>[buddies.js]"]
end

subgraph group_domain["Study Buddy Data"]
  node_users[("User Records<br/>[User.js]")]
  node_posts[("Buddy Posts<br/>[StudyBuddy.js]")]
end

node_visitor(("Visitor"))
node_mongodb[("MongoDB")]

node_visitor -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_dashboard
node_login -->|"reads URL"| node_api_config
node_register -->|"reads URL"| node_api_config
node_dashboard -->|"reads URL"| node_api_config
node_login -->|"sends login"| node_server
node_register -->|"sends registration"| node_server
node_dashboard -->|"requests posts"| node_server
node_server -->|"mounts at /api/auth"| node_auth_routes
node_server -->|"mounts at /api/buddies"| node_buddy_routes
node_server -->|"connects"| node_mongodb
node_auth_routes -->|"reads and writes"| node_users
node_buddy_routes -->|"reads and writes"| node_posts
node_buddy_routes -->|"populates author"| node_users
node_dashboard -->|"deletes post"| node_server

click node_app "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/App.js"
click node_navbar "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/components/Navbar.js"
click node_home "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Home.js"
click node_login "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Login.js"
click node_register "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Register.js"
click node_dashboard "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Dashboard.js"
click node_api_config "https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/config.js"
click node_server "https://github.com/namwebd/study-buddy-finder/blob/main/backend/server.js"
click node_auth_routes "https://github.com/namwebd/study-buddy-finder/blob/main/backend/routes/auth.js"
click node_buddy_routes "https://github.com/namwebd/study-buddy-finder/blob/main/backend/routes/buddies.js"
click node_users "https://github.com/namwebd/study-buddy-finder/blob/main/backend/models/User.js"
click node_posts "https://github.com/namwebd/study-buddy-finder/blob/main/backend/models/StudyBuddy.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_navbar,node_home,node_login,node_register,node_dashboard,node_api_config toneBlue
class node_server,node_auth_routes,node_buddy_routes,node_mongodb toneAmber
class node_users,node_posts toneMint
class node_visitor toneIndigo
```

## Components

### Web Client

- [App Routing](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Navigation](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/components/Navbar.js): `frontend/src/components/Navbar.js`
- [Home Page](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Home.js): `frontend/src/pages/Home.js`
- [Login](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Login.js): `frontend/src/pages/Login.js`
- [Registration](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Register.js): `frontend/src/pages/Register.js`
- [Buddy Dashboard](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/pages/Dashboard.js): `frontend/src/pages/Dashboard.js`
- [API Configuration](https://github.com/namwebd/study-buddy-finder/blob/main/frontend/src/config.js): `frontend/src/config.js`

### API Server

- [Express Server](https://github.com/namwebd/study-buddy-finder/blob/main/backend/server.js): `backend/server.js`
- [Auth Routes](https://github.com/namwebd/study-buddy-finder/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Buddy Routes](https://github.com/namwebd/study-buddy-finder/blob/main/backend/routes/buddies.js): `backend/routes/buddies.js`

### Study Buddy Data

- [User Records](https://github.com/namwebd/study-buddy-finder/blob/main/backend/models/User.js): `backend/models/User.js`
- [Buddy Posts](https://github.com/namwebd/study-buddy-finder/blob/main/backend/models/StudyBuddy.js): `backend/models/StudyBuddy.js`

### Other components

- **Visitor**
- **MongoDB**

## Connections

- Visitor → App Routing: uses (evidence: `frontend/src/App.js`)
- App Routing → Navigation: renders (evidence: `frontend/src/App.js`)
- App Routing → Home Page: routes to (evidence: `frontend/src/App.js`)
- App Routing → Login: routes to (evidence: `frontend/src/App.js`)
- App Routing → Registration: routes to (evidence: `frontend/src/App.js`)
- App Routing → Buddy Dashboard: routes to (evidence: `frontend/src/App.js`)
- Login → API Configuration: reads URL (evidence: `frontend/src/pages/Login.js`)
- Registration → API Configuration: reads URL (evidence: `frontend/src/pages/Register.js`)
- Buddy Dashboard → API Configuration: reads URL (evidence: `frontend/src/pages/Dashboard.js`)
- Login → Express Server: sends login (evidence: `frontend/src/pages/Login.js`)
- Registration → Express Server: sends registration (evidence: `frontend/src/pages/Register.js`)
- Buddy Dashboard → Express Server: requests posts (evidence: `frontend/src/pages/Dashboard.js`)
- Express Server → Auth Routes: mounts at /api/auth (evidence: `backend/server.js`)
- Express Server → Buddy Routes: mounts at /api/buddies (evidence: `backend/server.js`)
- Express Server → MongoDB: connects (evidence: `backend/server.js`)
- Auth Routes → User Records: reads and writes (evidence: `backend/routes/auth.js`)
- Buddy Routes → Buddy Posts: reads and writes (evidence: `backend/routes/buddies.js`)
- Buddy Routes → User Records: populates author (evidence: `backend/routes/buddies.js`)
- Buddy Dashboard → Express Server: deletes post (evidence: `frontend/src/pages/Dashboard.js`)
