Modern, Offline-First ISP & Cable TV Bill Collection and Subscriber Management System
Developed with β€οΈ by Khalid Software House | GitHub: @khdcoder
Repository: github.com/khdcoder/net-pay-pro
NetPay Pro is an open-source, production-ready billing and collection management application built for Local Internet Service Providers (ISPs), Cable TV network operators, water/utility suppliers, and subscription-based service providers.
Whether you operate in bustling urban sectors or rural villages (Chaks, Mohallahs, Dhoks) with intermittent internet connectivity, NetPay Pro works 100% offline. All records are saved securely in your browser's persistent storage engine, with automatic background synchronization to your personal Google Drive / Google Sheets whenever an internet connection is detected.
- Dual Persistence Engine: Powered by synchronous
localStorageand resilientIndexedDBwith Chrome Storage Protection API. - Chrome History Safe: Engineered to prevent accidental data wipes with automated daily snapshot recovery.
- Zero Internet Required for Daily Field Work: Record collections, search customers, and inspect ledgers even in areas with zero mobile network reception.
- Rich Profiles: Track customer name, phone number, physical address, monthly subscription fee, and service category (Internet π or Cable TV πΊ).
- Village / Area (Ϊ―Ψ§Ψ€ΪΊ / ΨΉΩΨ§ΩΫ) Filtering: Filter subscribers by sector or village to streamline on-field bill collections area by area.
- Lifecycle Management: Seamlessly mark subscribers as Active or Dropout (Inactive) with preserved historical records.
- Direct Calling: Single-tap phone call button directly opens your phone dialer for rapid customer contact.
- Auto Monthly Ledger: Automatically generates monthly bill cards for all active subscribers for any selected month and year.
- Previous Arrears Tracking: Automatically calculates previous unpaid balances + current month fees to show exact total amount due.
- Quick Cash Presets: One-click quick-fill buttons for
Rs. 500,Rs. 1,000,Rs. 1,500,Rs. 2,000, andTotal with Arrears. - Duplicate Protection: Built-in safeguards alert operators before overwriting an already paid bill.
- Instant WhatsApp Receipts: Generate and dispatch branded payment acknowledgement receipts to customers with zero third-party messaging API subscriptions or fees.
- Payment Reminders: Send one-click courteous balance reminders detailing subscriber name, billing month, and outstanding arrears.
- Executive KPIs: Live metrics for Total Billed, Total Collected, Outstanding Arrears, and Collection Percentage rate.
- Interactive D3.js Charts: Visual breakdown of collection status and monthly cash-flow trends.
- Smart Date & Text Filters: Instant live search and full-field clickable calendar picker to inspect collections by exact dates.
- Annual Customer Statements: Detailed 12-month fiscal payment ledgers for individual subscribers.
- One-Click PDF Export: Clean, printable PDF billing sheets formatted using
jsPDFandAutoTable. - CSV / Excel Export: Export data to CSV for record keeping in Microsoft Excel or Google Sheets.
- Connect your own free Google Apps Script webhook to automatically back up encrypted snapshot archives to your private Google Drive.
- Starts with a completely clean database (0 records) ready for immediate deployment. You can add your real customers immediately or use the optional "Load 50 Sample Users" tool under Settings if you want to explore with sample data first.
| Technology | Purpose |
|---|---|
| Angular 21 | Zoneless component architecture with reactive signals |
| TypeScript | Strict type-safety across models and services |
| Tailwind CSS | Clean, responsive UI with dark mode support |
| IndexedDB & LocalStorage | Multi-tier offline client storage |
| D3.js | Interactive chart visualizations |
| jsPDF & AutoTable | Client-side vector PDF report generation |
| FontAwesome 6 | Comprehensive icon system |
| Google Apps Script | Serverless Google Drive cloud backup webhook |
Make sure you have Node.js (v18.x or later) and npm installed on your system.
- Check Node version:
node -v - Check npm version:
npm -v
git clone https://github.com/khdcoder/net-pay-pro.git
cd net-pay-pronpm installnpm start
# or
npm run devNavigate to http://localhost:3000 in your web browser. The app will launch with 50 sample subscribers ready for testing!
NetPay Pro can automatically sync your database to your Google Drive account without needing a paid cloud server.
- Open Google Drive.
- Create a new Google Sheet named
NetPay_Pro_Backup. - In the menu, click Extensions β Apps Script.
- Paste the following script:
function doPost(e) {
try {
var body = JSON.parse(e.postData.contents);
var action = body.action;
var email = body.email;
var data = body.data;
var timestamp = body.timestamp || new Date().toISOString();
var folderName = "NetPay_Pro_Backups";
var folders = DriveApp.getFoldersByName(folderName);
var folder = folders.hasNext() ? folders.next() : DriveApp.createFolder(folderName);
if (action === "backup") {
var fileName = "netpay_backup_" + email.replace(/[^a-zA-Z0-9]/g, "_") + ".json";
var files = folder.getFilesByName(fileName);
if (files.hasNext()) {
files.next().setContent(JSON.stringify(data));
} else {
folder.createFile(fileName, JSON.stringify(data), MimeType.PLAIN_TEXT);
}
return ContentService.createTextOutput(JSON.stringify({ success: true, timestamp: timestamp })).setMimeType(ContentService.MimeType.JSON);
}
else if (action === "restore") {
var fileName = "netpay_backup_" + email.replace(/[^a-zA-Z0-9]/g, "_") + ".json";
var files = folder.getFilesByName(fileName);
if (files.hasNext()) {
var content = files.next().getBlob().getDataAsString();
return ContentService.createTextOutput(JSON.stringify({ success: true, data: JSON.parse(content) })).setMimeType(ContentService.MimeType.JSON);
}
return ContentService.createTextOutput(JSON.stringify({ success: false, message: "No backup found for this email." })).setMimeType(ContentService.MimeType.JSON);
}
} catch (err) {
return ContentService.createTextOutput(JSON.stringify({ success: false, error: err.toString() })).setMimeType(ContentService.MimeType.JSON);
}
}- Click Deploy β New deployment.
- Select Type: Web app.
- Execute as:
Me - Who has access:
Anyone
- Execute as:
- Click Deploy and copy the Web App URL.
- In NetPay Pro, go to Settings & Sync, click the edit icon next to the Script URL, and paste your URL.
net-pay-pro/
βββ index.html # HTML5 shell with responsive viewports & meta tags
βββ index.css # Tailwind CSS styling & custom scrollbars
βββ index.tsx # Angular bootstrap entry
βββ manifest.json # Progressive Web App (PWA) manifest
βββ sw.js # Service worker for offline asset caching
βββ src/
β βββ app.component.ts # App root layout with responsive navigation & theme signals
β βββ app.component.html # Responsive sidebar, top bar, & mobile bottom drawer
β βββ app.routes.ts # Client-side router configuration
β βββ components/
β β βββ dashboard/ # Metrics cards, D3.js chart, date & search filters
β β βββ users/ # Subscriber directory, add/edit modal, category & village filters
β β βββ billing/ # Billing collection desk, arrears calculator, WhatsApp receipts
β β βββ statements/ # Customer annual fiscal ledgers, PDF/CSV export
β β βββ settings/ # Cloud sync, IndexedDB persistent protection, demo data controls
β β βββ shared/ # Notification toast alerts
β βββ models/
β β βββ user.model.ts # Subscriber data interface
β β βββ bill-entry.model.ts # Monthly billing record interface
β β βββ app-data.model.ts # System state & settings interface
β β βββ mock-data.ts # 50 realistic pre-loaded subscribers & payment histories
β βββ services/
β βββ storage.service.ts # Reactive signals store, dual localStorage + IndexedDB sync
β βββ indexed-db.service.ts # IndexedDB low-level engine & rolling snapshots
β βββ sync.service.ts # Google Apps Script HTTP backup & restore
β βββ utility.service.ts # PDF builder, CSV exporter, & toast notifications
β βββ license.service.ts # Open-source community edition status
βββ package.json # Project dependencies and npm scripts
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Developer: Khalid Mahmood (@khdcoder)
- Organization: Khalid Software House
- Repository: https://github.com/khdcoder/net-pay-pro
If this project helps your business or organization, don't forget to give it a β on GitHub!