# anjith1/msme-gst-agent architecture

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

- Interactive diagram: https://gitdiagram.com/anjith1/msme-gst-agent
- Repository: https://github.com/anjith1/msme-gst-agent

## Overview

FinSight combines receipt and financial-document analysis with a GST invoice portal. The main workflow is upload → extraction/analysis → transaction review and dashboard insights, with recurring-payment reminders as a related branch; GST has its own upload, invoice storage, summaries, and export flow. The excerpts establish client-side calls and GST backend orchestration, but the README is empty and several modules were not sampled, so uncertain frontend-to-backend links are marked unverified or omitted.

Main entry points: [`src/pages/Dashboard.tsx`](https://github.com/anjith1/msme-gst-agent/blob/main/src/pages/Dashboard.tsx) (Finance dashboard), [`backend/gst_routes.py`](https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_routes.py) (GST API routes), [`src/App.tsx`](https://github.com/anjith1/msme-gst-agent/blob/main/src/App.tsx) (App router), [`src/components/UploadZone.tsx`](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/UploadZone.tsx) (Document upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Finance workspace"]
  node_app["App router<br/>[App.tsx]"]
  node_upload["Document upload<br/>[UploadZone.tsx]"]
  node_dashboard["Finance dashboard<br/>[Dashboard.tsx]"]
  node_transactions["Transaction review"]
  node_spending["Spending insights<br/>[SpendingChart.tsx]"]
  node_chat["Finance chat<br/>[ChatInterface.tsx]"]
  node_reminders["Reminder management<br/>[Reminders.tsx]"]
end

subgraph group_state["Client state"]
  node_analyze_state["Transaction state<br/>[analyze-store.ts]"]
  node_reminder_state["Reminder state<br/>[reminder-store.ts]"]
  node_gst_state["GST client state<br/>[gst-store.ts]"]
end

subgraph group_gst["GST processing"]
  node_gst_dashboard["GST dashboard<br/>[GSTDashboard.tsx]"]
  node_gst_upload["GST invoice upload<br/>[GSTUpload.tsx]"]
  node_api["Finance API<br/>[main.py]"]
  node_gst_routes["GST API routes<br/>[gst_routes.py]"]
  node_extractor["Invoice extraction<br/>[gst_engine.py]"]
  node_summary["Monthly GST summary<br/>[gst_summary.py]"]
  node_gstr_export["GSTR-1 export<br/>[gstr1_export.py]"]
end

subgraph group_storage["Persistence"]
  node_db_access["Database access<br/>[database.py]"]
  node_mongo[("MongoDB")]
end

node_user(("Finance user"))
node_gemini["Gemini API"]

node_user -->|"opens workspace"| node_app
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_gst_dashboard
node_upload -->|"updates and fetches"| node_analyze_state
node_upload -->|"detects recurring"| node_reminder_state
node_dashboard -->|"loads transactions"| node_analyze_state
node_dashboard -->|"detects recurring"| node_reminder_state
node_dashboard -->|"renders"| node_transactions
node_dashboard -->|"renders"| node_spending
node_dashboard -->|"renders"| node_chat
node_reminders -->|"manages"| node_reminder_state
node_gst_dashboard -->|"renders"| node_gst_upload
node_gst_dashboard -->|"uses"| node_gst_state
node_gst_upload -->|"updates"| node_gst_state
node_api -->|"registers routes"| node_gst_routes
node_gst_routes -->|"extracts invoices"| node_extractor
node_gst_routes -->|"reads and writes"| node_db_access
node_gst_routes -->|"requests summary"| node_summary
node_gst_routes -->|"requests export"| node_gstr_export
node_extractor -.->|"extracts with"| node_gemini
node_db_access -->|"connects to"| node_mongo
node_analyze_state -.->|"requests transaction data"| node_api
node_gst_state -.->|"requests GST data"| node_api

click node_app "https://github.com/anjith1/msme-gst-agent/blob/main/src/App.tsx"
click node_upload "https://github.com/anjith1/msme-gst-agent/blob/main/src/components/UploadZone.tsx"
click node_dashboard "https://github.com/anjith1/msme-gst-agent/blob/main/src/pages/Dashboard.tsx"
click node_transactions "https://github.com/anjith1/msme-gst-agent/blob/main/src/components/TransactionsTable.tsx"
click node_spending "https://github.com/anjith1/msme-gst-agent/blob/main/src/components/SpendingChart.tsx"
click node_chat "https://github.com/anjith1/msme-gst-agent/blob/main/src/components/ChatInterface.tsx"
click node_reminders "https://github.com/anjith1/msme-gst-agent/blob/main/src/pages/Reminders.tsx"
click node_analyze_state "https://github.com/anjith1/msme-gst-agent/blob/main/src/lib/analyze-store.ts"
click node_reminder_state "https://github.com/anjith1/msme-gst-agent/blob/main/src/lib/reminder-store.ts"
click node_gst_dashboard "https://github.com/anjith1/msme-gst-agent/blob/main/src/components/GSTDashboard.tsx"
click node_gst_upload "https://github.com/anjith1/msme-gst-agent/blob/main/src/components/GSTUpload.tsx"
click node_gst_state "https://github.com/anjith1/msme-gst-agent/blob/main/src/lib/gst-store.ts"
click node_api "https://github.com/anjith1/msme-gst-agent/blob/main/backend/main.py"
click node_gst_routes "https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_routes.py"
click node_extractor "https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_engine.py"
click node_summary "https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_summary.py"
click node_gstr_export "https://github.com/anjith1/msme-gst-agent/blob/main/backend/gstr1_export.py"
click node_db_access "https://github.com/anjith1/msme-gst-agent/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_upload,node_dashboard,node_transactions,node_spending,node_chat,node_reminders,node_user toneBlue
class node_analyze_state,node_reminder_state,node_gst_state toneAmber
class node_gst_dashboard,node_gst_upload,node_api,node_gst_routes,node_extractor,node_summary,node_gstr_export,node_gemini toneMint
class node_db_access,node_mongo toneRose
```

## Components

### Finance workspace

- [App router](https://github.com/anjith1/msme-gst-agent/blob/main/src/App.tsx): `src/App.tsx`
- [Document upload](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/UploadZone.tsx): `src/components/UploadZone.tsx`
- [Finance dashboard](https://github.com/anjith1/msme-gst-agent/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Transaction review](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/TransactionsTable.tsx): `src/components/TransactionsTable.tsx`
- [Spending insights](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/SpendingChart.tsx): `src/components/SpendingChart.tsx`
- [Finance chat](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/ChatInterface.tsx): `src/components/ChatInterface.tsx`
- [Reminder management](https://github.com/anjith1/msme-gst-agent/blob/main/src/pages/Reminders.tsx): `src/pages/Reminders.tsx`

### Client state

- [Transaction state](https://github.com/anjith1/msme-gst-agent/blob/main/src/lib/analyze-store.ts): `src/lib/analyze-store.ts`
- [Reminder state](https://github.com/anjith1/msme-gst-agent/blob/main/src/lib/reminder-store.ts): `src/lib/reminder-store.ts`
- [GST client state](https://github.com/anjith1/msme-gst-agent/blob/main/src/lib/gst-store.ts): `src/lib/gst-store.ts`

### GST processing

- [GST dashboard](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/GSTDashboard.tsx): `src/components/GSTDashboard.tsx`
- [GST invoice upload](https://github.com/anjith1/msme-gst-agent/blob/main/src/components/GSTUpload.tsx): `src/components/GSTUpload.tsx`
- [Finance API](https://github.com/anjith1/msme-gst-agent/blob/main/backend/main.py): `backend/main.py`
- [GST API routes](https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_routes.py): `backend/gst_routes.py`
- [Invoice extraction](https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_engine.py): `backend/gst_engine.py`
- [Monthly GST summary](https://github.com/anjith1/msme-gst-agent/blob/main/backend/gst_summary.py): `backend/gst_summary.py`
- [GSTR-1 export](https://github.com/anjith1/msme-gst-agent/blob/main/backend/gstr1_export.py): `backend/gstr1_export.py`

### Persistence

- [Database access](https://github.com/anjith1/msme-gst-agent/blob/main/backend/database.py): `backend/database.py`
- **MongoDB**

### Other components

- **Finance user**
- **Gemini API**

## Connections

- Finance user → App router: opens workspace (evidence: `src/App.tsx`)
- App router → Document upload: routes to (evidence: `src/App.tsx`)
- App router → Finance dashboard: routes to (evidence: `src/App.tsx`)
- App router → GST dashboard: routes to (evidence: `src/App.tsx`)
- Document upload → Transaction state: updates and fetches (evidence: `src/components/UploadZone.tsx`)
- Document upload → Reminder state: detects recurring (evidence: `src/components/UploadZone.tsx`)
- Finance dashboard → Transaction state: loads transactions (evidence: `src/pages/Dashboard.tsx`)
- Finance dashboard → Reminder state: detects recurring (evidence: `src/pages/Dashboard.tsx`)
- Finance dashboard → Transaction review: renders (evidence: `src/pages/Dashboard.tsx`)
- Finance dashboard → Spending insights: renders (evidence: `src/pages/Dashboard.tsx`)
- Finance dashboard → Finance chat: renders (evidence: `src/pages/Dashboard.tsx`)
- Reminder management → Reminder state: manages (evidence: `src/pages/Reminders.tsx`)
- GST dashboard → GST invoice upload: renders (evidence: `src/components/GSTDashboard.tsx`)
- GST dashboard → GST client state: uses (evidence: `src/components/GSTDashboard.tsx`)
- GST invoice upload → GST client state: updates (evidence: `src/components/GSTUpload.tsx`)
- Finance API → GST API routes: registers routes (evidence: `backend/main.py`)
- GST API routes → Invoice extraction: extracts invoices (evidence: `backend/gst_routes.py`)
- GST API routes → Database access: reads and writes (evidence: `backend/gst_routes.py`)
- GST API routes → Monthly GST summary: requests summary (evidence: `backend/gst_routes.py`)
- GST API routes → GSTR-1 export: requests export (evidence: `backend/gst_routes.py`)
- Invoice extraction → Gemini API: extracts with
- Database access → MongoDB: connects to (evidence: `backend/database.py`)
- Transaction state → Finance API: requests transaction data
- GST client state → Finance API: requests GST data
