Flagship · Multi-Tenant SaaS ERP

ERPX — one platform
for an entire business.

ERPX is a multi-tenant enterprise resource planning SaaS platform that unifies accounting & finance, sales and orders, procurement, inventory, CRM, HR and payroll, reporting and analytics, and AI-powered operations in one system - with each organization running in its own isolated workspace.

React 19TanStackNestJSPostgreSQLPrismaRedisTypeScriptDockerAI Copilot
ERPX sign-in screen

The live ERPX sign-in - the public entry point to the product.

Product screenshot
About the project

A serious system, not a UI demo

ERPX was built to prove a product-sized architecture: real business domains, real data flows, real security. It is a working multi-tenant ERP where core business operations are modeled, connected and reported on end to end.

Multi-tenant by design

Every organization operates independently inside the same SaaS instance. A global tenant-isolation layer scopes every query, so org A can never read org B's books.

Connected business flows

Quotations become sales orders, sales orders become invoices, invoices reconcile against payments, and every transaction posts to a double-entry ledger that feeds the reports.

Product-grade surface

76 application screens, a generic data engine, role-based menus, an org admin panel and a full super-admin platform console - all talking to a real REST API.

What it can do

Modules that run a real business

These are implemented modules - each with live screens, API endpoints and data models. Every claim here reflects working code.

Accounting & Finance

  • Chart of accounts, account groups & cost centres
  • Double-entry vouchers - journal, payment, receipt, contra, credit/debit notes, opening
  • Fiscal years & periods with open / close / lock
  • Ledgers, statutory books, receivables & payables ageing
  • Trial balance, Profit & Loss, Balance Sheet, cash flow

Sales & Orders

  • Customers, quotations with accept / reject / duplicate
  • Sales orders generated straight from a quotation
  • Sales invoices generated from an order
  • Payments - manual or gateway - allocated across invoices

Procurement

  • Vendors, purchase orders with an approve / receive flow
  • Goods receipts against purchase orders
  • Vendor bills with approval that posts to the ledger

Inventory & Stock

  • Products, categories, units & warehouses
  • Stock levels, stock ledger & adjustments (reserve / release)
  • Inter-warehouse stock transfers
  • Low-stock alerts

CRM

  • Leads, companies & contacts with notes and timelines
  • Pipelines, stages & deals (opportunities)
  • Move-stage, mark won / lost, change owner
  • Activities & tasks with due dates and priorities

HR & Payroll

  • Departments, designations, employees, teams
  • Attendance check-in / check-out & leave approvals
  • Salary structures - basic, HRA, conveyance, PF, ESI, professional tax
  • Payroll runs with a process / mark-paid lifecycle

Reports & Analytics

  • Executive, sales, inventory, procurement, accounting & HR dashboards
  • Financial reports and GST reports (GSTR-1 / 2A / 3B / 9)
  • CSV & Excel export from the report engine

AI Copilot

  • In-app AI assistant and KPI insights on the dashboard
  • Multi-provider gateway - OpenAI, Gemini, Claude, Ollama, Azure OpenAI, AWS Bedrock
  • Domain agents, RAG knowledge, embeddings & semantic cache

Platform & Tenancy

  • Multi-tenant organizations with isolated workspaces
  • Org switching, org settings (currency, timezone)
  • Plans, features, entitlements & usage counters
  • Razorpay & Stripe checkout with verified webhooks

Security & Access

  • Roles, permissions & field-level access control
  • Record scopes and tenant-scoped data isolation
  • MFA (TOTP) with backup codes, active sessions, API keys
  • Email OTP for verification, password reset & invites

Automation

  • Event-driven workflow definitions
  • Actions - webhook, notification, audit
  • Execution logs & manual event emit
  • Compliance tooling for policies, retention & privacy

Admin Console

  • Organization admin - users, roles, teams, billing, audit log
  • Super-admin platform console
  • Platform dashboard, organizations, subscriptions, coupons
  • System health & API usage monitoring
A typical business flow

From first touch to financial report

One connected journey across the modules - the same records move through the system, never re-entered.

LeadCaptured in CRM
CustomerQualified & created
QuotationSent & accepted
Sales OrderGenerated from quote
InventoryStock reserved & shipped
InvoiceBilled from order
PaymentGateway or manual, allocated
ReportsHit the ledger & reports

In code that means: a quotation accepted in the CRM flow generates a sales order, an order releases stock and becomes an invoice, payments are allocated to the invoice, the money lands in the ledger, and the whole chain surfaces in receivables, cash flow and the balance sheet.

Architecture

How the system is built

A clean, layered SaaS architecture - the frontend never touches the database, and tenancy + permissions are enforced at the API boundary.

Frontend
React 19 + TanStack Router76 screens · RBAC menus · route guards
REST API
NestJS · /api/v1
JWT + refresh RBAC permissions Tenant isolation Rate limiting
Business modules
AccountingSalesProcurementInventoryCRMHR & PayrollBankingReportsWorkflowsSubscriptionsAI / AgentsAdmin & RBAC
Data & infrastructure
Prisma ORM → PostgreSQL

140 data models across every module, all organization-scoped.

Redis · Payments · Email

Redis for caching & rate limits, Razorpay/Stripe for billing, SMTP for OTP email.

Tech stack

Built with production tooling

Frontend

React 19
UI runtime
TanStack Router + Start
Typed, file-based routing
TanStack Query
Server state & caching
Tailwind CSS v4 + shadcn/ui
Design system on Radix primitives
recharts · framer-motion · zod
Charts, motion, validation

Backend

NestJS 10 (Node.js)
Modular REST API
PostgreSQL + Prisma ORM
140 data models
Redis (ioredis)
Caching, rate limiting, AI cache
Passport-JWT · argon2
Auth & password hashing
nodemailer
Transactional OTP email

Platform

Razorpay + Stripe
Checkout & webhooks
BullMQ / internal queues
Jobs for AI agent & RAG work
Docker
Multi-stage builds
Render
Production deployment
Pino + OpenTelemetry · Swagger
Logs, traces, API docs
What I built

The engineering behind ERPX

No marketing gloss - this is the work that actually exists in the codebase.

01

Generic data engine

One schema-driven CRUD engine powers accounting, sales, purchases, inventory, CRM and HRMS screens - search, sort, pagination, bulk actions, typed create/edit forms and RBAC-gated actions without per-module duplication.

02

Report engine

A reusable report layer renders financial and GST reports with Indian-rupee formatting and exports to CSV/Excel, shared across the accounting and reporting modules.

03

Multi-tenant NestJS API

Roughly 60 controllers and 170+ services across 38 domain modules, guarded by a global tenant-isolation interceptor, permission guards and a URI-versioned /api/v1 surface documented with Swagger.

04

Auth platform

JWT access/refresh tokens with rotation and reuse detection, argon2 password hashing, DB-backed sessions with lockouts, RFC-6238 TOTP MFA with AES-256-GCM encrypted secrets, and email OTP flows for verification, resets and invites.

05

RBAC with field-level control

Roles and granular permissions, field-level permissions and record scopes enforced on the API and mirrored in the UI - menu visibility, buttons and route guards all respect the same model.

06

Subscriptions & billing

Plans, features, entitlements and usage counters, coupons, and Razorpay/Stripe checkout where a verified webhook flips the organization subscription active.

07

AI subsystem

A provider-agnostic gateway, domain agents, RAG indexing and retrieval, embeddings with a semantic cache, and MCP tool execution - wired into the UI as an AI copilot.

08

Ops hardening

Redis-backed rate limiting, Helmet + CSP, CSRF protection, pino logging with OpenTelemetry tracing, health checks, audit logging, and Docker multi-stage builds deployed to Render.

Built end to end. Live right now.

The product screens sit behind organization login, so this case study only shows the public sign-in capture. If you would like, I can add interior screenshots - dashboard, accounting, inventory and reports - when a demo account is available.