# siddartharavula/elevaite architecture

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

- Interactive diagram: https://gitdiagram.com/siddartharavula/elevaite
- Repository: https://github.com/siddartharavula/elevaite

## Overview

elevAIte is a document journal with account-based access and an AI assistant for summarizing pasted text and answering questions. Users register or log in, then create dated documents or search and read them; the View Doc page also sends pasted content and prompts to the assistant. The backend owns HTTP routing, authentication, document persistence, and agent invocation. The tree omits the imported database module and no README content was provided, so database wiring beyond the shown session/table calls and unsampled UI details are not expanded.

Main entry points: [`frontend/src/App.jsx`](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/App.jsx) (App routing), [`frontend/src/api.js`](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/api.js) (API client), [`backend/main.py`](https://github.com/siddartharavula/elevaite/blob/main/backend/main.py) (HTTP API), [`frontend/src/pages/ViewDoc.jsx`](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/ViewDoc.jsx) (View documents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routing<br/>[App.jsx]"]
  node_authguard["Protected routes<br/>[ProtectedRoute.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_background["Shader background"]
end

subgraph group_identity["Identity"]
  node_backend["HTTP API<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
end

subgraph group_journal["Document journal"]
  node_write["Write document<br/>[WriteDoc.jsx]"]
  node_view["View documents<br/>[ViewDoc.jsx]"]
  node_schemas["Document schemas<br/>[schemas.py]"]
  node_models["User and document models<br/>[models.py]"]
  node_db[("Database<br/>[app.db]")]
end

subgraph group_assistant["AI assistant"]
  node_agentpanel["AI panel<br/>[AiAgentPanel.jsx]"]
  node_agent["Agent orchestration<br/>[agent.py]"]
  node_memory["Session memory<br/>[session_memory.py]"]
  node_llm{{"Groq model service"}}
end

node_user(("User"))
node_browser(("Browser"))

node_user -->|"uses"| node_browser
node_browser -->|"loads"| node_app
node_app -->|"routes"| node_login
node_app -->|"routes"| node_register
node_app -->|"protects"| node_authguard
node_authguard -->|"checks token"| node_api
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_write
node_app -->|"routes"| node_view
node_app -->|"renders"| node_background
node_login -->|"calls"| node_api
node_register -->|"calls"| node_api
node_dashboard -->|"calls"| node_api
node_write -->|"submits"| node_api
node_view -->|"searches"| node_api
node_view -->|"renders"| node_agentpanel
node_agentpanel -->|"sends prompts"| node_api
node_api -->|"HTTP requests"| node_backend
node_backend -->|"authenticates"| node_auth
node_backend -->|"queries and writes"| node_models
node_backend -->|"validates documents"| node_schemas
node_backend -.->|"persists records"| node_db
node_backend -->|"invokes"| node_agent
node_agent -->|"loads history"| node_memory
node_agent -->|"invokes"| node_llm

click node_app "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/App.jsx"
click node_authguard "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/components/ProtectedRoute.jsx"
click node_login "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/Login.jsx"
click node_register "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/Register.jsx"
click node_dashboard "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/Dashboard.jsx"
click node_write "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/WriteDoc.jsx"
click node_view "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/ViewDoc.jsx"
click node_api "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/api.js"
click node_agentpanel "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/components/ui/AiAgentPanel.jsx"
click node_background "https://github.com/siddartharavula/elevaite/blob/main/frontend/src/components/ui/ShaderBackground.jsx"
click node_backend "https://github.com/siddartharavula/elevaite/blob/main/backend/main.py"
click node_auth "https://github.com/siddartharavula/elevaite/blob/main/backend/auth.py"
click node_schemas "https://github.com/siddartharavula/elevaite/blob/main/backend/schemas.py"
click node_models "https://github.com/siddartharavula/elevaite/blob/main/backend/models.py"
click node_db "https://github.com/siddartharavula/elevaite/blob/main/backend/app.db"
click node_agent "https://github.com/siddartharavula/elevaite/blob/main/backend/ai-agent/agent.py"
click node_memory "https://github.com/siddartharavula/elevaite/blob/main/backend/ai-agent/memory/session_memory.py"

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_authguard,node_login,node_register,node_dashboard,node_api,node_background,node_user,node_browser toneBlue
class node_backend,node_auth toneAmber
class node_write,node_view,node_schemas,node_models,node_db toneMint
class node_agentpanel,node_agent,node_memory,node_llm toneRose
```

## Components

### Web client

- [App routing](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Protected routes](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/components/ProtectedRoute.jsx): `frontend/src/components/ProtectedRoute.jsx`
- [Login](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Registration](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`
- [Dashboard](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [API client](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Shader background](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/components/ui/ShaderBackground.jsx): `frontend/src/components/ui/ShaderBackground.jsx`

### Identity

- [HTTP API](https://github.com/siddartharavula/elevaite/blob/main/backend/main.py): `backend/main.py`
- [Authentication](https://github.com/siddartharavula/elevaite/blob/main/backend/auth.py): `backend/auth.py`

### Document journal

- [Write document](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/WriteDoc.jsx): `frontend/src/pages/WriteDoc.jsx`
- [View documents](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/pages/ViewDoc.jsx): `frontend/src/pages/ViewDoc.jsx`
- [Document schemas](https://github.com/siddartharavula/elevaite/blob/main/backend/schemas.py): `backend/schemas.py`
- [User and document models](https://github.com/siddartharavula/elevaite/blob/main/backend/models.py): `backend/models.py`
- [Database](https://github.com/siddartharavula/elevaite/blob/main/backend/app.db): `backend/app.db`

### AI assistant

- [AI panel](https://github.com/siddartharavula/elevaite/blob/main/frontend/src/components/ui/AiAgentPanel.jsx): `frontend/src/components/ui/AiAgentPanel.jsx`
- [Agent orchestration](https://github.com/siddartharavula/elevaite/blob/main/backend/ai-agent/agent.py): `backend/ai-agent/agent.py`
- [Session memory](https://github.com/siddartharavula/elevaite/blob/main/backend/ai-agent/memory/session_memory.py): `backend/ai-agent/memory/session_memory.py`
- **Groq model service**

### Other components

- **User**
- **Browser**

## Connections

- User → Browser: uses
- Browser → App routing: loads
- App routing → Login: routes (evidence: `frontend/src/App.jsx`)
- App routing → Registration: routes (evidence: `frontend/src/App.jsx`)
- App routing → Protected routes: protects (evidence: `frontend/src/App.jsx`)
- Protected routes → API client: checks token (evidence: `frontend/src/components/ProtectedRoute.jsx`)
- App routing → Dashboard: routes (evidence: `frontend/src/App.jsx`)
- App routing → Write document: routes (evidence: `frontend/src/App.jsx`)
- App routing → View documents: routes (evidence: `frontend/src/App.jsx`)
- App routing → Shader background: renders (evidence: `frontend/src/App.jsx`)
- Login → API client: calls (evidence: `frontend/src/pages/Login.jsx`)
- Registration → API client: calls (evidence: `frontend/src/pages/Register.jsx`)
- Dashboard → API client: calls (evidence: `frontend/src/pages/Dashboard.jsx`)
- Write document → API client: submits (evidence: `frontend/src/pages/WriteDoc.jsx`)
- View documents → API client: searches (evidence: `frontend/src/pages/ViewDoc.jsx`)
- View documents → AI panel: renders (evidence: `frontend/src/pages/ViewDoc.jsx`)
- AI panel → API client: sends prompts (evidence: `frontend/src/components/ui/AiAgentPanel.jsx`)
- API client → HTTP API: HTTP requests (evidence: `frontend/src/api.js`)
- HTTP API → Authentication: authenticates (evidence: `backend/main.py`)
- HTTP API → User and document models: queries and writes (evidence: `backend/main.py`)
- HTTP API → Document schemas: validates documents (evidence: `backend/main.py`)
- HTTP API → Database: persists records
- HTTP API → Agent orchestration: invokes (evidence: `backend/main.py`)
- Agent orchestration → Session memory: loads history (evidence: `backend/ai-agent/agent.py`)
- Agent orchestration → Groq model service: invokes (evidence: `backend/ai-agent/agent.py`)
