# adityagehlot356/lazzy architecture

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

- Interactive diagram: https://gitdiagram.com/adityagehlot356/lazzy
- Repository: https://github.com/adityagehlot356/lazzy

## Overview

IntelliAsk AI combines a browser extension with a FastAPI backend. The visible workflow is a user sending chat text from the extension to the backend and receiving a mock AI response; the backend also exposes note-saving and AI summarize/explain endpoints. The README identifies page summarization and selected-text explanation as product capabilities, but their extension-side flows are not shown in the excerpts. The background worker’s shown summarize action saves a placeholder note rather than requesting a summary. Backend persistence uses MongoDB collections.

Main entry points: [`backend/main.py`](https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py) (Note Routes), [`extension/src/App.jsx`](https://github.com/adityagehlot356/lazzy/blob/main/extension/src/App.jsx) (Assistant UI), [`backend/database.py`](https://github.com/adityagehlot356/lazzy/blob/main/backend/database.py) (Mongo Collections), [`extension/src/content`](https://github.com/adityagehlot356/lazzy/tree/main/extension/src/content) (Page Integration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extension["Browser Extension"]
  node_app["Assistant UI<br/>[App.jsx]"]
  node_mount["UI Mount<br/>[main.jsx]"]
  node_content["Page Integration"]
  node_background["Background Worker<br/>[index.js]"]
  node_noteview["Note Card<br/>[NoteCard.jsx]"]
end

subgraph group_backend["Backend API"]
  node_api["FastAPI Routes<br/>[main.py]"]
  node_auth["Account Routes<br/>[main.py]"]
  node_ai["AI Operations<br/>[main.py]"]
  node_notes["Note Routes<br/>[main.py]"]
end

subgraph group_data["Data Layer"]
  node_schemas["Request Models<br/>[models.py]"]
  node_mongo[("Mongo Collections<br/>[database.py]")]
end

subgraph group_external["External Services"]
  node_mongodb[("MongoDB")]
end

node_user(("User"))
node_browser["Browser"]
node_page["Web Page"]

node_user -->|"uses"| node_app
node_browser -->|"hosts"| node_app
node_page -.->|"contextual use"| node_content
node_mount -->|"renders"| node_app
node_app -->|"requests chat"| node_ai
node_background -->|"saves placeholder"| node_notes
node_user -.->|"selects text"| node_content
node_user -.->|"requests summarize or explain"| node_ai
node_api -->|"routes"| node_auth
node_api -->|"routes"| node_ai
node_api -->|"routes"| node_notes
node_auth -->|"validates requests"| node_schemas
node_notes -->|"validates requests"| node_schemas
node_auth -->|"reads and writes"| node_mongo
node_notes -->|"reads and writes"| node_mongo
node_mongo -->|"connects"| node_mongodb

click node_app "https://github.com/adityagehlot356/lazzy/blob/main/extension/src/App.jsx"
click node_mount "https://github.com/adityagehlot356/lazzy/blob/main/extension/src/main.jsx"
click node_content "https://github.com/adityagehlot356/lazzy/tree/main/extension/src/content"
click node_background "https://github.com/adityagehlot356/lazzy/blob/main/extension/src/background/index.js"
click node_noteview "https://github.com/adityagehlot356/lazzy/blob/main/extension/src/components/NoteCard.jsx"
click node_api "https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py"
click node_auth "https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py"
click node_ai "https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py"
click node_notes "https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py"
click node_schemas "https://github.com/adityagehlot356/lazzy/blob/main/backend/models.py"
click node_mongo "https://github.com/adityagehlot356/lazzy/blob/main/backend/database.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_mount,node_content,node_background,node_noteview,node_user,node_browser toneBlue
class node_api,node_auth,node_ai,node_notes toneAmber
class node_schemas,node_mongo toneMint
class node_mongodb toneRose
class node_page toneIndigo
```

## Components

### Browser Extension

- [Assistant UI](https://github.com/adityagehlot356/lazzy/blob/main/extension/src/App.jsx): `extension/src/App.jsx`
- [UI Mount](https://github.com/adityagehlot356/lazzy/blob/main/extension/src/main.jsx): `extension/src/main.jsx`
- [Page Integration](https://github.com/adityagehlot356/lazzy/tree/main/extension/src/content): `extension/src/content`
- [Background Worker](https://github.com/adityagehlot356/lazzy/blob/main/extension/src/background/index.js): `extension/src/background/index.js`
- [Note Card](https://github.com/adityagehlot356/lazzy/blob/main/extension/src/components/NoteCard.jsx): `extension/src/components/NoteCard.jsx`

### Backend API

- [FastAPI Routes](https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py): `backend/main.py`
- [Account Routes](https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py): `backend/main.py`
- [AI Operations](https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py): `backend/main.py`
- [Note Routes](https://github.com/adityagehlot356/lazzy/blob/main/backend/main.py): `backend/main.py`

### Data Layer

- [Request Models](https://github.com/adityagehlot356/lazzy/blob/main/backend/models.py): `backend/models.py`
- [Mongo Collections](https://github.com/adityagehlot356/lazzy/blob/main/backend/database.py): `backend/database.py`

### External Services

- **MongoDB**

### Other components

- **User**
- **Browser**
- **Web Page**

## Connections

- User → Assistant UI: uses (evidence: `README.md`)
- Browser → Assistant UI: hosts (evidence: `README.md`)
- Web Page → Page Integration: contextual use (evidence: `README.md`)
- UI Mount → Assistant UI: renders (evidence: `extension/src/main.jsx`)
- Assistant UI → AI Operations: requests chat (evidence: `extension/src/App.jsx`)
- Background Worker → Note Routes: saves placeholder (evidence: `extension/src/background/index.js`)
- User → Page Integration: selects text (evidence: `README.md`)
- User → AI Operations: requests summarize or explain (evidence: `README.md`)
- FastAPI Routes → Account Routes: routes (evidence: `backend/main.py`)
- FastAPI Routes → AI Operations: routes (evidence: `backend/main.py`)
- FastAPI Routes → Note Routes: routes (evidence: `backend/main.py`)
- Account Routes → Request Models: validates requests (evidence: `backend/main.py`)
- Note Routes → Request Models: validates requests (evidence: `backend/main.py`)
- Account Routes → Mongo Collections: reads and writes (evidence: `backend/main.py`)
- Note Routes → Mongo Collections: reads and writes (evidence: `backend/main.py`)
- Mongo Collections → MongoDB: connects (evidence: `backend/database.py`)
