# shavaizabid/uae-smart-assistant architecture

> Architecture diagram of the GitHub repository shavaizabid/uae-smart-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shavaizabid/uae-smart-assistant
- Repository: https://github.com/shavaizabid/uae-smart-assistant

## Overview

UAE Smart Notebook is a browser-based workspace for private PDF analysis. The documented workflow is upload → local text extraction → date and AI analysis → dashboard insights, with a context-aware chat assistant and persistent notes. The README also documents Gemini-powered summaries and obligation extraction. The tree provides no source excerpts, so component paths use the only listed application file; relationships reflect the README’s blueprint and descriptions rather than inspected implementation.

Main entry points: [`index.html`](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html) (Insights Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_document["Document Processing"]
  node_upload["PDF Upload<br/>[index.html]"]
  node_pdfjs["PDF.js Engine"]
  node_date_parser["Date Parser<br/>[index.html]"]
end

subgraph group_insights["AI Insights"]
  node_gemini["Gemini API"]
  node_summary["Auto Summary<br/>[index.html]"]
  node_obligations["Key Obligations<br/>[index.html]"]
  node_chat["AI Chatbot<br/>[index.html]"]
end

subgraph group_workspace["Workspace UI"]
  node_dashboard["Insights Dashboard<br/>[index.html]"]
  node_smart_cards["Smart Cards<br/>[index.html]"]
  node_sticky_notes["Sticky Notes<br/>[index.html]"]
end

subgraph group_state["Local State"]
  node_local_storage[("LocalStorage")]
end

node_user(("User"))

node_user -->|"uploads PDF"| node_upload
node_upload -->|"reads locally"| node_pdfjs
node_pdfjs -->|"extracts dates"| node_date_parser
node_pdfjs -->|"sends text"| node_gemini
node_date_parser -->|"provides dates"| node_smart_cards
node_gemini -->|"generates summary"| node_summary
node_gemini -->|"extracts obligations"| node_obligations
node_summary -->|"shows summary"| node_dashboard
node_obligations -->|"shows obligations"| node_dashboard
node_smart_cards -->|"shows dates"| node_dashboard
node_user -->|"asks questions"| node_chat
node_chat -->|"queries context"| node_gemini
node_pdfjs -->|"saves state"| node_local_storage
node_local_storage -->|"restores notes"| node_sticky_notes

click node_upload "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_date_parser "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_summary "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_obligations "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_chat "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_dashboard "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_smart_cards "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"
click node_sticky_notes "https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html"

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_upload,node_pdfjs,node_date_parser,node_user toneBlue
class node_gemini,node_summary,node_obligations,node_chat toneAmber
class node_dashboard,node_smart_cards,node_sticky_notes toneMint
class node_local_storage toneRose
```

## Components

### Document Processing

- [PDF Upload](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`
- **PDF.js Engine**
- [Date Parser](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`

### AI Insights

- **Gemini API**
- [Auto Summary](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`
- [Key Obligations](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`
- [AI Chatbot](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`

### Workspace UI

- [Insights Dashboard](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`
- [Smart Cards](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`
- [Sticky Notes](https://github.com/shavaizabid/uae-smart-assistant/blob/main/index.html): `index.html`

### Local State

- **LocalStorage**

### Other components

- **User**

## Connections

- User → PDF Upload: uploads PDF (evidence: `README.md`)
- PDF Upload → PDF.js Engine: reads locally (evidence: `README.md`)
- PDF.js Engine → Date Parser: extracts dates (evidence: `README.md`)
- PDF.js Engine → Gemini API: sends text (evidence: `README.md`)
- Date Parser → Smart Cards: provides dates (evidence: `README.md`)
- Gemini API → Auto Summary: generates summary (evidence: `README.md`)
- Gemini API → Key Obligations: extracts obligations (evidence: `README.md`)
- Auto Summary → Insights Dashboard: shows summary (evidence: `README.md`)
- Key Obligations → Insights Dashboard: shows obligations (evidence: `README.md`)
- Smart Cards → Insights Dashboard: shows dates (evidence: `README.md`)
- User → AI Chatbot: asks questions (evidence: `README.md`)
- AI Chatbot → Gemini API: queries context (evidence: `README.md`)
- PDF.js Engine → LocalStorage: saves state (evidence: `README.md`)
- LocalStorage → Sticky Notes: restores notes (evidence: `README.md`)
