Skip to content

basemw0/SliceHub

Repository files navigation

SliceHub 🍕

The Open-Source Kitchen Operating System

SliceHub is a specialized, commission-free ordering platform designed specifically for Cloud Kitchens and Home-Based Chefs.

Unlike generic e-commerce templates (which are built for retail), SliceHub is engineered for food production workflows. It handles daily production limits, kitchen display systems, and frictionless guest checkout out of the box.

Why SliceHub?

Standard delivery apps (UberEats, Talabat) charge 30% commissions. Shopify charges monthly fees and lacks kitchen logic.

SliceHub is different:

  • Zero Commissions: You keep 100% of the profit.
  • Production Logic: It understands that you only have 50 dough balls today. Once they're gone, the menu automatically locks for the day.
  • Kitchen-First: Includes a built-in KDS (Kitchen Display System) for line cooks.

✨ Key Features

🛒 For Customers (Mobile Web)

  • Zero-Friction Checkout: No account creation required. Identifies users via phone number.
  • Date-Based Reservations: Users select a specific delivery date. The system checks that specific day's inventory.
  • Hybrid Location: Users can type an address or one-tap to attach a GPS Pin (Google Maps link) to the order.
  • Smart Menu: Auto-filters to show only what's available. Bestsellers and "Low Stock" items are badged automatically.

👨‍🍳 For The Kitchen (Admin Panel)

  • Dual-Mode Dashboard:

  • Manager Mode: A Kanban board (Trello-style) to track orders from NewPreparingReadyCompleted.

  • Chef Mode (KDS): A high-contrast, large-text interface designed for tablets. Allows chefs to mark orders "Ready" with messy hands.

  • Silent Dispatch: One-click button to copy a perfectly formatted message (Name, Location, Amount) to paste into WhatsApp driver groups.

  • Dough Scarcity Logic: Automatically prevents overselling based on daily production limits defined in Settings.

🛠 Tech Stack

  • Frontend: React (Vite) + Tailwind CSS
  • Backend: Supabase (PostgreSQL + Real-time Subscriptions)
  • State: LocalStorage (Client) + Supabase Realtime (Admin)
  • Hosting: Vercel (Recommended)

⚙️ Setup & Installation

Prerequisites

  • Node.js (v16+)
  • A free Supabase project.

1. Clone the Repo

git clone https://github.com/basemw0/slicehub.git
cd slicehub
npm install

2. Configure Supabase

  1. Go to your Supabase Dashboard -> SQL Editor.
  2. Copy the contents of schema.sql from this repository.
  3. Run the script to create the necessary Tables, RPCs (Functions), and Row Level Security policies.

3. Environment Variables

Create a .env file in the root directory:

VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

4. Run Locally

npm run dev

The app will launch at http://localhost:5173.

  • Customer View: http://localhost:5173/
  • Admin View: http://localhost:5173/admin (Default login logic is in src/views/LoginView.jsx)

📱 Application Flow

The "Scarcity" Engine

Unlike Shopify, inventory in SliceHub isn't static.

  1. Admin sets a "Max Capacity" (e.g., 50 pizzas/day) in Settings.
  2. Customer picks a date (e.g., Friday).
  3. System checks daily_capacities table.
  4. If current_fill < max_capacity, the order is allowed.
  5. If not, the frontend blocks the order and suggests another date.

The "Chef Mode"

Located in src/components/admin/Orders.jsx. It uses a dedicated state to strip away financial data and delivery details, showing only:

  • Item Name & Quantity (Huge Text)
  • Modifications/Notes (Yellow Alert Box)
  • "Mark Ready" Button

🤝 Contributing

This project is open-source. Pull requests are welcome!

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

Built with ❤️ for the Pizza Community.

About

A full-stack ordering platform built with React, Tailwind, and Supabase. Features atomic inventory transactions, a Kanban admin dashboard, and a dedicated Kitchen Display System (KDS).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors