Open-source Point of Sale for Restaurants, CafΓ©s & Karaoke
POS-F&B is a complete restaurant management system built with Next.js. It handles everything from table orders and kitchen printing to inventory, cash flow, and business reports β all in one app.
π― Born from real restaurant needs in Vietnam. Ready for the world.
| Login | Dashboard | Order |
|---|---|---|
![]() |
![]() |
![]() |
| Inventory | Cash | Reports |
|---|---|---|
![]() |
![]() |
![]() |
- Table grid view β drag & drop tables by area (Restaurant, Karaoke, Takeaway)
- Open / Merge / Split tables with guest count tracking
- Product catalog with categories, toppings, VAT, excise tax
- Send to kitchen β prints kitchen tickets (order items only, no price)
- Pre-bill & Checkout with multiple payment methods (cash, transfer, Momo, etc.)
- Discounts (% or fixed), service charges, happy hour, holiday surcharges
- Stock In / Stock Out tracking with suppliers
- Unit conversion (purchase unit β base unit)
- Recipe-based usage β auto-deduct ingredients per dish sold
- Low stock alerts with min-stock thresholds
- Cash register β open/close shift with opening/closing balance
- Income & Expense tracking by category
- Discrepancy detection (expected vs actual)
- Revenue Report β by day, payment method, expense category
- Ingredient Report β stock in/out detail, supplier breakdown
- Warehouse Report β current stock overview, low stock alerts
- Sold Items Report β top-selling products
- Invoice Report β all transaction history
- Export to Excel β all reports downloadable as .xlsx
- Server Mode β server sends TCP directly to thermal printers (for local networks)
- Client Mode β server builds content, device prints via WiFi/Bluetooth/USB (for cloud deployments)
- Visual Template Editor β drag & drop toggle for header/body/footer fields
- Separate ORDER vs BILL templates β kitchen tickets show only itemsΓqty (no money); bills show full header/footer with prices
- π»π³ TiαΊΏng Viα»t | π¬π§ English | π¨π³ δΈζ | π°π· νκ΅μ΄ | π―π΅ ζ₯ζ¬θͺ
- Switch language from header or login page
- LocalStorage persistence
- Toggle individual modules on/off (Orders, Inventory, Reports, Karaoke, KDS)
- Disabled modules are hidden from the sidebar menu
- NextAuth.js with credential provider
- Role-based access control (Admin, Staff, etc.)
- Custom permission JSON per role
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Language | TypeScript |
| Database | SQLite via Prisma |
| Auth | NextAuth.js v5 (Credentials) |
| UI | shadcn/ui + Tailwind CSS |
| Icons | Lucide |
| Excel Export | ExcelJS |
| PDF/Screenshots | Puppeteer |
| Charts | Recharts |
| Toast | Sonner |
| i18n | Custom context + provider (5 languages) |
| Printing | TCP sockets (server) / Web Bluetooth API (client) |
| Package Manager | npm |
- Node.js 20+ and npm
git clone https://github.com/datnguyen/pos-fnb.git
cd pos-fnb
npm installcp .env.example .env.local
# Edit .env.local with your values:
# AUTH_SECRET = any random string (openssl rand -base64 32)
# AUTH_URL = http://localhost:3000npx prisma migrate dev --name init
npx prisma db seed # Creates default admin account + sample datanpm run dev # Development (Turbopack)
# OR
npm run build && npm start # ProductionOpen http://localhost:3000 β default login: admin / admin123
# Build
npm run build
# Start with PM2
pm2 start npm --name pos-fnb -- start
pm2 saveFor HTTPS, use a reverse proxy (nginx, Caddy, Cloudflare Tunnel).
- Local network: Set printer mode to "Server" β enter IP & port of your thermal printer
- Cloud / Mobile: Set printer mode to "Device" β print from phone browser via Bluetooth/WiFi
pos-fnb/
βββ prisma/
β βββ schema.prisma # Database schema (40+ models)
β βββ seed.ts # Seed data (sample menu, accounts)
β βββ migrations/
βββ src/
β βββ app/
β β βββ (auth)/login/ # Login page
β β βββ (pos)/
β β βββ dashboard/ # Dashboard with stats & timeline
β β βββ order/ # Table management & ordering
β β βββ inventory/ # Stock in/out & tracking
β β βββ cash/ # Cash register & flow
β β βββ reports/ # 5 report types + Excel export
β β βββ settings/ # 20+ config pages
β βββ server/ # Server actions (Prisma queries)
β βββ i18n/ # 5-language dictionaries
β βββ hooks/ # React hooks (useBluetoothPrinter)
β βββ components/ui/ # shadcn/ui components
β βββ lib/ # Utilities (db, auth, utils)
βββ screenshots/ # App screenshots
βββ docs/ # User guides
βββ public/ # Static assets
POS-F&B supports 5 languages out of the box:
| Language | Code | Coverage |
|---|---|---|
| π»π³ TiαΊΏng Viα»t | vi |
100% (reference) |
| π¬π§ English | en |
100% |
| π¨π³ δΈζ | zh |
100% |
| π°π· νκ΅μ΄ | ko |
100% |
| π―π΅ ζ₯ζ¬θͺ | ja |
100% |
To add a new language: copy src/i18n/vi.ts β translate values β register in src/i18n/dictionaries.ts.
Contributions are welcome! Here's how:
- Fork the repo
- Create a branch:
git checkout -b feature/amazing-feature - Commit:
git commit -m "Add amazing feature" - Push:
git push origin feature/amazing-feature - Open a Pull Request
- Translations for more languages
- Payment gateway integrations (VNPay, Stripe, PayPal)
- Receipt printer ESC/POS protocol improvements
- Unit & E2E tests
See CHANGELOG.md for version history.
- CΓ΄ng Tα» β Product owner, domain expertise
- MαΊp πΌ β AI assistant, development & maintenance
π§ Contact: datnp100394@gmail.com
MIT β see LICENSE for details. Free for personal and commercial use.
Built with β and π by restaurant people, for restaurant people.





