How I Built a Full-Scale ERP System for Indian SMEs using React, Electron & SQLite
When I started building SA ERP, I wanted to solve a real problem: Indian small businesses needed an affordable, offline-capable ERP that understood GST, Indian taxation, and local workflows.
The Problem
Most ERPs available were either:
Too expensive (SAP, Oracle ERP)
Cloud-dependent with no offline mode
Not designed for Indian GST compliance
Missing Indian-specific modules (TDS, MSME compliance)
What SA ERP Does
SA ERP is a desktop-first ERP built with Electron + React + SQLite, targeting Indian SMEs. It runs offline-first, stores all data locally in SQLite, and syncs when connectivity is available.
Key Modules:
Finance & Accounting — GST-compliant invoicing, journal entries, balance sheet
Inventory Management — Stock tracking, purchase orders, supplier management
HR & Payroll — Employee records, attendance, salary slip generation
CRM — Customer management, sales pipeline, follow-ups
Purchase & Procurement — Vendor management, PO approval workflow
GST Reports — GSTR-1, GSTR-3B, HSN Summary auto-generation
Manufacturing — Bill of materials, work orders, production tracking
Point of Sale — Retail billing with barcode scanning
Fixed Assets — Asset register, depreciation calculation
Audit & Compliance — Audit trail, user permissions, role-based access
Tech Stack
Frontend: React 18 + TypeScript + TailwindCSS
Backend: Electron (Node.js) + SQLite
Database: SQLite via better-sqlite3 (sync, embedded)
PDF: jsPDF + html2canvas
Charts: Recharts
Auth: Role-based access with bcrypt
The Architecture Decision: Why SQLite + Electron?
Most web-based ERPs require a server. For Indian SMEs in tier-2/3 cities with unreliable internet, a fully offline solution was a must.
Electron gave us native OS integration (file system, printers, barcode scanners) while React handled the UI. SQLite as the embedded database means zero database configuration for users — just install and start.
The app loads in under 2 seconds cold, handles 10,000+ transactions without slowdown, and generates PDF reports in ~300ms.
Key Technical Challenges
1. GST Calculation Engine
Indian GST has CGST + SGST (intra-state) vs IGST (inter-state) splits. I built a rules engine that determines the applicable tax type based on the buyer's state code, handles reverse charge mechanisms, and auto-populates GSTR-1 return data.
2. Offline-First Data Sync
SA ERP uses SQLite with WAL mode for concurrent access. All writes go to a local transaction log first. When syncing to cloud (optional), a conflict resolution strategy based on timestamps handles merge conflicts.
3. Multi-Company Support
Each company gets its own SQLite database file. Switching between companies is instant — just close one DB connection and open the next. No data leakage between companies.
Live Demo & GitHub
What's Next
I'm actively adding:
Mobile companion app (React Native) for field staff
WhatsApp integration for invoice delivery
E-way bill API integration
UPI payment reconciliation
If you're building for Indian users, offline-first + GST compliance is non-negotiable. Feel free to fork, contribute, or reach out for collaboration!
