# kanggawe/netpro-crm architecture

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

- Interactive diagram: https://gitdiagram.com/kanggawe/netpro-crm
- Repository: https://github.com/kanggawe/netpro-crm

## Overview

NETPRO CRM is an ISP operations system spanning customer onboarding, service provisioning, billing and payments, network operations, and business administration. The primary workflow shown is a user navigating the web app to customer management, where the API handles customer records and can invoke billing and RADIUS services. The repository also contains a parallel PHP application with billing, finance, HR, inventory, and NOC capabilities; these are represented as a separate legacy application branch. Some backend links are grounded in indexed references rather than full excerpts, so uncertain runtime wiring is omitted.

Main entry points: [`restapi/frontend/src/App.jsx`](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/App.jsx) (Application shell), [`restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`](https://github.com/kanggawe/netpro-crm/blob/main/restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php) (Customer API), [`backend/app/Services/BillingService.php`](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Services/BillingService.php) (Billing engine), [`backend/app/Services/RadiusCoaService.php`](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Services/RadiusCoaService.php) (RADIUS provisioning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_spa["Application shell<br/>[App.jsx]"]
  node_api_client["API client<br/>[client.js]"]
  node_customer_ui["Customer workspace<br/>[index.jsx]"]
  node_billing_ui["Billing workspace<br/>[index.jsx]"]
  node_noc_ui["NOC workspace<br/>[index.jsx]"]
  node_dashboard_ui["Operations dashboards<br/>[index.jsx]"]
end

subgraph group_api["REST API"]
  node_customer_api["Customer API"]
  node_radius_api["RADIUS API"]
  node_billing_api["Billing API"]
  node_customer_records[("Customer records<br/>[Customer.php]")]
  node_package_records[("Service packages<br/>[Package.php]")]
  node_audit[("Audit trail<br/>[AuditLog.php]")]
end

subgraph group_provision["Billing and access"]
  node_billing_service["Billing engine<br/>[BillingService.php]"]
  node_invoice_records[("Invoices and payments<br/>[Invoice.php]")]
  node_radius_service["RADIUS provisioning"]
  node_radius_records[("RADIUS accounts<br/>[RadiusUser.php]")]
end

subgraph group_operations["ISP operations"]
  node_business_modules["Finance, HR, inventory, tickets and work orders"]
end

subgraph group_legacy["PHP application"]
  node_legacy_ui["PHP operations interface"]
  node_legacy_models[("PHP domain models<br/>[models.php]")]
  node_legacy_api["PHP request handler<br/>[handler.php]"]
  node_legacy_gateway["Tripay and Xendit"]
end

node_operator(("ISP staff"))
node_radius_server[("FreeRADIUS")]
node_pay_gateway["Payment gateways"]

node_operator -->|"uses"| node_spa
node_spa -->|"uses"| node_api_client
node_spa -->|"routes to"| node_customer_ui
node_spa -->|"routes to"| node_billing_ui
node_spa -->|"routes to"| node_noc_ui
node_spa -.->|"routes to"| node_dashboard_ui
node_customer_api -->|"reads and writes"| node_customer_records
node_customer_api -->|"loads package"| node_package_records
node_customer_api -->|"invokes"| node_billing_service
node_customer_api -->|"invokes"| node_radius_service
node_customer_api -->|"logs actions"| node_audit
node_radius_api -->|"invokes"| node_radius_service
node_radius_service -->|"reads customer"| node_customer_records
node_radius_service -->|"updates account"| node_radius_records
node_radius_service -->|"syncs credentials"| node_radius_server
node_billing_service -->|"reads customer"| node_customer_records
node_billing_service -->|"reads package"| node_package_records
node_billing_service -->|"creates billing"| node_invoice_records
node_billing_api -.->|"invokes"| node_billing_service
node_billing_ui -.->|"initiates payment"| node_pay_gateway
node_spa -.->|"routes to"| node_business_modules
node_operator -.->|"uses"| node_legacy_ui
node_legacy_ui -->|"uses domain data"| node_legacy_models
node_legacy_api -->|"loads models"| node_legacy_models
node_legacy_api -->|"uses gateways"| node_legacy_gateway

click node_spa "https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/App.jsx"
click node_api_client "https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/api/client.js"
click node_customer_ui "https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/customers/index.jsx"
click node_billing_ui "https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/billing/index.jsx"
click node_noc_ui "https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/noc/index.jsx"
click node_dashboard_ui "https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/dashboard/index.jsx"
click node_customer_api "https://github.com/kanggawe/netpro-crm/blob/main/restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php"
click node_radius_api "https://github.com/kanggawe/netpro-crm/blob/main/restapi/backend/app/Http/Controllers/Api/V1/RadiusController.php"
click node_billing_api "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Http/Controllers/Api/V1/BillingController.php"
click node_customer_records "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/Customer.php"
click node_package_records "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/Package.php"
click node_audit "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/AuditLog.php"
click node_billing_service "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Services/BillingService.php"
click node_invoice_records "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/Invoice.php"
click node_radius_service "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Services/RadiusCoaService.php"
click node_radius_records "https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/RadiusUser.php"
click node_business_modules "https://github.com/kanggawe/netpro-crm/tree/main/restapi/frontend/src/pages"
click node_legacy_ui "https://github.com/kanggawe/netpro-crm/tree/main/netro-dashbill"
click node_legacy_models "https://github.com/kanggawe/netpro-crm/blob/main/netro-dashbill/config/models.php"
click node_legacy_api "https://github.com/kanggawe/netpro-crm/blob/main/netro-dashbill/api/handler.php"
click node_legacy_gateway "https://github.com/kanggawe/netpro-crm/tree/main/netro-dashbill/services"

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_spa,node_api_client,node_customer_ui,node_billing_ui,node_noc_ui,node_dashboard_ui toneBlue
class node_customer_api,node_radius_api,node_billing_api,node_customer_records,node_package_records,node_audit,node_radius_server toneAmber
class node_billing_service,node_invoice_records,node_radius_service,node_radius_records toneMint
class node_business_modules toneRose
class node_legacy_ui,node_legacy_models,node_legacy_api,node_legacy_gateway,node_operator,node_pay_gateway toneIndigo
```

## Components

### Web application

- [Application shell](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/App.jsx): `restapi/frontend/src/App.jsx`
- [API client](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/api/client.js): `restapi/frontend/src/api/client.js`
- [Customer workspace](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/customers/index.jsx): `restapi/frontend/src/pages/customers/index.jsx`
- [Billing workspace](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/billing/index.jsx): `restapi/frontend/src/pages/billing/index.jsx`
- [NOC workspace](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/noc/index.jsx): `restapi/frontend/src/pages/noc/index.jsx`
- [Operations dashboards](https://github.com/kanggawe/netpro-crm/blob/main/restapi/frontend/src/pages/dashboard/index.jsx): `restapi/frontend/src/pages/dashboard/index.jsx`

### REST API

- [Customer API](https://github.com/kanggawe/netpro-crm/blob/main/restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php): `restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`
- [RADIUS API](https://github.com/kanggawe/netpro-crm/blob/main/restapi/backend/app/Http/Controllers/Api/V1/RadiusController.php): `restapi/backend/app/Http/Controllers/Api/V1/RadiusController.php`
- [Billing API](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Http/Controllers/Api/V1/BillingController.php): `backend/app/Http/Controllers/Api/V1/BillingController.php`
- [Customer records](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/Customer.php): `backend/app/Models/Customer.php`
- [Service packages](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/Package.php): `backend/app/Models/Package.php`
- [Audit trail](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/AuditLog.php): `backend/app/Models/AuditLog.php`

### Billing and access

- [Billing engine](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Services/BillingService.php): `backend/app/Services/BillingService.php`
- [Invoices and payments](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/Invoice.php): `backend/app/Models/Invoice.php`
- [RADIUS provisioning](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Services/RadiusCoaService.php): `backend/app/Services/RadiusCoaService.php`
- [RADIUS accounts](https://github.com/kanggawe/netpro-crm/blob/main/backend/app/Models/RadiusUser.php): `backend/app/Models/RadiusUser.php`

### ISP operations

- [Finance, HR, inventory, tickets and work orders](https://github.com/kanggawe/netpro-crm/tree/main/restapi/frontend/src/pages): `restapi/frontend/src/pages`

### PHP application

- [PHP operations interface](https://github.com/kanggawe/netpro-crm/tree/main/netro-dashbill): `netro-dashbill`
- [PHP domain models](https://github.com/kanggawe/netpro-crm/blob/main/netro-dashbill/config/models.php): `netro-dashbill/config/models.php`
- [PHP request handler](https://github.com/kanggawe/netpro-crm/blob/main/netro-dashbill/api/handler.php): `netro-dashbill/api/handler.php`
- [Tripay and Xendit](https://github.com/kanggawe/netpro-crm/tree/main/netro-dashbill/services): `netro-dashbill/services`

### Other components

- **ISP staff**
- **FreeRADIUS**
- **Payment gateways**

## Connections

- ISP staff → Application shell: uses (evidence: `restapi/frontend/src/App.jsx`)
- Application shell → API client: uses (evidence: `restapi/frontend/src/App.jsx`)
- Application shell → Customer workspace: routes to (evidence: `restapi/frontend/src/App.jsx`)
- Application shell → Billing workspace: routes to (evidence: `restapi/frontend/src/App.jsx`)
- Application shell → NOC workspace: routes to (evidence: `restapi/frontend/src/App.jsx`)
- Application shell → Operations dashboards: routes to (evidence: `restapi/frontend/src/App.jsx`)
- Customer API → Customer records: reads and writes (evidence: `restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`)
- Customer API → Service packages: loads package (evidence: `restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`)
- Customer API → Billing engine: invokes (evidence: `restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`)
- Customer API → RADIUS provisioning: invokes (evidence: `restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`)
- Customer API → Audit trail: logs actions (evidence: `restapi/backend/app/Http/Controllers/Api/V1/CustomerController.php`)
- RADIUS API → RADIUS provisioning: invokes (evidence: `restapi/backend/app/Http/Controllers/Api/V1/RadiusController.php`)
- RADIUS provisioning → Customer records: reads customer (evidence: `backend/app/Services/RadiusCoaService.php`)
- RADIUS provisioning → RADIUS accounts: updates account (evidence: `backend/app/Services/RadiusCoaService.php`)
- RADIUS provisioning → FreeRADIUS: syncs credentials (evidence: `backend/app/Services/RadiusCoaService.php`)
- Billing engine → Customer records: reads customer (evidence: `backend/app/Services/BillingService.php`)
- Billing engine → Service packages: reads package (evidence: `backend/app/Services/BillingService.php`)
- Billing engine → Invoices and payments: creates billing (evidence: `backend/app/Services/BillingService.php`)
- Billing API → Billing engine: invokes
- Billing workspace → Payment gateways: initiates payment
- Application shell → Finance, HR, inventory, tickets and work orders: routes to (evidence: `restapi/frontend/src/App.jsx`)
- ISP staff → PHP operations interface: uses
- PHP operations interface → PHP domain models: uses domain data (evidence: `netro-dashbill/config/models.php`)
- PHP request handler → PHP domain models: loads models (evidence: `netro-dashbill/api/handler.php`)
- PHP request handler → Tripay and Xendit: uses gateways (evidence: `netro-dashbill/api/handler.php`)
