# arvindhkrisshna/averqo-invoice-application architecture

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

- Interactive diagram: https://gitdiagram.com/arvindhkrisshna/averqo-invoice-application
- Repository: https://github.com/arvindhkrisshna/averqo-invoice-application

## Overview

Averqo is a small-business GST invoicing and operations app: signed-in staff manage customers and items, prepare sales documents and invoices, record payments, and track expenses and time; owners also configure the business and team. The Angular client communicates with a Go server backed by MySQL. Major capabilities include recurring invoices, GST return preparation, reports, PDFs, email, and WhatsApp sharing. Relationships between sampled UI and backend handlers are not directly shown, so links rely on README-documented capabilities; unsampled handler internals are not inferred.

Main entry points: [`frontend/src/app/core/api.ts`](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/api.ts) (API client), [`backend/main.go`](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/main.go) (Go API server), [`frontend/src/app/pages/invoices/invoice-form.ts`](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/invoices/invoice-form.ts) (Invoice editor), [`frontend/src/app/app.ts`](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/app.ts) (Angular app shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_angular["Angular app shell<br/>[app.ts]"]
  node_authui["Sign-in and setup<br/>[auth.ts]"]
  node_apiclient["API client<br/>[api.ts]"]
  node_settings["Business settings"]
end

subgraph group_sales["Sales operations"]
  node_customers["Customers"]
  node_items["Items"]
  node_salesdocs["Sales documents"]
  node_invoice["Invoice editor<br/>[invoice-form.ts]"]
  node_lineeditor["Line editor<br/>[lines-editor.ts]"]
  node_recurring["Recurring invoices"]
  node_payments["Payments received"]
end

subgraph group_operations["Costs and time"]
  node_expenses["Expenses<br/>[expense-form.ts]"]
  node_time["Time tracking"]
  node_timer["Running timer<br/>[timer.ts]"]
end

subgraph group_insight["Tax and insight"]
  node_gstui["GST filing<br/>[gst-filing.ts]"]
  node_reports["Reports"]
end

subgraph group_server["Server services"]
  node_backend["Go API server<br/>[main.go]"]
  node_authsvc["Authentication<br/>[auth.go]"]
  node_docsvc["Sales document service<br/>[documents.go]"]
  node_invoicesvc["Invoice service<br/>[invoices.go]"]
  node_expensesvc["Expense service<br/>[expenses.go]"]
  node_timesvc["Time service<br/>[timetracking.go]"]
  node_gstsvc["GST return service<br/>[gstfiling.go]"]
  node_reportsvc["Report service<br/>[reports.go]"]
  node_pdfsvc["PDF generation<br/>[pdf.go]"]
  node_email["Email sending<br/>[email.go]"]
  node_mysql[("MySQL database")]
end

node_staff(("Owner or staff"))
node_mailaccount[("Business mail account")]
node_whatsapp["WhatsApp"]

node_staff -->|"uses"| node_angular
node_angular -->|"offers sign-in"| node_authui
node_authui -->|"authenticates through"| node_apiclient
node_angular -->|"loads business data"| node_apiclient
node_customers -->|"manages customers"| node_apiclient
node_items -->|"manages items"| node_apiclient
node_salesdocs -->|"manages documents"| node_apiclient
node_invoice -->|"loads and saves"| node_apiclient
node_invoice -->|"uses lines"| node_lineeditor
node_invoice -->|"offers unbilled work"| node_time
node_invoice -->|"offers billable costs"| node_expenses
node_recurring -->|"manages schedules"| node_apiclient
node_payments -->|"records payments"| node_apiclient
node_expenses -->|"records expenses"| node_apiclient
node_time -->|"uses timer"| node_timer
node_time -->|"manages time"| node_apiclient
node_gstui -->|"requests returns"| node_apiclient
node_reports -->|"requests reports"| node_apiclient
node_settings -->|"updates settings"| node_apiclient
node_apiclient -->|"calls API"| node_backend
node_backend -.->|"serves authentication"| node_authsvc
node_backend -.->|"serves documents"| node_docsvc
node_backend -.->|"serves invoices"| node_invoicesvc
node_backend -.->|"serves expenses"| node_expensesvc
node_backend -.->|"serves time"| node_timesvc
node_backend -.->|"serves filing"| node_gstsvc
node_backend -.->|"serves reports"| node_reportsvc
node_backend -->|"generates PDFs"| node_pdfsvc
node_backend -->|"sends email"| node_email
node_email -->|"uses account"| node_mailaccount
node_salesdocs -->|"shares documents"| node_whatsapp
node_backend -->|"persists business data"| node_mysql

click node_angular "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/app.ts"
click node_authui "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/auth.ts"
click node_apiclient "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/api.ts"
click node_customers "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/customers"
click node_items "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/items"
click node_salesdocs "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/documents"
click node_invoice "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/invoices/invoice-form.ts"
click node_lineeditor "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/shared/lines-editor.ts"
click node_recurring "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/recurring"
click node_payments "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/payments"
click node_expenses "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/expenses/expense-form.ts"
click node_time "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/time"
click node_timer "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/timer.ts"
click node_gstui "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/gst/gst-filing.ts"
click node_reports "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/reports"
click node_settings "https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/settings"
click node_backend "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/main.go"
click node_authsvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/auth.go"
click node_docsvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/documents.go"
click node_invoicesvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/invoices.go"
click node_expensesvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/expenses.go"
click node_timesvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/timetracking.go"
click node_gstsvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/gstfiling.go"
click node_reportsvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/reports.go"
click node_pdfsvc "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/pdf.go"
click node_email "https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/email.go"

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_angular,node_authui,node_apiclient,node_settings toneBlue
class node_customers,node_items,node_salesdocs,node_invoice,node_lineeditor,node_recurring,node_payments,node_mailaccount toneAmber
class node_expenses,node_time,node_timer toneMint
class node_gstui,node_reports toneRose
class node_backend,node_authsvc,node_docsvc,node_invoicesvc,node_expensesvc,node_timesvc,node_gstsvc,node_reportsvc,node_pdfsvc,node_email,node_mysql,node_staff,node_whatsapp toneIndigo
```

## Components

### Web application

- [Angular app shell](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/app.ts): `frontend/src/app/app.ts`
- [Sign-in and setup](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/auth.ts): `frontend/src/app/core/auth.ts`
- [API client](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/api.ts): `frontend/src/app/core/api.ts`
- [Business settings](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/settings): `frontend/src/app/pages/settings`

### Sales operations

- [Customers](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/customers): `frontend/src/app/pages/customers`
- [Items](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/items): `frontend/src/app/pages/items`
- [Sales documents](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/documents): `frontend/src/app/pages/documents`
- [Invoice editor](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/invoices/invoice-form.ts): `frontend/src/app/pages/invoices/invoice-form.ts`
- [Line editor](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/shared/lines-editor.ts): `frontend/src/app/shared/lines-editor.ts`
- [Recurring invoices](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/recurring): `frontend/src/app/pages/recurring`
- [Payments received](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/payments): `frontend/src/app/pages/payments`

### Costs and time

- [Expenses](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/expenses/expense-form.ts): `frontend/src/app/pages/expenses/expense-form.ts`
- [Time tracking](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/time): `frontend/src/app/pages/time`
- [Running timer](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/core/timer.ts): `frontend/src/app/core/timer.ts`

### Tax and insight

- [GST filing](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/frontend/src/app/pages/gst/gst-filing.ts): `frontend/src/app/pages/gst/gst-filing.ts`
- [Reports](https://github.com/arvindhkrisshna/averqo-invoice-application/tree/main/frontend/src/app/pages/reports): `frontend/src/app/pages/reports`

### Server services

- [Go API server](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/main.go): `backend/main.go`
- [Authentication](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/auth.go): `backend/auth.go`
- [Sales document service](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/documents.go): `backend/documents.go`
- [Invoice service](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/invoices.go): `backend/invoices.go`
- [Expense service](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/expenses.go): `backend/expenses.go`
- [Time service](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/timetracking.go): `backend/timetracking.go`
- [GST return service](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/gstfiling.go): `backend/gstfiling.go`
- [Report service](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/reports.go): `backend/reports.go`
- [PDF generation](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/pdf.go): `backend/pdf.go`
- [Email sending](https://github.com/arvindhkrisshna/averqo-invoice-application/blob/main/backend/email.go): `backend/email.go`
- **MySQL database**

### Other components

- **Owner or staff**
- **Business mail account**
- **WhatsApp**

## Connections

- Owner or staff → Angular app shell: uses
- Angular app shell → Sign-in and setup: offers sign-in (evidence: `frontend/src/app/app.ts`)
- Sign-in and setup → API client: authenticates through (evidence: `frontend/src/app/core/auth.ts`)
- Angular app shell → API client: loads business data (evidence: `frontend/src/app/app.ts`)
- Customers → API client: manages customers (evidence: `frontend/src/app/core/api.ts`)
- Items → API client: manages items (evidence: `frontend/src/app/core/api.ts`)
- Sales documents → API client: manages documents (evidence: `frontend/src/app/core/api.ts`)
- Invoice editor → API client: loads and saves (evidence: `frontend/src/app/pages/invoices/invoice-form.ts`)
- Invoice editor → Line editor: uses lines (evidence: `frontend/src/app/pages/invoices/invoice-form.ts`)
- Invoice editor → Time tracking: offers unbilled work
- Invoice editor → Expenses: offers billable costs
- Recurring invoices → API client: manages schedules (evidence: `frontend/src/app/pages/recurring/recurring-form.ts`)
- Payments received → API client: records payments (evidence: `frontend/src/app/core/api.ts`)
- Expenses → API client: records expenses (evidence: `frontend/src/app/pages/expenses/expense-form.ts`)
- Time tracking → Running timer: uses timer (evidence: `frontend/src/app/pages/time/timesheet.ts`)
- Time tracking → API client: manages time (evidence: `frontend/src/app/pages/time/timesheet.ts`)
- GST filing → API client: requests returns (evidence: `frontend/src/app/pages/gst/gst-filing.ts`)
- Reports → API client: requests reports (evidence: `frontend/src/app/pages/reports/report-view.ts`)
- Business settings → API client: updates settings (evidence: `frontend/src/app/pages/settings/account-settings.ts`)
- API client → Go API server: calls API
- Go API server → Authentication: serves authentication
- Go API server → Sales document service: serves documents
- Go API server → Invoice service: serves invoices
- Go API server → Expense service: serves expenses
- Go API server → Time service: serves time
- Go API server → GST return service: serves filing
- Go API server → Report service: serves reports
- Go API server → PDF generation: generates PDFs
- Go API server → Email sending: sends email
- Email sending → Business mail account: uses account
- Sales documents → WhatsApp: shares documents
- Go API server → MySQL database: persists business data
