How lightnet19/lightbill works
Light.Bill is a self-hosted ISP billing, CRM, and network-operations platform. Staff and customers use its web/API surfaces to manage subscribers and services, issue invoices, accept payments, and monitor network operations; scheduled jobs automate billing and network checks. Separate product branches cover customer support and messaging, finance and reporting, and field/team operations. README statements establish the broader capabilities; source excerpts and index references support the internal links shown. Unsampled route implementations limit finer-grained control-flow detail.
Main entry points: api Application APIs · prisma.ts Application database · payment Gateway connectors · whatsapp-engine.ts WhatsApp engine
Components 25
Web and identity
- Staff dashboard
lightbill-app/src/app/dashboard - Customer portal
lightbill-app/src/app/client - Authentication
lightbill-app/src/lib/auth.ts - Application APIs
lightbill-app/src/app/api
Billing and finance
- Application database
lightbill-app/src/lib/prisma.ts - Credential encryption
lightbill-app/src/lib/crypto.ts - Invoices and billing
lightbill-app/src/app/api/invoices/route.ts - Payment verification
lightbill-app/src/lib/payment/verify.ts - Gateway connectors
lightbill-app/src/lib/payment - Receipt storage
lightbill-app/src/lib/receipt-storage.ts - Finance and reports
lightbill-app/src/app/api/finance
Network operations
- MikroTik integration
lightbill-app/src/lib/mikrotik.ts - OLT management
lightbill-app/src/lib/olt - RADIUS access
lightbill-app/src/app/api/radius - Analytics and monitoring
lightbill-app/src/app/api/analytics
Support and messaging
- WhatsApp engine
lightbill-app/src/lib/whatsapp-engine.ts - Telegram engine
lightbill-app/src/lib/telegram-engine.ts - Chat and ticketing
lightbill-app/src/app/api/tickets
Team operations
- Field and HR operations
lightbill-app/src/app/api/attendance - Inventory and assets
lightbill-app/src/app/api/inventory
Other components
- ISP staff
- ISP customers
- Scheduled jobs
- Payment gateways
- Routers and OLTs
Connections 31
- ISP staff → Staff dashboard: uses
- ISP customers → Customer portal: uses
- Staff dashboard → Application APIs: requests
- Customer portal → Application APIs: requests
- Application APIs → Authentication: authorizes
- Application APIs → Application database: reads and writes
- Scheduled jobs → Invoices and billing: triggers invoicing
- ISP customers → Invoices and billing: pays invoices
- Invoices and billing → Gateway connectors: creates payment
- Gateway connectors → Payment gateways: requests payment
lightbill-app/src/lib/payment/tripay-engine.ts - Payment gateways → Application APIs: sends callbacks
- Application APIs → Payment verification: verifies callbacks
- Gateway connectors → Payment verification: checks signatures
lightbill-app/src/lib/payment/tripay-engine.ts - Gateway connectors → Application database: records transaction
lightbill-app/src/lib/payment/tripay-engine.ts - Finance and reports → Receipt storage: serves receipts
lightbill-app/src/lib/receipt-storage.ts - Scheduled jobs → Routers and OLTs: runs network checks
- Application APIs → MikroTik integration: manages routers
- Application APIs → OLT management: manages OLTs
- Application APIs → RADIUS access: handles access
- Application APIs → Analytics and monitoring: serves monitoring
- MikroTik integration → Application database: queries customers
lightbill-app/src/lib/mikrotik.ts - MikroTik integration → Credential encryption: decrypts credentials
lightbill-app/src/lib/mikrotik.ts - Application database → Credential encryption: encrypts fields
lightbill-app/src/lib/prisma.ts - Application APIs → WhatsApp engine: configures messaging
- Application APIs → Telegram engine: configures messaging
- WhatsApp engine → Receipt storage: stores proof images
lightbill-app/src/lib/whatsapp-engine.ts - WhatsApp engine → MikroTik integration: controls connections
lightbill-app/src/lib/whatsapp-engine.ts - WhatsApp engine → Chat and ticketing: opens conversations
- Telegram engine → Application database: loads tenant token
lightbill-app/src/lib/telegram-engine.ts - ISP staff → Field and HR operations: manages field work
- ISP staff → Inventory and assets: manages assets