How pcharan30/cablesync works
CableSync supports operator-managed cable billing and a separate authenticated subscriber experience through one API backed by MongoDB. Operators manage customer records and collections, review reports and payment proofs, and handle support tickets; subscribers verify their phone and CAF identity, then view billing and payments, submit payment proofs, or raise support requests. The operator portal also queues selected work offline for later synchronization. Major capabilities are reflected from the README and tree; unsampled routes and controllers are represented at their existing directories, with only documented or evidenced connections shown.
Main entry points: customerPortalController.js Subscriber services · server.js API server · controllers Operator features · App.jsx Operator app
Components 24
Operator portal
- Operator app
operator-portal/src/App.jsx - API client
operator-portal/src/services/api.js - Offline outbox
operator-portal/src/services/offlineStore.js - Sync engine
operator-portal/src/services/syncEngine.js
Subscriber portal
- Subscriber app
subscriber-portal/src/App.jsx - API client
subscriber-portal/src/services/api.js
Backend API
- API server
backend/server.js - Customer routes
backend/routes/customerRoutes.js - Subscriber routes
backend/routes/customerPortalRoutes.js - Payment routes
backend/routes/paymentRoutes.js - Operator features
backend/controllers - Subscriber services
backend/controllers/customerPortalController.js - Payment proofs
backend/controllers/paymentProofController.js - Customer identity
backend/middleware/resolvePublicCustomer.js - Billing logic
backend/services/billingService.js - Token signing
backend/utils/jwt.js
Persistence
- Database connection
backend/config/db.js - Customer records
backend/models/Customer.js - Payment records
backend/models/Payment.js - Support tickets
backend/models/Ticket.js - Proof records
backend/models/PaymentProof.js
Other components
- Operator
- Subscriber
- MongoDB Atlas
Connections 29
- Operator → Operator app: uses
- Operator app → API client: requests
- Operator app → Offline outbox: queues offline
- Operator app → Sync engine: starts sync
- Sync engine → Offline outbox: reads and updates
- Sync engine → API client: dispatches requests
- Subscriber → Subscriber app: uses
- Subscriber app → API client: requests
- API client → API server: calls API
- API client → API server: calls API
- API server → Customer routes: mounts
- API server → Subscriber routes: mounts
- API server → Payment routes: mounts
- API server → Operator features: mounts feature routes
- Customer routes → Operator features: dispatches
- Payment routes → Operator features: dispatches
- Subscriber routes → Customer identity: resolves subscriber
- Subscriber routes → Subscriber services: dispatches
- Subscriber routes → Payment proofs: dispatches
- Subscriber services → Token signing: issues token
- Subscriber services → Billing logic: computes charges
- Operator features → Billing logic: computes charges
- Operator features → Customer records: reads and writes
- Operator features → Payment records: reads and writes
- Subscriber services → Customer records: reads and writes
- Subscriber services → Payment records: reads and writes
- Subscriber services → Support tickets: reads and writes
- Payment proofs → Proof records: reads and writes
- Database connection → MongoDB Atlas: connects