Offline-first modular Point of Sale system built with React + TypeScript + Electron + IndexedDB.
Runs as a desktop app (Windows portable) and a PWA in the browser — no internet required.
Create unlimited businesses with dedicated templates: POS, Restaurant, Dehydrated Foods, Fruit & Vegetable, Service Store.
- Quick item entry with auto-calculation
- Multiple transaction modes: Sale, Purchase, Expense, Production
- Invoice preview with print support
- WhatsApp receipt sharing
- Real-time stock tracking per product
- Low-stock alerts & negative stock prevention
- Inventory adjustments with reason logging
- Warehouse management with inter-warehouse transfers
- Fruver module: waste registration & freshness tracking
Track raw material → finished product conversion with:
- Yield percentage auto-calculation
- Batch history & cost tracking
- Per-batch metadata (weight, time, notes)
Complete service management:
- Client registration with WhatsApp contact
- Device & problem tracking
- Status workflow: Received → Diagnosing → Repairing → Ready → Delivered
- Cost & price estimation
Multi-device architecture for restaurants:
- Table management with move/merge support
- Kitchen view — real-time order status (pending → preparing → ready)
- Waiter station via browser on local network
- WebSocket-based real-time sync across devices
- Daily / Weekly / Monthly summaries
- Net profit calculation (revenue − costs)
- CSV export
- FREE plan: Sales + Inventory + Production + Export
- PRO plan: Everything + Expenses + Purchases + Config
- Offline grace period: 72 hours
- Device-based activation via Google Sheets
- Registration webhook with auto-licensing
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript 6, Tailwind CSS 4, Vite 8 |
| Desktop | Electron 33, electron-builder (portable .exe) |
| Offline DB | IndexedDB via Dexie.js (schema v7) |
| Server | Express 5 (embedded in Electron) |
| Real-time | WebSocket (ws) for restaurant sync |
| PWA | Service Worker, manifest.json, offline-first |
| Licensing | Google Sheets API + Device ID |
| QR | QR code generation + payment QR |
┌─────────────────────────────────────────────┐
│ Electron │
│ ┌─────────────┐ ┌────────────────┐ │
│ │ Vite/React │◄─────►│ Express Server │ │
│ │ (Renderer) │ │ (port 3456) │ │
│ └──────┬───────┘ └───────┬────────┘ │
│ │ │ │
│ ▼ ▼ │
│ IndexedDB (Dexie.js) WebSocket Server │
│ ┌─────────────────┐ ┌──────────────┐ │
│ │ 5 Business Types │ │ Real-time │ │
│ │ 10+ Tables │ │ Sync (Mesas) │ │
│ │ CRUD + Business │ └──────────────┘ │
│ │ Logic │ │
│ └─────────────────┘ │
└─────────────────────────────────────────────┘
▲ ▲
│ │
Browser (LAN) Browser (LAN)
(Waiter / Kitchen) (Another device)
- Node.js 20+
- npm
git clone https://github.com/maxtortecnoreparaciones/LionCore.git
cd LionCore
npm install
npm run dev # Web only at http://localhost:5173
npm run electron:dev # Desktop + Express servernpm run build # Web build (dist/)
npm run electron:build # Windows portable .exesrc/
├── App.tsx # Main UI orchestrator (~1,739 lines)
├── components/
│ ├── layout/ # AppHeader
│ ├── modals/ # 19 modal components (License, Payment, Product, etc.)
│ ├── pos/ # TransactionForm
│ ├── restaurant/ # 8 components (MesaCard, CocinaView, etc.)
│ └── views/ # 8 view components (History, Summary, Inventory, etc.)
├── services/
│ ├── db.ts # Dexie.js schema v7 + CRUD + business logic (~1,266 lines)
│ ├── license.ts # License validation, device ID, plan management
│ └── registration.ts # User registration webhook
└── utils/
└── format.ts # formatCOP, formatDate, getTypeStyle
electron/
├── main.js # Electron entry point
└── server.js # Express + WebSocket + API endpoints
| Feature | FREE | PRO |
|---|---|---|
| Sales | ✅ | ✅ |
| Inventory | ✅ | ✅ |
| Production | ✅ | ✅ |
| Fruver Dashboard | ✅ | ✅ |
| Service Orders | ✅ | ✅ |
| Warehouses | ✅ | ✅ |
| Export CSV | ✅ | ✅ |
| Expenses | ❌ | ✅ |
| Purchases | ❌ | ✅ |
| Config (costs, margins) | ❌ | ✅ |
| Net Profit Reports | ❌ | ✅ |
npm run build # tsc + vite build — clean (cosmetic warnings only)| Version | Date | Highlights |
|---|---|---|
| 1.0.0 | 2026-05-02 | Initial release |
| 2.0.0 | 2026-05-20 | Full refactor: 37 components extracted from App.tsx, Kitchen status flow, Express v5, QR fix, Cash payment option |
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push (
git push origin feature/amazing) - Open a Pull Request
- WhatsApp: 313 877 7115
- GitHub Issues: Report a bug
Built with ❤️ in Colombia