# bashutosh017/gst-geno architecture

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

- Interactive diagram: https://gitdiagram.com/bashutosh017/gst-geno
- Repository: https://github.com/bashutosh017/gst-geno

## Overview

GST Geno is an offline-first Android GST invoicing app. Users maintain business, customer, and product records, prepare tax-calculated invoices, then review, issue, and export them as PDFs. Local SQLite provides persistent records; the README also documents UPI and QR payment information on invoices. The sampled files show key screen-to-service calls and database access, but several routes and modules were not inspected; those uncertain links are omitted rather than inferred.

Main entry points: [`src/screens/InvoiceScreen.tsx`](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/InvoiceScreen.tsx) (Invoice creation), [`src/services/invoice.service.ts`](https://github.com/bashutosh017/gst-geno/blob/main/src/services/invoice.service.ts) (Invoice lifecycle), [`src/database/connection.ts`](https://github.com/bashutosh017/gst-geno/blob/main/src/database/connection.ts) (SQLite database), [`src/screens/BusinessProfileScreen.tsx`](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/BusinessProfileScreen.tsx) (Business profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App access"]
  node_lock["App lock<br/>[AppLock.tsx]"]
end

subgraph group_records["Business records"]
  node_business_screen["Business profile"]
  node_business_service["Business settings"]
  node_customer_screen["Customer records<br/>[CustomerScreen.tsx]"]
  node_customer_service["Customer records service"]
  node_product_screen["Product catalogue<br/>[ProductScreen.tsx]"]
  node_product_service["Product service<br/>[product.service.ts]"]
end

subgraph group_invoicing["Invoice workflow"]
  node_invoice_screen["Invoice creation<br/>[InvoiceScreen.tsx]"]
  node_gst["GST calculations<br/>[gst.ts]"]
  node_invoice_service["Invoice lifecycle<br/>[invoice.service.ts]"]
  node_history_screen["Invoice history"]
  node_pdf_service["PDF and QR export<br/>[pdf.service.ts]"]
end

subgraph group_storage["Local data"]
  node_database[("SQLite database<br/>[connection.ts]")]
  node_schema["Database schema<br/>[schema.ts]"]
end

node_user(("Mobile user"))

node_user -->|"opens app"| node_lock
node_lock -.->|"unverified access"| node_business_screen
node_user -.->|"manage details"| node_business_screen
node_business_screen -->|"uses settings"| node_business_service
node_user -.->|"manage customers"| node_customer_screen
node_user -.->|"manage products"| node_product_screen
node_product_screen -->|"uses catalogue"| node_product_service
node_invoice_screen -->|"loads customers"| node_customer_service
node_invoice_screen -->|"loads products"| node_product_service
node_invoice_screen -->|"loads settings"| node_business_service
node_invoice_screen -->|"calculates tax"| node_gst
node_invoice_screen -->|"creates invoice"| node_invoice_service
node_invoice_service -->|"calculates tax"| node_gst
node_user -.->|"prepare invoice"| node_invoice_screen
node_history_screen -->|"loads and issues"| node_invoice_service
node_history_screen -->|"exports PDF"| node_pdf_service
node_pdf_service -->|"loads invoice"| node_invoice_service
node_business_service -->|"reads and writes"| node_database
node_customer_service -->|"reads and writes"| node_database
node_product_service -->|"reads and writes"| node_database
node_invoice_service -->|"reads and writes"| node_database
node_database -->|"initializes from"| node_schema

click node_lock "https://github.com/bashutosh017/gst-geno/blob/main/src/components/AppLock.tsx"
click node_business_screen "https://github.com/bashutosh017/gst-geno/blob/main/src/screens/BusinessProfileScreen.tsx"
click node_business_service "https://github.com/bashutosh017/gst-geno/blob/main/src/services/business.service.ts"
click node_customer_screen "https://github.com/bashutosh017/gst-geno/blob/main/src/screens/CustomerScreen.tsx"
click node_customer_service "https://github.com/bashutosh017/gst-geno/blob/main/src/services/customer.service.ts"
click node_product_screen "https://github.com/bashutosh017/gst-geno/blob/main/src/screens/ProductScreen.tsx"
click node_product_service "https://github.com/bashutosh017/gst-geno/blob/main/src/services/product.service.ts"
click node_invoice_screen "https://github.com/bashutosh017/gst-geno/blob/main/src/screens/InvoiceScreen.tsx"
click node_gst "https://github.com/bashutosh017/gst-geno/blob/main/src/utils/gst.ts"
click node_invoice_service "https://github.com/bashutosh017/gst-geno/blob/main/src/services/invoice.service.ts"
click node_history_screen "https://github.com/bashutosh017/gst-geno/blob/main/src/screens/InvoiceHistoryScreen.tsx"
click node_pdf_service "https://github.com/bashutosh017/gst-geno/blob/main/src/services/pdf.service.ts"
click node_database "https://github.com/bashutosh017/gst-geno/blob/main/src/database/connection.ts"
click node_schema "https://github.com/bashutosh017/gst-geno/blob/main/src/database/schema.ts"

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_lock,node_user toneBlue
class node_business_screen,node_business_service,node_customer_screen,node_customer_service,node_product_screen,node_product_service toneAmber
class node_invoice_screen,node_gst,node_invoice_service,node_history_screen,node_pdf_service toneMint
class node_database,node_schema toneRose
```

## Components

### App access

- [App lock](https://github.com/bashutosh017/gst-geno/blob/main/src/components/AppLock.tsx): `src/components/AppLock.tsx`

### Business records

- [Business profile](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/BusinessProfileScreen.tsx): `src/screens/BusinessProfileScreen.tsx`
- [Business settings](https://github.com/bashutosh017/gst-geno/blob/main/src/services/business.service.ts): `src/services/business.service.ts`
- [Customer records](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/CustomerScreen.tsx): `src/screens/CustomerScreen.tsx`
- [Customer records service](https://github.com/bashutosh017/gst-geno/blob/main/src/services/customer.service.ts): `src/services/customer.service.ts`
- [Product catalogue](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/ProductScreen.tsx): `src/screens/ProductScreen.tsx`
- [Product service](https://github.com/bashutosh017/gst-geno/blob/main/src/services/product.service.ts): `src/services/product.service.ts`

### Invoice workflow

- [Invoice creation](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/InvoiceScreen.tsx): `src/screens/InvoiceScreen.tsx`
- [GST calculations](https://github.com/bashutosh017/gst-geno/blob/main/src/utils/gst.ts): `src/utils/gst.ts`
- [Invoice lifecycle](https://github.com/bashutosh017/gst-geno/blob/main/src/services/invoice.service.ts): `src/services/invoice.service.ts`
- [Invoice history](https://github.com/bashutosh017/gst-geno/blob/main/src/screens/InvoiceHistoryScreen.tsx): `src/screens/InvoiceHistoryScreen.tsx`
- [PDF and QR export](https://github.com/bashutosh017/gst-geno/blob/main/src/services/pdf.service.ts): `src/services/pdf.service.ts`

### Local data

- [SQLite database](https://github.com/bashutosh017/gst-geno/blob/main/src/database/connection.ts): `src/database/connection.ts`
- [Database schema](https://github.com/bashutosh017/gst-geno/blob/main/src/database/schema.ts): `src/database/schema.ts`

### Other components

- **Mobile user**

## Connections

- Mobile user → App lock: opens app
- App lock → Business profile: unverified access
- Mobile user → Business profile: manage details (evidence: `README.md`)
- Business profile → Business settings: uses settings (evidence: `src/screens/BusinessProfileScreen.tsx`)
- Mobile user → Customer records: manage customers (evidence: `README.md`)
- Mobile user → Product catalogue: manage products (evidence: `README.md`)
- Product catalogue → Product service: uses catalogue (evidence: `src/screens/ProductScreen.tsx`)
- Invoice creation → Customer records service: loads customers (evidence: `src/screens/InvoiceScreen.tsx`)
- Invoice creation → Product service: loads products (evidence: `src/screens/InvoiceScreen.tsx`)
- Invoice creation → Business settings: loads settings (evidence: `src/screens/InvoiceScreen.tsx`)
- Invoice creation → GST calculations: calculates tax (evidence: `src/screens/InvoiceScreen.tsx`)
- Invoice creation → Invoice lifecycle: creates invoice (evidence: `src/screens/InvoiceScreen.tsx`)
- Invoice lifecycle → GST calculations: calculates tax (evidence: `src/services/invoice.service.ts`)
- Mobile user → Invoice creation: prepare invoice (evidence: `README.md`)
- Invoice history → Invoice lifecycle: loads and issues (evidence: `src/screens/InvoiceHistoryScreen.tsx`)
- Invoice history → PDF and QR export: exports PDF (evidence: `src/screens/InvoiceHistoryScreen.tsx`)
- PDF and QR export → Invoice lifecycle: loads invoice (evidence: `src/services/pdf.service.ts`)
- Business settings → SQLite database: reads and writes (evidence: `src/services/business.service.ts`)
- Customer records service → SQLite database: reads and writes (evidence: `src/services/customer.service.ts`)
- Product service → SQLite database: reads and writes (evidence: `src/services/product.service.ts`)
- Invoice lifecycle → SQLite database: reads and writes (evidence: `src/services/invoice.service.ts`)
- SQLite database → Database schema: initializes from (evidence: `src/database/connection.ts`)
