ERP Platform — Distribution & Retail Business Management
Full-stack ERP for Indonesian distribution with sales, procurement, inventory, accounting, 17+ report types, and multi-branch role-based access control.
The Problem
Indonesian distribution and retail businesses — from FMCG distributors to agricultural supply chains — still rely on spreadsheets, paper forms, and disconnected tools to manage operations. Sales reps write orders by hand, warehouse staff count stock manually, accountants reconcile with Excel, and branch managers have no real-time visibility into headquarters’ data.
The pain points multiply with scale:
- Multi-branch chaos — Each branch tracks inventory and sales independently. Consolidating reports means waiting for someone to email a spreadsheet.
- No procurement workflow — Purchase orders go through WhatsApp. Approvals are verbal. Returns to suppliers are poorly documented.
- Blind inventory — Stock levels are estimates until someone physically counts. Stock discrepancies are discovered too late.
- Accounting disconnect — Financial data lives separate from operational data. Generating a profit/loss statement takes days of manual work.
The Solution
This ERP platform digitizes the entire distribution business workflow in a single web application. From central warehouse procurement to branch-level point-of-sale, from supplier management to financial reporting — every operation flows through one system with real-time data synchronization across branches.
Built with Next.js on the frontend and Express/Node.js on the backend, backed by PostgreSQL for reliable transactional data. Role-based access control ensures each user sees only what they need — from the owner’s financial dashboard down to the warehouse clerk’s stock opname screen.
Architecture
ERP Platform
├── Frontend (Next.js 15 App Router)
│ ├── Role-based navigation & menu permissions
│ ├── Zustand state management
│ ├── Drag-and-drop dashboard builder
│ └── Responsive (mobile + desktop)
├── Backend (Node.js / Express)
│ ├── JWT auth (httpOnly cookies)
│ ├── RESTful API with role middleware
│ ├── Rate limiting & security hardening
│ └── Image upload & optimization
├── Database (PostgreSQL)
│ ├── 34+ tables covering all modules
│ ├── Relational integrity for transactions
│ └── Multi-branch data isolation
└── Deployment
├── Frontend: CDN-hosted (SSL + caching)
├── Backend: API server with reverse proxy
└── Database: Managed PostgreSQL
Key Features
Sales & Point of Sale
- Transaction management — Create, edit, and void sales transactions with automatic stock deduction
- Customer credit tracking — Monitor outstanding balances and payment history per customer
- Sales history — Filterable transaction log with date range, branch, and customer filters
Procurement & Supply Chain
- Central procurement — HQ creates purchase orders to suppliers with approval workflow
- Branch procurement — Branches request stock from central warehouse with transfer tracking
- Return management — Branch-to-HQ and HQ-to-supplier return flows with documentation
Inventory Management
- Real-time stock levels — Per-product, per-branch inventory with automatic updates on transactions
- Stock opname — Physical count workflow with variance reporting
- Product catalog — Master data with images, categories, units, and pricing
Accounting & Finance
- Master account system — Structured chart of accounts (format: AKYYMMNNNN)
- Expense tracking — Categorized expense recording with receipt documentation
- Bank reconciliation — Match transactions with bank statements
Reporting System (17+ Reports)
- Sales recap — By branch, by product, by customer, by period
- Financial reports — Profit/loss, balance sheet, cash flow
- Inventory reports — Aging, movement, stock valuation
- Excel export — All reports downloadable as
.xlsxfor offline analysis
Dashboard & Analytics
- Drag-and-drop widgets — Customize dashboard layout per user role
- Real-time filters — Date range, branch, and product category filters
- Multi-report view — Display multiple KPI widgets on a single screen
User Management & Security
- Granular roles — SUPER_ADMIN, ADMIN_PUSAT, ADMIN_CABANG, KEPALA_GUDANG, MANAGER_PURCHASING, and more
- Menu-based permissions — Control which modules each role can access
- Session security — JWT tokens with 12-hour expiry, BCrypt password hashing, rate limiting on login
What I Learned
- ERP data models are deeply relational — Products link to categories, units, transactions, stock entries, and suppliers. PostgreSQL’s relational integrity prevented countless data inconsistencies that would have been invisible in a NoSQL database.
- Role-based access is more than auth — It’s about UX design. Each role sees a different app — the warehouse clerk doesn’t need financial reports, the accountant doesn’t need stock opname. Designing navigation per role was a UX challenge, not just a security one.
- Reporting drives adoption — Users don’t adopt an ERP because it’s modern. They adopt it because it gives them reports they couldn’t get before. The 17+ report types were the #1 reason stakeholders pushed their teams to use the system.
- Multi-branch architecture requires discipline — Every query needs to account for branch scoping. Forgetting a branch filter in one query means leaking data across branches — a critical business issue, not just a bug.
- Indonesian business processes are unique — Purchase order approvals via WhatsApp, verbal return authorizations, handwritten stock counts. Digitizing these required understanding the actual workflow, not just building CRUD screens.
For more enterprise-grade projects, see my BSpace mining operations app for industrial Flutter patterns, or my Semesa Grande community management platform for role-based web app architecture.
More Projects
30 Days Web Challenge — Community-Driven Daily Build Experiment
An interactive web experiment where strangers vote on features to build over 30 days, powered by Next.js with real-time voting, animated UI, and daily progress tracking.
CSSKit — Open-Source CSS Animation Library with 310+ Animations
A free, open-source CSS animation library built with Astro and React. Browse 310+ animations across 11 categories, customize parameters live, and copy-paste into your project. Zero dependencies.
Event Photo Platform — OCR Bib Number Detection System
Full-stack monorepo with dual OCR providers, async BullMQ job processing, S3 storage, and real-time bib number search for race event photography platforms.
Festival Jamu Nusantara — Event & QR Check-in Platform
Full-stack event platform for Indonesian jamu festival with QR check-in, member points, gallery system, and Filament admin panel. Built with Next.js and Laravel.
More Projects
30 Days Web Challenge — Community-Driven Daily Build Experiment
An interactive web experiment where strangers vote on features to build over 30 days, powered by Next.js with real-time voting, animated UI, and daily progress tracking.
CSSKit — Open-Source CSS Animation Library with 310+ Animations
A free, open-source CSS animation library built with Astro and React. Browse 310+ animations across 11 categories, customize parameters live, and copy-paste into your project. Zero dependencies.
Event Photo Platform — OCR Bib Number Detection System
Full-stack monorepo with dual OCR providers, async BullMQ job processing, S3 storage, and real-time bib number search for race event photography platforms.
Festival Jamu Nusantara — Event & QR Check-in Platform
Full-stack event platform for Indonesian jamu festival with QR check-in, member points, gallery system, and Filament admin panel. Built with Next.js and Laravel.
Engineering Ladders Picker — Career Level Assessment Tool
A web-based Engineering Ladders assessment tool that helps engineers pick axis levels, compare against reference ladders, and export a clean PDF summary.
Semesa Grande — Residential Community Management App
Full-stack PWA with role-based dashboards, kas payment tracking, audit workflows, asset borrowing, document management, and push notifications for communities.
Interested in Something Similar?
Need a similar project built, want to collaborate, or have questions about the tech stack? Drop a comment below or reach out directly.