How balamanikantatirunagaram-lgtm/invgen-web works
InvGen Web combines a marketing site with a desktop GST invoicing workspace backed by the same Supabase project as its mobile app. The user journey proceeds through login, GST verification and onboarding, then into workspace features for invoices, clients, products, quotations, dashboard and settings; invoice and quotation previews generate downloadable or printable PDFs. The graph preserves documented capabilities and separates UI, query/API, calculation and PDF layers. Some feature and API implementations were not sampled, so their links are limited to README statements or source-index references.
Main entry points: queries.ts Query and mutation hooks · PdfPreviewPage.tsx Invoice PDF preview · QuotationPdfPreview.tsx Quotation PDF preview · VerifyGstPage.tsx GST verification
Components 27
Entry and access
- Marketing site
src/App.tsx - Login
src/app/features/auth/LoginPage.tsx - Route guards
src/app/routes/RequireAuth.tsx - GST verification
src/app/features/auth/VerifyGstPage.tsx - Onboarding
src/app/features/onboarding/WelcomeWizard.tsx
Invoicing workspace
- Dashboard
src/app/features/dashboard/DashboardPage.tsx - Invoice builder
src/app/features/invoices/BuilderPage.tsx - Invoice ledger
src/app/features/invoices/LedgerPage.tsx - Client directory
src/app/features/clients/ClientsPage.tsx - Product catalog
src/app/features/products/ProductsPage.tsx - Quotations
src/app/features/quotations/QuotationBuilder.tsx - Settings
src/app/features/settings/SettingsPages.tsx
Data and services
- Query and mutation hooks
src/app/hooks/queries.ts - Template loader
src/app/hooks/useTemplates.ts - Supabase repositories
src/app/api - GST lookup API
src/app/api/gstVerify.ts - Session state
src/app/stores/session.ts - Supabase client
src/app/supabase/client.ts - GST verification proxy
supabase/functions/verify-gst/index.ts
Document output
- GST and formatting rules
src/app/lib/gst.ts - Invoice PDF preview
src/app/features/invoices/PdfPreviewPage.tsx - Quotation PDF preview
src/app/features/quotations/QuotationPdfPreview.tsx - PDF builder
src/app/pdf/buildPdf.ts - Invoice templates
src/app/pdf/invoiceDocument.tsx - Print and download
src/app/pdf/print.ts
Other components
- Visitor
- Supabase database and auth
Connections 34
- Visitor → Marketing site: browses
src/App.tsx - Marketing site → Login: starts access
src/App.tsx - Login → Route guards: enters app
- Route guards → GST verification: requires verification
src/App.tsx - GST verification → Onboarding: continues setup
README.md - Onboarding → Dashboard: opens workspace
README.md - Dashboard → Query and mutation hooks: loads workspace data
src/app/features/dashboard/DashboardPage.tsx - Invoice builder → Query and mutation hooks: reads and saves
src/app/hooks/queries.ts - Invoice ledger → Query and mutation hooks: loads invoices
src/app/hooks/queries.ts - Client directory → Query and mutation hooks: manages clients
src/app/features/clients/ClientsPage.tsx - Client directory → GST lookup API: checks GSTIN
src/app/features/clients/ClientsPage.tsx - Product catalog → Query and mutation hooks: manages products
src/app/hooks/queries.ts - Quotations → Query and mutation hooks: reads and saves
src/app/hooks/queries.ts - Settings → Query and mutation hooks: loads settings
src/app/hooks/queries.ts - GST verification → GST lookup API: requests verification
src/app/features/auth/VerifyGstPage.tsx - GST verification → Session state: updates session
src/app/features/auth/VerifyGstPage.tsx - Query and mutation hooks → Supabase repositories: calls repositories
src/app/hooks/queries.ts - Supabase repositories → Supabase client: uses client
src/app/api/companies.ts - GST lookup API → Supabase client: uses client
src/app/api/gstVerify.ts - Template loader → Supabase client: loads templates
src/app/hooks/useTemplates.ts - Supabase client → Supabase database and auth: accesses shared backend
README.md - GST lookup API → GST verification proxy: uses verification proxy
- Invoice builder → GST and formatting rules: uses GST rules
README.md - Invoice PDF preview → Query and mutation hooks: loads invoice data
src/app/features/invoices/PdfPreviewPage.tsx - Invoice PDF preview → Template loader: loads templates
src/app/features/invoices/PdfPreviewPage.tsx - Invoice PDF preview → GST and formatting rules: uses shared formatting
README.md - Invoice PDF preview → PDF builder: builds PDF
src/app/features/invoices/PdfPreviewPage.tsx - Quotation PDF preview → Query and mutation hooks: loads quotation data
src/app/features/quotations/QuotationPdfPreview.tsx - Quotation PDF preview → Template loader: loads templates
src/app/features/quotations/QuotationPdfPreview.tsx - Quotation PDF preview → PDF builder: builds PDF
src/app/features/quotations/QuotationPdfPreview.tsx - PDF builder → Invoice templates: renders document
src/app/pdf/buildPdf.ts - Invoice templates → GST and formatting rules: uses shared formatting
src/app/pdf/invoiceDocument.tsx - Invoice PDF preview → Print and download: prints PDF
src/app/features/invoices/PdfPreviewPage.tsx - Quotation PDF preview → Print and download: prints PDF
src/app/features/quotations/QuotationPdfPreview.tsx