# kumar123459/grovio-ai-assignment architecture

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

- Interactive diagram: https://gitdiagram.com/kumar123459/grovio-ai-assignment
- Repository: https://github.com/kumar123459/grovio-ai-assignment

## Overview

Markdown Notes is a local-first notes app: a person creates or selects notes in the React interface, edits Markdown and tags, sees a live preview, and the app debounces edits before saving them through its API to SQLite. The backend also captures prior note content for version history. Search, theme switching, and version restore are additional UI capabilities. The second frontend tree is a Vite starter, not part of the notes workflow. The supplied excerpts show the main calls; unsampled implementation details are not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/App.jsx) (Notes app), [`frontend/src/main.jsx`](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/main.jsx) (React entry), [`frontend/src/api.js`](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/api.js) (HTTP client), [`backend/server.js`](https://github.com/kumar123459/grovio-ai-assignment/blob/main/backend/server.js) (Notes routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Notes interface"]
  node_sidebar["Notes and search<br/>[Sidebar.jsx]"]
  node_header["Title and tags<br/>[NoteHeader.jsx]"]
  node_editor["Markdown editor<br/>[Editor.jsx]"]
  node_preview["Live preview<br/>[Preview.jsx]"]
end

subgraph group_client["Client coordination"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["Notes app<br/>[App.jsx]"]
  node_debounce["Save debounce<br/>[useDebounce.js]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_service["Notes API"]
  node_server["Notes routes<br/>[server.js]"]
end

subgraph group_persistence["SQLite persistence"]
  node_db[("Notes and versions<br/>[db.js]")]
end

node_person(("Note user"))

node_person -->|"uses app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_header
node_app -->|"renders"| node_editor
node_app -->|"renders"| node_preview
node_app -->|"debounces edits"| node_debounce
node_app -->|"requests notes"| node_api
node_api -->|"sends API requests"| node_server
node_server -->|"queries and updates"| node_db

click node_entry "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/main.jsx"
click node_app "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/App.jsx"
click node_sidebar "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/Sidebar.jsx"
click node_header "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/NoteHeader.jsx"
click node_editor "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/Editor.jsx"
click node_preview "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/Preview.jsx"
click node_debounce "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/hooks/useDebounce.js"
click node_api "https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/api.js"
click node_server "https://github.com/kumar123459/grovio-ai-assignment/blob/main/backend/server.js"
click node_db "https://github.com/kumar123459/grovio-ai-assignment/blob/main/backend/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_sidebar,node_header,node_editor,node_preview,node_person toneBlue
class node_entry,node_app,node_debounce,node_api toneAmber
class node_server toneMint
class node_db toneRose
```

## Components

### Notes interface

- [Notes and search](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/Sidebar.jsx): `frontend/src/components/Sidebar.jsx`
- [Title and tags](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/NoteHeader.jsx): `frontend/src/components/NoteHeader.jsx`
- [Markdown editor](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/Editor.jsx): `frontend/src/components/Editor.jsx`
- [Live preview](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/components/Preview.jsx): `frontend/src/components/Preview.jsx`

### Client coordination

- [React entry](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Notes app](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Save debounce](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/hooks/useDebounce.js): `frontend/src/hooks/useDebounce.js`
- [HTTP client](https://github.com/kumar123459/grovio-ai-assignment/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Notes API

- [Notes routes](https://github.com/kumar123459/grovio-ai-assignment/blob/main/backend/server.js): `backend/server.js`

### SQLite persistence

- [Notes and versions](https://github.com/kumar123459/grovio-ai-assignment/blob/main/backend/db.js): `backend/db.js`

### Other components

- **Note user**

## Connections

- Note user → React entry: uses app (evidence: `README.md`)
- React entry → Notes app: renders (evidence: `frontend/src/main.jsx`)
- Notes app → Notes and search: renders (evidence: `frontend/src/App.jsx`)
- Notes app → Title and tags: renders (evidence: `frontend/src/App.jsx`)
- Notes app → Markdown editor: renders (evidence: `frontend/src/App.jsx`)
- Notes app → Live preview: renders (evidence: `frontend/src/App.jsx`)
- Notes app → Save debounce: debounces edits (evidence: `frontend/src/App.jsx`)
- Notes app → HTTP client: requests notes (evidence: `frontend/src/App.jsx`)
- HTTP client → Notes routes: sends API requests (evidence: `frontend/src/api.js`)
- Notes routes → Notes and versions: queries and updates (evidence: `backend/server.js`)
