How georgi-0d/pos-horeca works
POS Horeca is a desktop point-of-sale app for restaurant staff, built with a Tauri webview frontend, Rust command handlers, and PostgreSQL. The main workflow is staff PIN login, selecting or reserving a table, creating an order and adding products, then recording payment; payment also frees the table, updates stock, and creates an invoice. Separate capabilities cover kitchen tickets, inventory and catalog administration, employee/settings management, and sales and shift reports. Frontend and command wiring are supported by sampled source; some unsampled command behavior is represented only at module level.
Main entry points: lib.rs Command dispatcher · db.rs Database pool · order.rs Order lifecycle · auth.rs PIN authentication
Components 21
POS client
- POS interface
src/main.js
Tauri runtime
- Command dispatcher
src-tauri/src/lib.rs - Active sessions
src-tauri/src/commands/auth.rs - Domain models
src-tauri/src/models
Service workflow
- PIN authentication
src-tauri/src/commands/auth.rs - Tables and reservations
src-tauri/src/commands/table.rs - Order lifecycle
src-tauri/src/commands/order.rs - Order items
src-tauri/src/commands/order_item.rs - Payment recording
src-tauri/src/commands/payment.rs - Invoices
src-tauri/src/commands/invoice.rs - Kitchen tickets
src-tauri/src/commands/kitchen.rs
Operations and reporting
- Products and categories
src-tauri/src/commands/product.rs - Category management
src-tauri/src/commands/category.rs - Inventory
src-tauri/src/commands/inventory.rs - Product administration
src-tauri/src/commands/admin.rs - Employee administration
src-tauri/src/commands/employees.rs - Application settings
src-tauri/src/commands/settings.rs - Sales and shift reports
src-tauri/src/commands/report.rs
Persistence
- Database pool
src-tauri/src/db.rs - PostgreSQL
Other components
- POS staff
Connections 36
- POS staff → POS interface: uses
- POS interface → Command dispatcher: invokes commands
- Command dispatcher → PIN authentication: dispatches
- Command dispatcher → Tables and reservations: dispatches
- Command dispatcher → Order lifecycle: dispatches
- Command dispatcher → Order items: dispatches
- Command dispatcher → Payment recording: dispatches
- Command dispatcher → Invoices: dispatches
- Command dispatcher → Kitchen tickets: dispatches
- Command dispatcher → Products and categories: dispatches
- Command dispatcher → Category management: dispatches
- Command dispatcher → Inventory: dispatches
- Command dispatcher → Product administration: dispatches
- Command dispatcher → Employee administration: dispatches
- Command dispatcher → Application settings: dispatches
- Command dispatcher → Sales and shift reports: dispatches
- Command dispatcher → Database pool: creates pool
- PIN authentication → Active sessions: stores sessions
- Order lifecycle → Inventory: updates stock
- Order lifecycle → Tables and reservations: sets table status
- PIN authentication → Database pool: queries
- Tables and reservations → Database pool: reads and writes
- Order lifecycle → Database pool: reads and writes
- Order items → Database pool: reads and writes
- Payment recording → Database pool: reads and writes
- Invoices → Database pool: reads and writes
- Kitchen tickets → Database pool: reads and writes
- Products and categories → Database pool: reads and writes
- Category management → Database pool: reads and writes
- Inventory → Database pool: reads and writes
- Product administration → Database pool: reads and writes
- Employee administration → Database pool: reads and writes
- Application settings → Database pool: reads and writes
- Sales and shift reports → Database pool: queries
- Database pool → PostgreSQL: connects
- Order lifecycle → Domain models: uses order item model