@fixl1234/smartdine
v1.0.0
Published
SmartDine SDK — complete restaurant management platform. Auth, menu, orders, KDS, billing, payments, analytics, and real-time WebSocket tracking.
Maintainers
Readme
SmartDine SDK v1.0.0
Complete restaurant management platform SDK. Build your own restaurant app with authentication, menu management, QR ordering, kitchen display system (KDS), billing, payments, notifications, and analytics.
🎯 Features
- ✅ Authentication - Staff login + Guest OTP
- ✅ Menu Management - Categories, items, modifiers, combos
- ✅ QR Ordering - Scan & order from table
- ✅ Order Tracking - Real-time order status
- ✅ Kitchen Display System (KDS) - Order queue & preparation tracking
- ✅ Table Management - Table assignment & status
- ✅ Billing - Generate invoices with GST
- ✅ Payments - Razorpay UPI, Cash, Card
- ✅ Notifications - SMS, Email, Push notifications
- ✅ Analytics - Sales, KPIs, Reports
- ✅ Real-time - Socket.io WebSocket support
📦 Installation
npm install @fixl1234/smartdine
# or
yarn add @fixl1234/smartdine
# or
pnpm add @fixl1234/smartdine🚀 Quick Start
1. Orders Module
import { orders } from '@fixl1234/smartdine'
// Place order
const order = await orders.placeOrder({
tableId: 'table-1',
items: [
{ menuItemId: 'biryani-1', quantity: 2 },
{ menuItemId: 'coke-1', quantity: 1 }
]
})
// Track order
const status = await orders.trackOrder(order.id)
// Update status
await orders.updateOrderStatus(order.id, 'preparing')2. Menu Module
import { menu } from '@fixl1234/smartdine'
// Get all categories
const categories = await menu.getCategories()
// Get menu items
const items = await menu.getMenuItems({ categoryId: 'mains' })
// Search items
const results = await menu.searchItems('biryani')3. Authentication
import { auth } from '@fixl1234/smartdine'
// Staff login
const staff = await auth.loginStaff({
email: '[email protected]',
password: 'password'
})
// Verify OTP (for guests)
const guest = await auth.verifyOTP({ phone: '+91999999999', otp: '123456' })4. Payments & Billing
import { payments } from '@fixl1234/smartdine'
// Generate bill
const bill = await payments.generateBill({
orderId: 'order-123',
subtotal: 500,
tax: 90,
discount: 0
})
// Process payment
const payment = await payments.processPayment({
orderId: 'order-123',
method: 'upi', // 'upi' | 'cash' | 'card'
amount: 590
})5. KDS (Kitchen Display)
import { kds } from '@fixl1234/smartdine'
// Subscribe to orders
kds.subscribeToOrders((orders) => {
console.log('New orders:', orders)
})
// Update item status
await kds.updateItemStatus('order-123', 'item-1', 'ready')6. Notifications
import { notifications } from '@fixl1234/smartdine'
// Send order ready notification
await notifications.sendOrderReady({
orderId: 'order-123',
phone: '+91999999999'
})
// Send bill alert
await notifications.sendBillAlert({
orderId: 'order-123',
email: '[email protected]',
billAmount: 590
})7. Analytics
import { analytics } from '@fixl1234/smartdine'
// Get sales report
const report = await analytics.getSalesReport({
startDate: '2026-08-01',
endDate: '2026-08-03'
})
// Get KPIs
const kpis = await analytics.getKPIs()
// Get top items
const topItems = await analytics.getTopItems({ limit: 10 })🔌 Real-time Support
SmartDine SDK includes Socket.io for real-time features:
import { core } from '@fixl1234/smartdine'
// Connect
const socket = core.createSocketClient('http://localhost:5000', {
auth: { token: 'jwt-token' }
})
// Listen to order updates
socket.on('order:status-changed', (order) => {
console.log('Order status:', order.status)
})
// Listen to new KDS orders
socket.on('kds:new-order', (order) => {
console.log('New order for kitchen:', order)
})📚 API Documentation
Full API documentation at: https://github.com/fixl-developer/Restaurent-sdk
🏗️ Module Structure
@fixl1234/smartdine
├── core - HTTP client + Socket.io
├── types - TypeScript type definitions
├── auth - Authentication
├── menu - Menu & categories
├── orders - Order management
├── otp - OTP verification
├── kds - Kitchen Display System
├── payments - Billing & payments
├── notifications - SMS/Email/Push
└── analytics - Reports & analytics🔐 Security
- JWT-based authentication
- Rate limiting on API endpoints
- Input validation with Zod
- CORS protection
- SQL injection prevention
📋 Requirements
- Node.js >= 20.0.0
- TypeScript 5.0+
🤝 Contributing
Contributions welcome! Open issues or pull requests at: https://github.com/fixl-developer/Restaurent-sdk
📄 License
MIT
👨💻 Author
Created by @fixltech
Made with ❤️ for restaurants
