Skip to content

Latest commit

 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦁 LionCore POS

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.

TypeScript React Electron Tailwind CSS Vite Express License PRs Welcome


✨ Features

🏪 Multi-Business

Create unlimited businesses with dedicated templates: POS, Restaurant, Dehydrated Foods, Fruit & Vegetable, Service Store.

💰 Sales & Transactions

  • Quick item entry with auto-calculation
  • Multiple transaction modes: Sale, Purchase, Expense, Production
  • Invoice preview with print support
  • WhatsApp receipt sharing

📦 Inventory Management

  • 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

🏭 Production Module

Track raw material → finished product conversion with:

  • Yield percentage auto-calculation
  • Batch history & cost tracking
  • Per-batch metadata (weight, time, notes)

🔧 Service Orders (CRM)

Complete service management:

  • Client registration with WhatsApp contact
  • Device & problem tracking
  • Status workflow: Received → Diagnosing → Repairing → Ready → Delivered
  • Cost & price estimation

🍽️ Restaurant Module

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

📊 Reports & Analytics

  • Daily / Weekly / Monthly summaries
  • Net profit calculation (revenue − costs)
  • CSV export

🔐 License System

  • 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

🧰 Tech Stack

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

Architecture

┌─────────────────────────────────────────────┐
│                  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)

🚀 Getting Started

Prerequisites

  • Node.js 20+
  • npm

Install & Run (Development)

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 server

Build for Production

npm run build                 # Web build (dist/)
npm run electron:build        # Windows portable .exe

📦 Project Structure

src/
├── 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

🔑 License Plans

Feature FREE PRO
Sales
Inventory
Production
Fruver Dashboard
Service Orders
Warehouses
Export CSV
Expenses
Purchases
Config (costs, margins)
Net Profit Reports

🧪 Test Status

npm run build   # tsc + vite build — clean (cosmetic warnings only)

🔄 Versioning

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

🤝 Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push (git push origin feature/amazing)
  5. Open a Pull Request

📱 Contact


Built with ❤️ in Colombia

About

Offline-first modular POS system built with TypeScript, designed for small businesses to manage sales, inventory and financial tracking

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages