Skip to content

ibtesaamaslam/FlowForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

02671b31-74c5-4c0b-9812-72333dc544b3

πŸ“‘ FlowForge β€” ISP Town Manager

React 19 Β· TypeScript Β· Tailwind CSS Β· SheetJS Β· Offline-First

A comprehensive, offline-first ISP management platform that replaces paper records and spreadsheets β€” organizing subscribers by hierarchical area and town, generating monthly bills with LIFO payment logic, tracking full financial ledgers, and importing/exporting Excel files with smart parsing.


🌐 Live Demo: https://flowforgeisp.vercel.app/


GitHub Stars Β  GitHub Forks Β  GitHub Issues


πŸ“‹ Table of Contents


πŸ” Overview

FlowForge β€” ISP Town Manager is a production-ready, offline-first web application built specifically for Internet Service Providers (ISPs) who still manage their subscriber base through paper records, physical ledgers, or disconnected spreadsheets. It provides a unified digital platform to organise subscribers by geographic Area and Town, run monthly billing cycles, accept payments with a psychologically-designed LIFO clearing system, and generate Excel reports β€” all without needing a backend server.

The application runs entirely in the browser using localStorage as its persistence layer. This makes it instantly deployable on any static host with zero infrastructure cost, while keeping all subscriber data private on the operator's device.

πŸ’‘ Real-world context: This application was built for Pakistani ISP operators who typically use informal record-keeping systems. The 4-area structure (A, B, C, D), CNIC fields, Easypaisa/JazzCash payment methods, and Mbps-based package tracking reflect actual field operator workflows. The LIFO billing logic was specifically designed around the "common man" psychological preference for clearing the current month's bill before tackling old debt.


🌐 Live Demo

Environment URL
Production (Vercel) net-dev-jade.vercel.app
Repository github.com/ibtesaamaslam/FlowForge

🧰 Tech Stack

Technology Version Purpose
React 19 UI framework β€” Hooks, Context API, useReducer
TypeScript 5.x (99%) End-to-end static typing across all components and services
Vite Latest Build tool and dev server
Tailwind CSS Latest Utility-first responsive styling
Lucide React Latest SVG icon set
SheetJS (xlsx) Latest Excel .xlsx import parsing and export generation
localStorage Browser API Data persistence β€” no backend or database required
ES Modules via importmap β€” index.html-based module resolution, no complex bundler needed
Vercel β€” Production static hosting and CI/CD

✨ Key Features

πŸ™οΈ Area & Town Management

  • 4 color-coded areas (A, B, C, D) β€” each area groups its own towns and tracks outstanding balances, active subscriber counts, and revenue independently.
  • Full Town CRUD β€” create, edit, and delete towns within specific areas with confirmation prompts before destructive actions.
  • Stats at a glance β€” every town card shows active subscriber count, total outstanding balance, and monthly revenue in real time.

πŸ‘₯ Subscriber Management

  • Detailed profiles β€” Name, Phone number, CNIC, Package speed (Mbps), Physical address, and free-text Notes per subscriber.
  • Status tracking β€” Active, Suspended, and Disconnected states with colour-coded visual badges.
  • Real-time search & filter β€” filter the subscriber list by name, phone number, subscriber ID, or status on every keystroke.
  • Pagination β€” optimised tables handle large subscriber lists without UI performance degradation.

πŸ’° LIFO Billing & Ledger System

  • Previous Pending vs Current Bill split β€” dues are displayed as two distinct cards: old accumulated debt (Previous Pending) and the current month's charge (Current Bill).
  • LIFO payment application β€” payments clear the Current Month's Bill first, then reduce Previous Pending. See LIFO Billing Logic for a full walkthrough.
  • Full transaction ledger β€” complete Debit/Credit history per subscriber in MemberLedger.tsx.
  • Bulk monthly billing β€” generate bills for all Active subscribers in an entire area with one click via BillingModal.tsx.
  • Payment receipt modals β€” visual confirmation showing balance before and after every recorded payment.

πŸ“Š Executive Dashboard

  • Revenue tracking across all areas.
  • Daily subscriber and payment metrics.
  • Active subscriber utilization per area.
  • Low-stock and equipment inventory alerts.
  • Activity log of recent actions.

πŸ“₯ Excel Import Wizard

  • Drag-and-drop .xlsx file upload with smart heuristic parsing.
  • Auto-detects town header rows and member data rows.
  • Preview parsed data before committing β€” cancel or confirm.
  • Bulk creates towns and subscriber profiles in a single operation.

πŸ“€ Excel / CSV Export

  • Download full subscriber lists and financial ledger data for any town.
  • Formatted output ready for external accounting or management reporting.

πŸ’‘ LIFO Billing Logic β€” Explained

The payment system uses Last-In, First-Out (LIFO) logic β€” the most recently generated bill is cleared before older debt is reduced.

Why LIFO?

Psychologically, subscribers feel they have "cleared this month" even with existing old debt. This reduces immediate billing disputes and makes the payment interaction feel productive β€” the current obligation is resolved first, even if the longer-term backlog remains visible.

Example Walkthrough

Initial State:
  Previous Pending  β†’ PKR 1,200  (accumulated old debt)
  Current Bill      β†’ PKR 500    (February bill just generated)
  Total Owed        β†’ PKR 1,700

Subscriber pays PKR 500:
  LIFO applies 500 to Current Bill first
  β†’ February Bill:    βœ… PAID (cleared)
  β†’ Previous Pending: PKR 1,200 (unchanged β€” visible, follow-up required)
  β†’ Total Owed:       PKR 1,200

Dashboard reflects:
  Outstanding: PKR 1,200
  Feb billing: Completed

What Happens in the Ledger

Entry Type Amount Description
Monthly billing run Debit +500 BILL OF FEB
Payment received Credit -500 Payment Received
Running balance β€” 1,200 Previous Pending unchanged

πŸ” Role-Based Access Control

Feature Admin Operator
Executive Dashboard βœ… ❌
Create / edit / delete Towns βœ… βœ…
Add / edit / delete Subscribers βœ… βœ…
Record payments βœ… βœ…
Run bulk monthly billing βœ… ❌
View full subscriber ledger βœ… βœ…
Excel import wizard βœ… βœ…
Excel / CSV export βœ… βœ…
View inventory / alerts βœ… ❌

πŸ— System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     BROWSER (Client)                        β”‚
β”‚                                                             β”‚
β”‚   React 19 + TypeScript + Vite                             β”‚
β”‚                                                             β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚ App.tsx β€” Main Routing & Layout                      β”‚  β”‚
β”‚   β”‚                                                      β”‚  β”‚
β”‚   β”‚  DashboardView  β”‚  TownView  β”‚  MemberLedger         β”‚  β”‚
β”‚   β”‚  ImportWizard   β”‚  BillingModal                      β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                              β”‚                              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚              services/                               β”‚  β”‚
β”‚   β”‚  storageService.ts  ←→  localStorage                 β”‚  β”‚
β”‚   β”‚  excelParser.ts     ←   .xlsx (SheetJS)              β”‚  β”‚
β”‚   β”‚  csvService.ts      β†’   .xlsx / .csv (SheetJS)       β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Architecture decisions:

  • No React Router β€” navigation between views (Dashboard, Town, Ledger) uses a simple state variable in App.tsx keeping the bundle small.
  • Service layer abstraction β€” all localStorage CRUD is in storageService.ts; components never touch localStorage directly. This makes a future database migration a service-layer swap.
  • ES Modules importmap β€” index.html uses a browser-native importmap for module resolution, eliminating the need for a bundler during basic development.
  • SheetJS for all Excel I/O β€” both import parsing and export generation use the same library, ensuring format consistency.

πŸ“‚ Project Structure

FlowForge/
β”‚
β”œβ”€β”€ index.html                    # Entry point β€” importmap + Tailwind CDN
β”œβ”€β”€ index.tsx                     # React DOM root mount
β”œβ”€β”€ App.tsx                       # Main routing and layout logic
β”œβ”€β”€ types.ts                      # TypeScript interfaces β€” Member, Town, LedgerEntry
β”œβ”€β”€ metadata.json                 # App metadata (Google AI Studio template config)
β”œβ”€β”€ package.json                  # Dependencies and npm scripts
β”œβ”€β”€ tsconfig.json                 # TypeScript compiler configuration
β”œβ”€β”€ vite.config.ts                # Vite build configuration
β”‚
β”œβ”€β”€ components/                   # All UI page components
β”‚   β”œβ”€β”€ DashboardView.tsx         # Executive summary, charts, alerts
β”‚   β”œβ”€β”€ TownView.tsx              # Subscriber list, CRUD, search, status
β”‚   β”œβ”€β”€ MemberLedger.tsx          # Full debit/credit history + payment modal
β”‚   β”œβ”€β”€ ImportWizard.tsx          # Drag-and-drop .xlsx upload + preview
β”‚   β”œβ”€β”€ BillingModal.tsx          # Bulk monthly billing interface
β”‚   └── (additional components)
β”‚
└── services/                     # Business logic and data access
    β”œβ”€β”€ storageService.ts         # All localStorage read/write CRUD operations
    β”œβ”€β”€ excelParser.ts            # Heuristic-based Excel row classification
    └── csvService.ts             # Excel and CSV export generation

πŸ”· TypeScript Interfaces

All core data shapes are defined in types.ts and used across every component and service:

// User role
type Role = 'admin' | 'operator';

// Area identifier
type AreaId = 'A' | 'B' | 'C' | 'D';

// Full subscriber profile
interface Member {
  id: string;
  name: string;
  phone: string;
  cnic: string;
  packageMbps: number;
  address: string;
  notes?: string;
  status: 'active' | 'suspended' | 'disconnected';
  totalDue: number;       // running total ever owed
  balance: number;        // current unpaid balance
}

// Town within an area
interface Town {
  id: string;
  areaId: AreaId;
  name: string;
  members: Member[];
}

// Single ledger transaction
interface LedgerEntry {
  id: string;
  memberId: string;
  type: 'debit' | 'credit';
  amount: number;
  description: string;    // e.g. "BILL OF FEB" | "Payment Received" | "Clear Full Dues"
  date: string;           // ISO date string
  previousBalance: number;
  newBalance: number;
}

πŸš€ Getting Started

Prerequisites

  • A modern web browser (Chrome 80+, Edge 80+, Firefox 75+)
  • A local static server (Python, Node, or VS Code Live Server)

Installation & Run

# 1. Clone the repository
git clone https://github.com/ibtesaamaslam/FlowForge.git
cd FlowForge

# 2. Install dependencies (for Vite-based development)
npm install

# 3. Start development server
npm run dev
# β†’ http://localhost:5173

# OR serve directly without bundler (ES Modules via importmap)

# Python
python3 -m http.server 8000

# Node
npx http-server .

# β†’ http://localhost:8000

Production Build

npm run build
# Output β†’ dist/
# Deploy to Vercel, Netlify, GitHub Pages, or any static host

πŸ“– Usage Guide

Adding Your First Town

  1. Open the app and select your role (Admin or Operator).
  2. Navigate to Area A (or any area) from the sidebar.
  3. Click "Add Town" and enter the town name.
  4. The town card appears showing 0 subscribers and PKR 0 outstanding.

Adding Subscribers Manually

  1. Click a town to open TownView.
  2. Click "Add Subscriber".
  3. Fill in: Name, Phone, CNIC, Package (Mbps), Address, and optional Notes.
  4. Set status to Active.
  5. Save β€” the subscriber appears in the paginated list.

Recording a Payment

  1. In TownView, click the Credit Card icon next to a subscriber.
  2. MemberLedger opens showing full transaction history.
  3. The top section displays:
    • Previous Pending β€” accumulated old debt
    • Current Bill β€” this month's generated bill
  4. Click "Receive Payment" and enter the amount, or "Clear Full Dues" to zero out the balance.
  5. A receipt modal confirms the transaction with before/after balances.

Running Monthly Billing

  1. From the Dashboard, click an Area tile.
  2. Click "Run Billing" (or use BillingModal).
  3. Confirm the month and amount.
  4. The system generates a BILL OF [MONTH] debit entry for every Active subscriber in that area.

Resetting All Data

⚠️ This permanently deletes all towns, subscribers, and ledger entries.

  1. Open browser DevTools (F12).
  2. Navigate to Application β†’ Local Storage β†’ your domain.
  3. Right-click β†’ Clear.
  4. Refresh the page.

πŸ“₯ Excel Import Format

The ImportWizard uses heuristic parsing to auto-detect town headers and member rows.

Required Structure

Col A Col B Col C Col D
01. My Town Name
1 John Doe 03001234567 5 Mb 500
2 Jane Smith 10 Mb 1000
02. Another Town
1 Ahmad Khan 20 Mb 2000

Parsing Rules

Element Rule
Town header Col A starts with a number followed by a dot: 01., 02., etc.
Member serial Col A is an integer
Name + phone Col B contains the subscriber's name; phone number in same cell is extracted automatically
Package Col C β€” e.g. 5 Mb, 10 Mb, 20 Mb
Bill amount Col D β€” numeric bill amount (PKR)

Import Steps

  1. Go to Import Excel in the sidebar.
  2. Drag-and-drop or click to upload your .xlsx file.
  3. Preview the parsed towns and members.
  4. Click Confirm to create all records, or Cancel to discard.

πŸ“€ Data Export

From any TownView:

  1. Click the Export button in the toolbar.
  2. Choose .xlsx or .csv format.
  3. The file downloads immediately via csvService.ts + SheetJS.

Exported columns: Subscriber ID Β· Name Β· Phone Β· CNIC Β· Package Β· Status Β· Balance Β· Total Due Β· Last Payment Date


🚒 Deployment

Vercel (Live β€” Recommended)

The project is live at https://flowforgeisp.vercel.app/ via Vercel's GitHub integration:

  1. Push to the main branch.
  2. Vercel runs npm run build automatically.
  3. The dist/ output is deployed globally.

Other Static Hosts

npm run build

# Netlify
netlify deploy --prod --dir=dist

# GitHub Pages
# Push dist/ to gh-pages branch

# Cloudflare Pages
# Set build command: npm run build Β· output: dist

⚠️ Limitations & Roadmap

Current Limitations

Limitation Impact
localStorage only Data is device-specific; clearing browser storage deletes all records
No real-time sync Two operators on different devices see different data
No authentication Role selection is not password-protected in this release
No payment gateway Payment recording is manual β€” no Easypaisa / JazzCash API
No SMS notifications Subscriber reminder preference is stored but no message is sent
Single-device use No cloud backup; device loss = data loss

Roadmap

  • Real backend β€” Node.js / Firebase / Supabase to replace localStorage for cross-device sync
  • JWT authentication β€” password-protected Admin and Operator sessions
  • SMS payment reminders β€” auto-notify subscribers before billing due date via local SMS gateway
  • Easypaisa / JazzCash integration β€” online bill collection via mobile wallet APIs
  • PWA / mobile-first β€” Progressive Web App for field operators collecting payments on-site
  • AI demand prediction β€” predict churn and bandwidth demand from subscriber history
  • Multi-branch support β€” manage multiple ISP offices under a single account
  • Automated monthly billing β€” scheduled bill generation instead of manual trigger

🀝 Contributing

# 1. Fork the repository

# 2. Clone your fork
git clone https://github.com/YOUR-USERNAME/FlowForge.git
cd FlowForge

# 3. Install dependencies
npm install

# 4. Create a feature branch
git checkout -b feature/supabase-backend

# 5. Make changes and commit
git add .
git commit -m "feat: replace localStorage with Supabase SDK in storageService.ts"

# 6. Push and open a Pull Request
git push origin feature/supabase-backend

Good first contributions: Supabase backend integration, JWT authentication, dark mode toggle, additional Excel export columns, or SMS gateway connection.


πŸ‘€ Author

Ibtesaam Aslam

GitHub

Full-Stack Developer Β· ISP Tools Β· Offline-First Apps


πŸ“œ License

MIT License

Copyright (c) 2024 Ibtesaam Aslam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Permission Status
βœ… Commercial use Allowed
βœ… Modification Allowed
βœ… Distribution Allowed
βœ… Private use Allowed
❌ Liability No warranty provided
❌ Trademark use Not granted

πŸ™ Acknowledgements

  • SheetJS β€” for the robust, battle-tested Excel parsing and generation library that powers both the Import Wizard and all export functionality.
  • Lucide React β€” for the clean, consistent SVG icon set used throughout the interface.
  • Tailwind CSS β€” for the utility-first CSS framework enabling rapid, responsive UI development.
  • React 19 Team β€” for Concurrent Features and improved hook performance that make the real-time filtering and pagination smooth even on large datasets.
  • Vercel β€” for zero-configuration static hosting with automatic GitHub deployments.

⭐ If FlowForge helped streamline your ISP operations, please consider starring it on GitHub!

Star on GitHub

🌐 https://flowforgeisp.vercel.app/

Replacing paper records with smart ISP management β€” Built with ❀️ by Ibtesaam Aslam

About

πŸ“‘ Offline-first ISP management platform β€” hierarchical area/town structure, subscriber profiles, LIFO billing logic, Excel import/export, bulk billing & full financial ledger. Built with React 19, TypeScript & SheetJS. No backend required.

Topics

Resources

Stars

Watchers

Forks

Contributors