











Comply DQ
Ontario, CanadaUnited States
Multi-tenant compliance SaaS for North American carriers that centralizes driver documentation, licenses, medical certificates and insurance policies, with audit traceability, enterprise authentication, Stripe subscriptions and production data migrations.
IncludesDocument verificationStripe subscriptionsEnterprise login






Overview
The challenge
Links
Private — client project
System architecture
Comply DQ enforces multi-tenancy at the data layer. Every query is scoped to a tenant and every API route validates that scope server-side, maintaining strict separation between customer organizations.
Application Architecture
- Next.js App Router frontend with Redux Toolkit managing operational client state.
- NestJS backend with Prisma over PostgreSQL, typed end to end.
- Multi-tenant model with tenant resolution and company-type hierarchies covering direct and managed-service structures.
- Role-based access separating platform-level oversight from customer-organization administrators and operators.
Platform Features
- Driver onboarding and verification workflows for CDL, medical certificates, and policy documentation.
- Document library with upload handling, deduplication, and S3-backed storage.
- Expiry tracking and renewal workflows supporting regulatory compliance requirements.
- Operator dashboards optimized for desktop compliance review and tablet use in the field.
Authentication
Identity management follows enterprise standards to meet the requirements of B2B procurement and IT review.
- Keycloak (OIDC)
- JWT access/refresh
- Session hardening
- Tenant-aware API guards
- RBAC
Infrastructure & deployment
The platform replaced spreadsheets and legacy systems carriers had operated for years, making data migration a primary delivery requirement alongside the application itself.
Data Migration
- CSV-driven pipelines transferring production customer records from legacy systems.
- Validation passes preceding load, surfacing malformed records for reconciliation.
- Operational scripts supporting repeatable cutovers with dry-run capability against staging.
Database
- PostgreSQL with Prisma providing schema-safe access across a large operational surface.
- Migrations tracked in version control to keep schema evolution reviewable.
- Tenant scoping enforced in the data layer, maintaining isolation and audit traceability.
Operations
- Structured logging across API layers supporting reproducible diagnostics against production data.
- Tenant-aware API guards enforced server-side on all routes.
- Deployment configuration maintaining parity between staging and production environments.
- AWS S3
- Keycloak
- Structured logging
- Staging parity
Built with
Subscription billing operates at the organization level, where plan changes occur mid-cycle and entitlement must remain synchronized with billing state across the platform.
Billing Architecture
Stripe serves as the authoritative source for subscription state, with platform entitlement derived from it.
- Stripe subscriptions scoped per tenant, aligning billing boundaries with data boundaries.
- Webhook-driven lifecycle handling across creation, updates, successful payments, failed payments, and cancellation.
- Plan state enforced at the API guard level, applying entitlement changes server-side.
Operator Experience
- Invoice and subscription status surfaced within the compliance workspace.
- Failed-payment states presented explicitly to support timely resolution.
Validation & Testing
- Automated coverage focused on document lifecycle transitions, expiry calculations, and tenant isolation guards.
- Explicit testing of cross-tenant access boundaries.
- TypeScript with Prisma-generated types, surfacing schema changes at compile time across API and client.
Delivered as part of a senior engineering team serving motor carriers across North America, on a platform operating under active regulatory requirements.
Delivered
- Driver onboarding and document verification workflows in production use.
- Multi-tenant administrative surface for carriers, including platform-level oversight tooling.
- Stripe-backed subscription billing integrated with feature entitlement.
- Legacy data migrations executed against production customer records.
Engagement Model
- Collaborative development alongside a Canadian engineering team, combining transportation-compliance domain expertise with implementation.
- Code review and staged releases across staging and production environments.