# codeby-javier/billingpay-wifi-golang architecture

> Architecture diagram of the GitHub repository codeby-javier/billingpay-wifi-golang, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/codeby-javier/billingpay-wifi-golang
- Repository: https://github.com/codeby-javier/billingpay-wifi-golang

## Overview

BillingPay WiFi is an ISP billing and customer-management system, with a mobile customer portal alongside its Go service. The visible mobile flow authenticates customers, then lets them view account, invoice and payment information or create and track support tickets through a shared API client. The README documents broader operator capabilities—subscriptions, network operations, equipment, reporting and administration—which are represented as backend domains. Go startup and handler wiring were not excerpted, so those backend relationships are not asserted; the mobile client’s API calls are documented in source excerpts.

Main entry points: [`cmd/server/main.go`](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/cmd/server/main.go) (Go API server), [`mobile/App.tsx`](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/App.tsx) (Mobile navigation), [`mobile/src/services/api.ts`](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/services/api.ts) (API client), [`mobile/src/context/AuthContext.tsx`](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/context/AuthContext.tsx) (Auth context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile portal"]
  node_mobile_app["Mobile navigation<br/>[App.tsx]"]
  node_login["Sign in<br/>[LoginScreen.tsx]"]
  node_mobile_api["API client<br/>[api.ts]"]
  node_dashboard["Customer dashboard"]
  node_invoice_list["Invoice list<br/>[InvoicesScreen.tsx]"]
  node_invoice_detail["Invoice detail"]
  node_payments_mobile["Payment history<br/>[PaymentsScreen.tsx]"]
  node_tickets_mobile["Ticket list<br/>[TicketsScreen.tsx]"]
  node_ticket_create["Create ticket"]
  node_profile["Customer profile<br/>[ProfileScreen.tsx]"]
end

subgraph group_identity["Identity and persistence"]
  node_auth_state["Auth context<br/>[AuthContext.tsx]"]
  node_theme["Theme context<br/>[ThemeContext.tsx]"]
  node_server["Go API server<br/>[main.go]"]
  node_configuration["Runtime configuration<br/>[config.go]"]
  node_database[("SQLite database<br/>[database.go]")]
  node_access["Access control<br/>[auth.go]"]
  node_models["Domain models<br/>[models.go]"]
end

subgraph group_billing["Billing domains"]
  node_customer_domain["Customer management"]
  node_subscriptions["Packages and subscriptions"]
  node_invoices["Invoices and tax<br/>[invoice_handler.go]"]
  node_payments["Payment processing<br/>[payment_handler.go]"]
  node_promotions["Promotions<br/>[promo_handler.go]"]
  node_services["Business services<br/>[services.go]"]
end

subgraph group_operations["ISP operations"]
  node_support["Tickets and SLA<br/>[ticket_handler.go]"]
  node_workorders["Work orders"]
  node_equipment["Equipment inventory"]
  node_network["Network monitoring"]
  node_pppoe["PPPoE integration<br/>[pppoe_handler.go]"]
end

subgraph group_insights["Reporting and governance"]
  node_analytics["Analytics and reports"]
  node_dashboard_ops["Operator dashboard"]
  node_exports["Data import and export<br/>[export_handler.go]"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_mobile_app
node_mobile_app -->|"provides context"| node_auth_state
node_mobile_app -->|"provides context"| node_theme
node_mobile_app -->|"navigates to"| node_login
node_mobile_app -->|"navigates to"| node_dashboard
node_mobile_app -->|"navigates to"| node_invoice_list
node_mobile_app -->|"navigates to"| node_invoice_detail
node_mobile_app -->|"navigates to"| node_payments_mobile
node_mobile_app -->|"navigates to"| node_tickets_mobile
node_mobile_app -->|"navigates to"| node_ticket_create
node_mobile_app -->|"navigates to"| node_profile
node_auth_state -->|"calls"| node_mobile_api
node_login -->|"authenticates through"| node_auth_state
node_dashboard -->|"fetches dashboard"| node_mobile_api
node_invoice_list -->|"fetches invoices"| node_mobile_api
node_invoice_detail -->|"fetches invoice"| node_mobile_api
node_payments_mobile -->|"fetches payments"| node_mobile_api
node_tickets_mobile -->|"fetches tickets"| node_mobile_api
node_ticket_create -->|"submits ticket"| node_mobile_api
node_profile -->|"updates profile"| node_mobile_api
node_mobile_api -->|"requests API"| node_server
node_server -.->|"loads configuration"| node_configuration
node_server -.->|"initializes database"| node_database
node_server -.->|"uses middleware"| node_access
node_server -.->|"routes requests"| node_customer_domain
node_server -.->|"routes requests"| node_subscriptions
node_server -.->|"routes requests"| node_invoices
node_server -.->|"routes requests"| node_payments
node_server -.->|"routes requests"| node_support
node_database -.->|"persists"| node_models
node_invoices -.->|"delegates to"| node_services
node_subscriptions -.->|"delegates to"| node_services
node_customer_domain -.->|"delegates to"| node_services
node_server -.->|"routes requests"| node_promotions
node_server -.->|"routes requests"| node_workorders
node_server -.->|"routes requests"| node_equipment
node_server -.->|"routes requests"| node_network
node_server -.->|"routes requests"| node_pppoe
node_server -.->|"routes requests"| node_analytics
node_server -.->|"routes requests"| node_dashboard_ops
node_server -.->|"routes requests"| node_exports

click node_mobile_app "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/App.tsx"
click node_login "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/LoginScreen.tsx"
click node_auth_state "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/context/AuthContext.tsx"
click node_theme "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/context/ThemeContext.tsx"
click node_mobile_api "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/services/api.ts"
click node_dashboard "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/DashboardScreen.tsx"
click node_invoice_list "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/InvoicesScreen.tsx"
click node_invoice_detail "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/InvoiceDetailScreen.tsx"
click node_payments_mobile "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/PaymentsScreen.tsx"
click node_tickets_mobile "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/TicketsScreen.tsx"
click node_ticket_create "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/CreateTicketScreen.tsx"
click node_profile "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/ProfileScreen.tsx"
click node_server "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/cmd/server/main.go"
click node_configuration "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/config/config.go"
click node_database "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/config/database.go"
click node_customer_domain "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/customer_handler.go"
click node_subscriptions "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/subscription_handler.go"
click node_invoices "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/invoice_handler.go"
click node_payments "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/payment_handler.go"
click node_promotions "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/promo_handler.go"
click node_support "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/ticket_handler.go"
click node_workorders "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/workorder_handler.go"
click node_equipment "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/equipment_handler.go"
click node_network "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/bandwidth_handler.go"
click node_pppoe "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/pppoe_handler.go"
click node_analytics "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/analytics_handler.go"
click node_dashboard_ops "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/dashboard_handler.go"
click node_exports "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/export_handler.go"
click node_access "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/middleware/auth.go"
click node_models "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/model/models.go"
click node_services "https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/service/services.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_mobile_app,node_login,node_mobile_api,node_dashboard,node_invoice_list,node_invoice_detail,node_payments_mobile,node_tickets_mobile,node_ticket_create,node_profile toneBlue
class node_auth_state,node_theme,node_server,node_configuration,node_database,node_access,node_models toneAmber
class node_customer_domain,node_subscriptions,node_invoices,node_payments,node_promotions,node_services toneMint
class node_support,node_workorders,node_equipment,node_network,node_pppoe toneRose
class node_analytics,node_dashboard_ops,node_exports,node_customer toneIndigo
```

## Components

### Mobile portal

- [Mobile navigation](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/App.tsx): `mobile/App.tsx`
- [Sign in](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/LoginScreen.tsx): `mobile/src/screens/LoginScreen.tsx`
- [API client](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/services/api.ts): `mobile/src/services/api.ts`
- [Customer dashboard](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/DashboardScreen.tsx): `mobile/src/screens/DashboardScreen.tsx`
- [Invoice list](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/InvoicesScreen.tsx): `mobile/src/screens/InvoicesScreen.tsx`
- [Invoice detail](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/InvoiceDetailScreen.tsx): `mobile/src/screens/InvoiceDetailScreen.tsx`
- [Payment history](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/PaymentsScreen.tsx): `mobile/src/screens/PaymentsScreen.tsx`
- [Ticket list](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/TicketsScreen.tsx): `mobile/src/screens/TicketsScreen.tsx`
- [Create ticket](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/CreateTicketScreen.tsx): `mobile/src/screens/CreateTicketScreen.tsx`
- [Customer profile](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/screens/ProfileScreen.tsx): `mobile/src/screens/ProfileScreen.tsx`

### Identity and persistence

- [Auth context](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/context/AuthContext.tsx): `mobile/src/context/AuthContext.tsx`
- [Theme context](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/mobile/src/context/ThemeContext.tsx): `mobile/src/context/ThemeContext.tsx`
- [Go API server](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/cmd/server/main.go): `cmd/server/main.go`
- [Runtime configuration](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/config/config.go): `config/config.go`
- [SQLite database](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/config/database.go): `config/database.go`
- [Access control](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/middleware/auth.go): `internal/middleware/auth.go`
- [Domain models](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/model/models.go): `internal/model/models.go`

### Billing domains

- [Customer management](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/customer_handler.go): `internal/handler/customer_handler.go`
- [Packages and subscriptions](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/subscription_handler.go): `internal/handler/subscription_handler.go`
- [Invoices and tax](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/invoice_handler.go): `internal/handler/invoice_handler.go`
- [Payment processing](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/payment_handler.go): `internal/handler/payment_handler.go`
- [Promotions](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/promo_handler.go): `internal/handler/promo_handler.go`
- [Business services](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/service/services.go): `internal/service/services.go`

### ISP operations

- [Tickets and SLA](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/ticket_handler.go): `internal/handler/ticket_handler.go`
- [Work orders](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/workorder_handler.go): `internal/handler/workorder_handler.go`
- [Equipment inventory](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/equipment_handler.go): `internal/handler/equipment_handler.go`
- [Network monitoring](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/bandwidth_handler.go): `internal/handler/bandwidth_handler.go`
- [PPPoE integration](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/pppoe_handler.go): `internal/handler/pppoe_handler.go`

### Reporting and governance

- [Analytics and reports](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/analytics_handler.go): `internal/handler/analytics_handler.go`
- [Operator dashboard](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/dashboard_handler.go): `internal/handler/dashboard_handler.go`
- [Data import and export](https://github.com/codeby-javier/billingpay-wifi-golang/blob/main/internal/handler/export_handler.go): `internal/handler/export_handler.go`

### Other components

- **Customer**

## Connections

- Customer → Mobile navigation: uses (evidence: `README.md`)
- Mobile navigation → Auth context: provides context (evidence: `mobile/App.tsx`)
- Mobile navigation → Theme context: provides context (evidence: `mobile/App.tsx`)
- Mobile navigation → Sign in: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Customer dashboard: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Invoice list: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Invoice detail: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Payment history: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Ticket list: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Create ticket: navigates to (evidence: `mobile/App.tsx`)
- Mobile navigation → Customer profile: navigates to (evidence: `mobile/App.tsx`)
- Auth context → API client: calls (evidence: `mobile/src/context/AuthContext.tsx`)
- Sign in → Auth context: authenticates through (evidence: `mobile/src/screens/LoginScreen.tsx`)
- Customer dashboard → API client: fetches dashboard (evidence: `mobile/src/screens/DashboardScreen.tsx`)
- Invoice list → API client: fetches invoices (evidence: `mobile/src/services/api.ts`)
- Invoice detail → API client: fetches invoice (evidence: `mobile/src/services/api.ts`)
- Payment history → API client: fetches payments (evidence: `mobile/src/screens/PaymentsScreen.tsx`)
- Ticket list → API client: fetches tickets (evidence: `mobile/src/screens/TicketsScreen.tsx`)
- Create ticket → API client: submits ticket (evidence: `mobile/src/screens/CreateTicketScreen.tsx`)
- Customer profile → API client: updates profile (evidence: `mobile/src/services/api.ts`)
- API client → Go API server: requests API (evidence: `mobile/src/services/api.ts`)
- Go API server → Runtime configuration: loads configuration
- Go API server → SQLite database: initializes database
- Go API server → Access control: uses middleware
- Go API server → Customer management: routes requests
- Go API server → Packages and subscriptions: routes requests
- Go API server → Invoices and tax: routes requests
- Go API server → Payment processing: routes requests
- Go API server → Tickets and SLA: routes requests
- SQLite database → Domain models: persists
- Invoices and tax → Business services: delegates to
- Packages and subscriptions → Business services: delegates to
- Customer management → Business services: delegates to
- Go API server → Promotions: routes requests
- Go API server → Work orders: routes requests
- Go API server → Equipment inventory: routes requests
- Go API server → Network monitoring: routes requests
- Go API server → PPPoE integration: routes requests
- Go API server → Analytics and reports: routes requests
- Go API server → Operator dashboard: routes requests
- Go API server → Data import and export: routes requests
