# nabineo/mern-thinkboard architecture

> Architecture diagram of the GitHub repository nabineo/mern-thinkboard, 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/nabineo/mern-thinkboard
- Repository: https://github.com/nabineo/mern-thinkboard
- Video tour (about a minute): https://gitdiagram.com/nabineo/mern-thinkboard/video

## Overview

This is a MERN note-taking app: users browse notes, create them, and open, edit, or delete individual notes. The React pages call a REST API; Express routes dispatch requests to note controllers, which use a Mongoose model for persistence. A server-wide rate limiter uses the Upstash integration, and the frontend presents a rate-limit state. The graph follows documented capabilities and sampled imports/calls; the database and Upstash service connections are represented as external dependencies, with unsampled internals left unspecified.

Main entry points: [`frontend/src/pages/HomePage.jsx`](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/HomePage.jsx) (Notes list), [`frontend/src/lib/axios.js`](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/lib/axios.js) (HTTP client), [`frontend/src/App.jsx`](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/App.jsx) (Route shell), [`backend/src/server.js`](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/server.js) (Express server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_app["Route shell<br/>[App.jsx]"]
  node_home["Notes list<br/>[HomePage.jsx]"]
  node_create["Create note<br/>[CreatePage.jsx]"]
  node_detail["Edit and delete<br/>[NoteDetailPage.jsx]"]
  node_navbar["Navigation bar<br/>[Navbar.jsx]"]
  node_card["Note card<br/>[NoteCard.jsx]"]
  node_empty["Empty state<br/>[NotesNotFound.jsx]"]
  node_limited["Rate-limit notice<br/>[RateLimitedUI.jsx]"]
  node_http["HTTP client<br/>[axios.js]"]
end

subgraph group_backend["API and controls"]
  node_server["Express server<br/>[server.js]"]
  node_routes["Notes routes<br/>[notesRoutes.js]"]
  node_controller["Note handlers<br/>[notesController.js]"]
  node_limiter["Rate limiter<br/>[rateLimiter.js]"]
end

subgraph group_persistence["Note persistence"]
  node_dbconfig["Database connection<br/>[db.js]"]
  node_model["Note model<br/>[Note.js]"]
end

subgraph group_integrations["External services"]
  node_mongo[("MongoDB")]
  node_upstashconfig["Upstash client<br/>[upstash.js]"]
  node_redis[("Upstash Redis")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_detail
node_home -->|"renders"| node_navbar
node_home -->|"renders"| node_card
node_home -->|"renders"| node_empty
node_home -->|"renders"| node_limited
node_home -->|"fetches notes"| node_http
node_create -->|"creates note"| node_http
node_detail -->|"loads and updates"| node_http
node_card -->|"deletes note"| node_http
node_http -->|"sends API requests"| node_server
node_server -->|"mounts routes"| node_routes
node_server -->|"applies limit"| node_limiter
node_server -->|"connects database"| node_dbconfig
node_routes -->|"dispatches requests"| node_controller
node_controller -->|"queries notes"| node_model
node_limiter -->|"checks limit"| node_upstashconfig
node_dbconfig -.->|"connects"| node_mongo
node_upstashconfig -.->|"uses"| node_redis

click node_app "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/App.jsx"
click node_home "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/HomePage.jsx"
click node_create "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/CreatePage.jsx"
click node_detail "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/NoteDetailPage.jsx"
click node_navbar "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/Navbar.jsx"
click node_card "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/NoteCard.jsx"
click node_empty "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/NotesNotFound.jsx"
click node_limited "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/RateLimitedUI.jsx"
click node_http "https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/lib/axios.js"
click node_server "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/server.js"
click node_routes "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/routes/notesRoutes.js"
click node_controller "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/controllers/notesController.js"
click node_limiter "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/middleware/rateLimiter.js"
click node_dbconfig "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/config/db.js"
click node_model "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/models/Note.js"
click node_upstashconfig "https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/config/upstash.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_home,node_create,node_detail,node_navbar,node_card,node_empty,node_limited,node_http,node_user toneBlue
class node_server,node_routes,node_controller,node_limiter toneAmber
class node_dbconfig,node_model toneMint
class node_mongo,node_upstashconfig,node_redis toneRose
```

## Components

### React application

- [Route shell](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Notes list](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/HomePage.jsx): `frontend/src/pages/HomePage.jsx`
- [Create note](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/CreatePage.jsx): `frontend/src/pages/CreatePage.jsx`
- [Edit and delete](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/pages/NoteDetailPage.jsx): `frontend/src/pages/NoteDetailPage.jsx`
- [Navigation bar](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Note card](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/NoteCard.jsx): `frontend/src/components/NoteCard.jsx`
- [Empty state](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/NotesNotFound.jsx): `frontend/src/components/NotesNotFound.jsx`
- [Rate-limit notice](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/components/RateLimitedUI.jsx): `frontend/src/components/RateLimitedUI.jsx`
- [HTTP client](https://github.com/nabineo/mern-thinkboard/blob/master/frontend/src/lib/axios.js): `frontend/src/lib/axios.js`

### API and controls

- [Express server](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/server.js): `backend/src/server.js`
- [Notes routes](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/routes/notesRoutes.js): `backend/src/routes/notesRoutes.js`
- [Note handlers](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/controllers/notesController.js): `backend/src/controllers/notesController.js`
- [Rate limiter](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/middleware/rateLimiter.js): `backend/src/middleware/rateLimiter.js`

### Note persistence

- [Database connection](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/config/db.js): `backend/src/config/db.js`
- [Note model](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/models/Note.js): `backend/src/models/Note.js`

### External services

- **MongoDB**
- [Upstash client](https://github.com/nabineo/mern-thinkboard/blob/master/backend/src/config/upstash.js): `backend/src/config/upstash.js`
- **Upstash Redis**

### Other components

- **User**

## Connections

- User → Route shell: uses (evidence: `README.md`)
- Route shell → Notes list: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Create note: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Edit and delete: routes to (evidence: `frontend/src/App.jsx`)
- Notes list → Navigation bar: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Notes list → Note card: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Notes list → Empty state: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Notes list → Rate-limit notice: renders (evidence: `frontend/src/pages/HomePage.jsx`)
- Notes list → HTTP client: fetches notes (evidence: `frontend/src/pages/HomePage.jsx`)
- Create note → HTTP client: creates note (evidence: `frontend/src/pages/CreatePage.jsx`)
- Edit and delete → HTTP client: loads and updates (evidence: `frontend/src/pages/NoteDetailPage.jsx`)
- Note card → HTTP client: deletes note (evidence: `frontend/src/components/NoteCard.jsx`)
- HTTP client → Express server: sends API requests (evidence: `frontend/src/lib/axios.js`)
- Express server → Notes routes: mounts routes (evidence: `backend/src/server.js`)
- Express server → Rate limiter: applies limit (evidence: `backend/src/server.js`)
- Express server → Database connection: connects database (evidence: `backend/src/server.js`)
- Notes routes → Note handlers: dispatches requests (evidence: `backend/src/routes/notesRoutes.js`)
- Note handlers → Note model: queries notes (evidence: `backend/src/controllers/notesController.js`)
- Rate limiter → Upstash client: checks limit (evidence: `backend/src/middleware/rateLimiter.js`)
- Database connection → MongoDB: connects
- Upstash client → Upstash Redis: uses
