← All work01 · Platform · Access control

Leecycle

One platform, many businesses — with access rules that hold across all of them.

Type
Multi-tenant ERP platform
Context
Professional work
Stack
Node.js · Express · TypeScript · PostgreSQL

01The problem

Businesses in different industries need CRM, fleet, learning, billing and governance in one system, while every tenant, branch, team and field stays behind access rules that can be audited.

02The solution

A modular ERP built on shared foundations — tenant registry, organisation profile and hierarchy, roles, an ABAC policy engine, data scopes with row-level security, field-level security and audit logs — with each business module built on top rather than beside them.

03Architecture

  • pnpm + Turbo monorepo: a Node/Express API and multiple Next.js "zone" apps behind one shell
  • PostgreSQL as the source of truth; row-level data scopes and field-level security
  • ACM: permissions compiled per subject (role, team, department, service account…) instead of per user × resource
  • Tiered permission resolution ending in default deny; pattern-based policies like module.finance.*
  • Audit & access logs, approval matrix, document numbering, currencies & FX as platform services

04Hard parts

  • Per-user × per-resource permission rows grow multiplicatively; the access model had to compile permissions per subject to stay small and fast.
  • Keeping the core industry-agnostic while CRM, fleet and LMS each pull it toward their own shape.

05My contribution

what you personally designed, built or owned on Leecycle

06Where it stands

outcomes you can state — adoption, modules shipped, performance you measured

07Built with

Node.jsExpressTypeScriptPostgreSQLNext.jsReactZodVitestTurbo
Next project · 02

RoadPulse →

Ambulance alerts for the drivers actually in its way — not everyone nearby.