← All projectsProject 07 / 08
Client · SaaS

Multi-tenant utility billing platform

BillBot is a multi-tenant SaaS platform that automates billing for small and medium electricity retailers — work that used to live in spreadsheets.

Role
Technical Lead & full-stack developer
Type
Client project · team of 8
Timeline
8 months
Stack
React · Node.js · Lambda · DynamoDB

The problem

Small and medium electricity retailers were running billing on Excel spreadsheets and manual processes, which held them back in several ways:

The platform

A secure, scalable platform that serves multiple retailers, each with fully isolated data and its own billing workflows.

Automated billing engine

Multiple billing plans and customer preferences, flexible cycles (monthly, fortnightly or custom), time-of-use and tiered rate calculations, and automated invoice generation and delivery.

Customer management

Customer lifecycle management, a self-service portal, payment processing and automated customer communication.

Reconciliation and reporting

Automated reconciliation against smart meter data, revenue reporting, audit trails and regulatory compliance reports.

Smart meter integration

Real-time ingestion from multiple meter providers, with validation and cleansing pipelines and usage pattern reporting.

Voice assistant

An Amazon Alexa integration gives management business metrics and dashboard updates by voice.

Architecture

Frontend
├── React single-page app
└── S3 + CloudFront + WAF

API & security
├── API Gateway with a tenant-aware custom authorizer
├── Cognito for identity and access
└── Certificate Manager for TLS

Business logic
├── Lambda
├── Event-driven processing with SQS / SNS
└── Multi-tenant routing and authorization

Data
├── DynamoDB — separate tables per tenant, isolated by IAM
├── S3 — documents and archives
└── S3 Glacier — long-term compliance archive (3+ years)

Tenant isolation

Each tenant has its own DynamoDB tables and S3 buckets, reached through tenant-specific IAM roles. A custom API Gateway authorizer decodes the access token and routes each request to the right tenant.

Security and compliance

Data is encrypted in transit and at rest, credentials live in Secrets Manager, and CloudWatch and X-Ray provide the audit logging. Data is retained for three years to meet regulatory requirements.

Delivery

CodeBuild and CodePipeline handle continuous deployment with infrastructure-as-code and blue-green releases; Cypress covers end-to-end testing.

Challenges

High-volume processing

Peak billing periods process thousands of customers at once, which ran into Lambda concurrency limits and throttling. The fix was an asynchronous design: SQS queues to spread the workload, batch processing, circuit breakers around external systems, and dead letter queues for retries.

Complex billing logic

Retailers have different plans, cycles and customer preferences. A rule-based billing engine handles plan configuration, time-of-use and tiered rates, and per-customer billing cycles — all configurable per tenant without code changes.

Smart meter data

Meter providers deliver data in different formats and by different mechanisms. An adapter per provider feeds a standard ingestion pipeline with validation, transformation, data quality monitoring and automated reconciliation against billing data.

What I learned

Outcomes

80%+less administrative overhead through billing automation
90%faster billing cycle completion than the manual process
99.9%uptime for billing operations
Next project →Trailer rental management system