Skip to content

isayan24/Delycia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

161 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍽️ Delycia

A next-generation, multi-tenant restaurant SaaS & real-time contactless ordering platform built with TanStack Ecosystem

Delycia Banner


✦ Vision

Delycia is a production-ready, multi-tenant restaurant management platform designed to digitize dining experiences. Combining frictionless, instant QR-code customer ordering with a robust, real-time administrative workflow and automated subscription billing, Delycia serves as a unified operational suite for modern food-service businesses.


✦ Problem & Solution

Problem Delycia's Solution
Manual & Paper Workflows Digitized, table-based QR-code menu browsing and ordering with zero application installation.
Disconnected Kitchens Event-driven WebSocket synchronization keeping kitchen queues, waiters, and customers in perfect sync.
High Aggregator Commissions A direct-to-consumer SaaS platform, bypassing costly third-party delivery marketplaces.
Fragmented Management A centralized dashboard coordinating menus, multi-restaurant inventory, staff scheduling, and billing.
Communication Delays Instant, bidirectional WebSocket event synchronization ensuring orders, table states, and kitchen workflows are updated in real-time.

✦ Core Features

Capability Description
πŸ”„ Real-Time Sync Event-driven WebSocket layer utilizing Socket.IO to instantly push order states, table occupancy, and kitchen updates to all connected devices.
πŸ“± QR-Code Ordering Instant digital menu access, variant selection, addon customizers, and contactless checkout.
πŸ“‹ Staff Workspace Dynamic real-time views for waiter order dispatching, kitchen queues, and delivery status tracking with audio alerts.
πŸͺ‘ Table & Zone Control Comprehensive visual layout tracking, occupancy status management, and zone-based QR generation.
πŸ‘₯ Role-Based Permissions 8-tier staff hierarchy (Owner, Manager, Waiter, Kitchen, etc.) enforced via secure API middlewares.
πŸ• Dynamic Inventory Intuitive control panels for menu items, variants, addons, categories, and item availability toggles.
πŸ’³ Multi-Tenant SaaS Billing Automated subscription plan management (Trial, Monthly, Yearly) with platform-wide analytics.
πŸ” AI-Assisted Search Qdrant vector-backed smart menu exploration, customer memory logging, and dynamic upselling.

✦ Real-Time Order Synchronization

Delycia is engineered with a high-performance event-driven architecture powered by Socket.IO. Order lifecycle events, table status transitions, and kitchen workflows propagate across customer interfaces and admin dashboards with sub-second latency, ensuring absolute synchronization across entire staff.

Delycia Real-Time Order Synchronization


✦ Platform Architecture & Feature Maps

Delycia scales efficiently by keeping the user-facing app, administration dashboard, and platform-wide superadmin dashboard isolated, all communicating through a secure Backend-for-Frontend (BFF) layer.

Delycia Features Map

Delycia System Architecture


✦ Project Structure

Delycia/
β”œβ”€β”€ server/                     # Express.js REST API & WebSocket server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/             # Database connection pool & DB initialization scripts
β”‚   β”‚   β”œβ”€β”€ controller/v1/      # Scoped route controllers (web, admin, superadmin, app, system)
β”‚   β”‚   β”œβ”€β”€ routes/v1/          # Secure REST routes & role-based endpoints
β”‚   β”‚   β”œβ”€β”€ middlewares/        # JWT verification, CSRF Double Submit, rate limiting & XSS checks
β”‚   β”‚   β”œβ”€β”€ services/           # Redis services, session tracking, token caches & rate limiters
β”‚   β”‚   β”œβ”€β”€ sockets/            # Socket.IO handlers for live order & table status updates
β”‚   β”‚   β”œβ”€β”€ cron_jobs/          # Scheduled node-cron tasks (stats calculation, table resets)
β”‚   β”‚   β”œβ”€β”€ models/             # Relational data schema & helper queries
β”‚   β”‚   └── validations/        # Zod validation schemas for incoming requests
β”‚   └── Dockerfile              # Containerization configuration for the backend
β”œβ”€β”€ client/                     # TanStack Start customer-facing web application (:4000)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/             # File-based routes & BFF proxy endpoints (/api/*)
β”‚   β”‚   β”œβ”€β”€ lib/                # BFF Auth helpers (withAuth, refreshCoordinator, circuitBreaker)
β”‚   β”‚   β”œβ”€β”€ hooks/              # Scoped TanStack Query query/mutation hooks
β”‚   β”‚   β”œβ”€β”€ context/            # AuthProvider & StoreProvider context definitions
β”‚   β”‚   └── store/              # Zustand lightweight UI and shopping cart state management
β”‚   └── Dockerfile              # Containerization configuration for the client
β”œβ”€β”€ admin/                      # TanStack Start restaurant operations dashboard (:4500)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/             # Live orders queue, menu manager, staff tools & billing
β”‚   β”‚   β”œβ”€β”€ hooks/              # Socket.IO managers & multi-restaurant context switching
β”‚   β”‚   └── services/           # Local storage session, token, and cleanup utilities
β”‚   └── Dockerfile              # Containerization configuration for the admin panel
β”œβ”€β”€ superadmin/                 # TanStack Start platform super-admin panel (:5000)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── routes/             # Tenant activation, subscription plan definitions & system health
β”‚   └── Dockerfile              # Containerization configuration for the superadmin panel
└── landing/                    # Product marketing landing page
 

✦ Tech Stack

Category Technologies
🌐 Frontend Framework TanStack Start (SSR, file-based routing), Vite, TanStack Router
⚑ State & Query TanStack Query, Zustand, Axios
🎨 UI & Styling Tailwind CSS, Radix UI primitives, shadcn/ui, Framer Motion
βš™οΈ Backend & Logic Express.js, Node.js (ESM), node-cron
☁️ Database & Cache MariaDB (mysql pool), Redis (session & token caching)
πŸ”„ Real-Time Layer Socket.IO (WebSocket server & client), Event-driven updates
πŸ”’ Security & Auth JWT Access+Refresh Tokens, BFF (Backend-for-Frontend) Pattern, csrf-csrf, Rate Limiting
πŸ€– Intelligence & Search Google GenAI, OpenAI, Qdrant Vector Search

✦ Getting Started

1. Setup Environment

Duplicate the environment sample configurations across the services:

# Backend Server
cp server/.env.example server/.env

# Client App
cp client/.env.sample client/.env

# Admin Panel
cp admin/.env.sample admin/.env

# SuperAdmin Panel
cp superadmin/.env.sample superadmin/.env

2. Install Dependencies

Install packages for the specific modules in your environment:

# Server (Backend)
cd server && npm install

# Client (Frontend)
cd ../client && pnpm install

# Admin Panel
cd ../admin && pnpm install

# SuperAdmin Panel
cd ../superadmin && pnpm install

3. Database & Cache Initialization

Make sure you have MariaDB 11.8+ and Redis 5.6+ active.

  • MariaDB Schema Setup:
    mysql -u root -p < delycia_db_structure.sql
  • Redis Server Setup:
    redis-server

4. Run the Applications

Launch each service in a separate terminal:

# Terminal 1 - Express API Server
cd server && npm run dev

# Terminal 2 - Customer Client App (Port 4000)
cd client && pnpm run dev

# Terminal 3 - Restaurant Admin Panel (Port 4500)
cd admin && pnpm run dev

# Terminal 4 - Platform SuperAdmin Panel (Port 5000)
cd superadmin && pnpm run dev

5. Local Access Points

  • 🌐 Customer Portal: http://localhost:4000
  • βš™οΈ Restaurant Admin: http://localhost:4500
  • πŸ‘‘ Platform SuperAdmin: http://localhost:5000
  • πŸ”Œ API Engine & Health: http://localhost:3000


Under the MIT License | Made with 🧑 by Sayan, powered by β˜•

Animated line animation

About

🍽️ Multi-tenant restaurant SaaS. Frictionless QR-code ordering and dashboards βš‘πŸ“¦

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors