# venkatasrinidhi-ai/magadha-insurance-app architecture

> Architecture diagram of the GitHub repository venkatasrinidhi-ai/magadha-insurance-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/venkatasrinidhi-ai/magadha-insurance-app
- Repository: https://github.com/venkatasrinidhi-ai/magadha-insurance-app

## Overview

Magadha is a Flet insurance portal whose main journey runs from login and OTP verification through identity confirmation to a member dashboard, where customers access policy cards, payments, and claims. The single source file also contains help and profile UI. SQLite persistence is explicit for payments and claim-history reads. README documents broader claim processing and policy coverage, but the excerpts do not show their full implementation or wiring; those links are therefore limited to the documented user-facing stages.

Main entry points: [`app.py`](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py) (Home dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Member access"]
  node_startup["Startup animation<br/>[app.py]"]
  node_login["Mobile login<br/>[app.py]"]
  node_otp["OTP verification<br/>[app.py]"]
  node_identity["Identity check<br/>[app.py]"]
end

subgraph group_portal["Member portal"]
  node_dashboard["Home dashboard<br/>[app.py]"]
  node_help["Policy help chat<br/>[app.py]"]
  node_profile["Profile menu<br/>[app.py]"]
end

subgraph group_insurance["Insurance services"]
  node_virtual_card["Virtual insurance card<br/>[app.py]"]
  node_claims["Incident claims<br/>[app.py]"]
  node_claim_history["Claims history<br/>[app.py]"]
  node_checkout["Payment checkout<br/>[app.py]"]
  node_payment_history["Payment history<br/>[app.py]"]
end

subgraph group_data["Persistence"]
  node_sqlite[("SQLite database<br/>[app.py]")]
end

node_member(("Member"))

node_member -->|"opens app"| node_startup
node_startup -->|"shows login"| node_login
node_member -->|"enters mobile"| node_login
node_login -->|"continues to"| node_otp
node_otp -->|"verifies then advances"| node_identity
node_identity -->|"continues to"| node_dashboard
node_member -->|"uses portal"| node_dashboard
node_dashboard -->|"opens card"| node_virtual_card
node_dashboard -->|"starts claim"| node_claims
node_dashboard -->|"opens payment"| node_checkout
node_dashboard -->|"views history"| node_payment_history
node_dashboard -->|"views history"| node_claim_history
node_dashboard -->|"asks questions"| node_help
node_dashboard -->|"opens profile"| node_profile
node_checkout -->|"writes payment"| node_sqlite
node_payment_history -->|"reads records"| node_sqlite
node_claim_history -->|"reads records"| node_sqlite

click node_startup "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_login "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_otp "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_identity "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_dashboard "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_virtual_card "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_claims "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_claim_history "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_checkout "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_payment_history "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_help "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_profile "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py"
click node_sqlite "https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.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_startup,node_login,node_otp,node_identity toneBlue
class node_dashboard,node_help,node_profile toneAmber
class node_virtual_card,node_claims,node_claim_history,node_checkout,node_payment_history toneMint
class node_sqlite toneRose
class node_member toneIndigo
```

## Components

### Member access

- [Startup animation](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Mobile login](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [OTP verification](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Identity check](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`

### Member portal

- [Home dashboard](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Policy help chat](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Profile menu](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`

### Insurance services

- [Virtual insurance card](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Incident claims](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Claims history](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Payment checkout](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`
- [Payment history](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`

### Persistence

- [SQLite database](https://github.com/venkatasrinidhi-ai/magadha-insurance-app/blob/main/app.py): `app.py`

### Other components

- **Member**

## Connections

- Member → Startup animation: opens app
- Startup animation → Mobile login: shows login
- Member → Mobile login: enters mobile
- Mobile login → OTP verification: continues to
- OTP verification → Identity check: verifies then advances
- Identity check → Home dashboard: continues to
- Member → Home dashboard: uses portal
- Home dashboard → Virtual insurance card: opens card
- Home dashboard → Incident claims: starts claim
- Home dashboard → Payment checkout: opens payment
- Home dashboard → Payment history: views history
- Home dashboard → Claims history: views history
- Home dashboard → Policy help chat: asks questions
- Home dashboard → Profile menu: opens profile
- Payment checkout → SQLite database: writes payment
- Payment history → SQLite database: reads records
- Claims history → SQLite database: reads records
