How We Built a White-Label SaaS Platform
A case study on building a modular CRM + inventory platform with offline-first PWA architecture.
Building a website is one thing. Building a platform that manages contacts, inventory, agents, and operations — and can be resold under different brands — is another level entirely. Here’s how we approached it.
The Challenge
A client needed a unified system to handle:
- Contact management — thousands of entries with segmentation
- Inventory tracking — products, parts, stock levels across warehouses
- Agent/recruiter management — field teams with territory assignments
- Communication — WhatsApp integration for bulk messaging
- Administration — audit logs, role-based permissions, SMTP configuration
And critically: it needed to work offline in areas with unreliable connectivity.
Architecture Decisions
Why a PWA?
Progressive Web Apps gave us the best of both worlds:
| Feature | Native App | PWA |
|---|---|---|
| Offline support | Yes | Yes (Service Worker) |
| Push notifications | Yes | Yes |
| App store required | Yes | No |
| Update distribution | Store review | Instant |
| Development cost | 2x (iOS + Android) | 1x |
| QR code scanning | Yes | Yes (Camera API) |
For a platform targeting field agents who might be in areas with spotty internet, offline-first wasn’t optional — it was the core requirement.
Service Worker Strategy
We implemented a cache-first strategy for static assets and a network-first with offline fallback strategy for API data:
Static assets → Cache first, update in background
API responses → Network first, serve cached if offline
Form submissions → Queue offline, sync when connected
This means agents can scan QR codes, update inventory, and log contacts even without internet. Everything syncs when connectivity returns.
Modular Design for White-Labeling
The platform was designed from day one to be reskinnable:
- Theme system — Colors, logos, and typography configurable per tenant
- Feature flags — Enable/disable modules per deployment
- Multi-tenant data — Isolated data with shared infrastructure
- Custom domains — Each deployment gets its own URL
This makes it possible to deploy the same codebase for completely different businesses — from logistics companies to real estate agencies.
Key Technical Challenges
1. Offline Conflict Resolution
When two agents edit the same contact offline, what happens when both sync?
We implemented a last-write-wins with audit trail approach. Every change is timestamped and logged, and the admin dashboard shows conflicts that may need manual review.
2. QR Code Scanning in a Browser
Using the device camera for QR scanning in a PWA required careful handling:
- Camera permissions management
- Handling multiple camera devices (front/back)
- Efficient barcode parsing without native libraries
- Fallback for devices without camera support
3. Bulk WhatsApp Messaging
Integrating WhatsApp for group communication meant building:
- Contact group management
- Message template system
- Rate limiting to comply with WhatsApp policies
- Delivery status tracking
4. Role-Based Access Control
With multiple user types (admin, agent, recruiter, viewer), we built a permission system that controls:
- Which modules each role can access
- Read vs. write permissions per section
- Data visibility scoping (agents see only their territory)
- Audit logging for all permission-sensitive actions
Results
The platform now handles:
- Tens of thousands of contacts with instant search
- Hundreds of products with stock tracking
- Multiple agent teams across territories
- Complete audit trails for compliance
Lessons Learned
- Offline-first is hard but worth it. Plan your data model around eventual consistency from day one.
- White-labeling needs early planning. Retrofitting multi-tenancy is painful. Bake it in from the start.
- Field testing is non-negotiable. Lab conditions never match real-world connectivity.
- Audit everything. When multiple users modify data offline, you need a clear history.
Is This Approach Right for You?
If your business needs:
- A custom platform that goes beyond what off-the-shelf SaaS offers
- Offline capability for field teams
- The ability to rebrand and resell the solution
- Full control over your data and infrastructure
Then a custom-built platform might be the right investment.
Contact us to discuss whether a custom platform makes sense for your use case, or view our portfolio to see more of our work.