Inside QRIMS: Building an Enterprise QR-Based Multi-Tenant Asset Tracking System
A deep dive into the engineering, real-time synchronization, mobile scanning architecture, and multi-tenant security model behind the open-source QRIMS platform.
Asset tracking and inventory control frequently face a painful dichotomy: either pay exorbitant enterprise licensing fees for rigid, opaque legacy suites, or cobble together fragile spreadsheets that break under concurrent edits.
QRIMS (QR-based Inventory Management System) was engineered as an open-source, production-grade alternative built specifically for multi-tenant organizations requiring instantaneous field scanning, offline tolerance, and strict tenant isolation.
The Problem QRIMS Solves
In physical warehouses, healthcare facilities, and IT asset depots, connectivity is notoriously unreliable. Barcode scanner hardware is often expensive and difficult to maintain. QRIMS addresses this by transforming any camera-enabled smartphone into a high-speed scanner while maintaining a real-time event pipeline with the cloud backend.
Architectural Blueprint
QRIMS is structured as a decoupled multi-tier system:
1. Flutter High-Speed Mobile Scanner
- Hardware-Accelerated Scanning: Employs camera feeds with debounced visual feedback for sub-second barcode and QR acquisition.
- Offline-First Resilience: Transactions queue locally in an encrypted SQLite store and reconcile automatically via exponential backoff upon network restoration.
- Biometric Field Authentication: Secure local token caching paired with hardware biometric unlock.
2. NestJS Reactive Backend
- Strict Multi-Tenancy: Data segregation enforced at the schema and query layer via tenant identity claims embedded in verified JWTs.
- Immutable Mutation Audit Ledger: Every check-in, check-out, and status mutation produces an append-only audit record.
- PostgreSQL Connection Pooling: Optimized connection routing with query isolation per tenant.
3. Next.js 14 Web Command Console
- Real-Time Fleet Telemetry: Server-side rendered analytics and fleet overview powered by Server-Sent Events (SSE).
- Role-Based Access Control: Granular permissions distinguishing warehouse managers, field operators, and tenant auditors.
- Vector QR Generation: Instant dynamic label generation in batch SVG/PDF formats ready for thermal printing.
Open Source Repository & Production CI
QRIMS is fully open source under the MIT License, equipped with automated Docker builds and GitHub Actions quality gates:
- Repository: github.com/samuelj90/qrims
- License: MIT
- CI/CD: Deterministic quality gate workflows enforcing lint, security audit, and container builds.
