A modern, full-stack food ordering web application built with React, TypeScript, Tailwind CSS, and Lovable Cloud (powered by Supabase). Browse a curated menu, add items to your cart, and place orders for delivery β all with real-time data, smooth animations, and a fully responsive design. Includes a secure Admin Dashboard for managing orders, menu items, customers, and analytics.
Frontend: https://quickbiteeats.lovable.app
Admin Panel: https://quickbiteeats.lovable.app/admin
Username: experthamza95@gmail.com
Password: a!2#c6
- Browse Menu β Explore dishes across categories: Burgers, Pizza, Pasta, Drinks, and Desserts.
- Item Detail Modal β Tap any dish to view details, adjust quantity, and add to cart.
- Shopping Cart β Slide-out cart drawer with quantity controls and live subtotal.
- Secure Checkout β Delivery details form with Cash on Delivery payment, order summary sidebar.
- Order History β Track all your past orders with status badges (Pending β Preparing β Out for Delivery β Delivered).
- User Authentication β Email/password sign-up and sign-in, plus Google OAuth login.
- Auto Profile β Profile created automatically on sign-up; delivery details pre-filled at checkout.
- Responsive Design β Fully mobile-first, card-based layout that works beautifully on all devices.
- Smooth Animations β Framer Motion powered page transitions, modals, and cart interactions.
- Toast Notifications β Real-time feedback for cart actions and order placement via Sonner.
- Role-Based Access Control β Only users with
adminrole in theuser_rolestable can access the admin panel. - Dashboard Overview β Live KPI cards (orders today, revenue today, pending orders, menu items, customers) plus a 7-day order volume bar chart.
- Order Management β Full order list with search, status filtering, pagination, inline status updates, and detailed order modals.
- Menu Management β Full CRUD for menu items (create, edit, delete, toggle availability).
- Customer Management β Searchable customer list with individual order history detail views.
- Analytics β Revenue trends (30-day line chart), top-selling items (bar chart), category distribution (pie chart), and peak ordering hours heatmap.
- Real-time Updates β Orders appear instantly in the dashboard via Supabase Realtime subscriptions.
| Layer | Technology |
|---|---|
| Framework | TanStack Start (React 19, file-based routing, SSR/SSG) |
| Language | TypeScript (strict mode) |
| Styling | Tailwind CSS v4 with custom design tokens |
| UI Components | shadcn/ui (Radix UI primitives + custom variants) |
| Animations | Framer Motion |
| Charts | Recharts |
| State Management | Zustand (cart store) |
| Backend / Database | Lovable Cloud (PostgreSQL + Auth + Row Level Security + Realtime) |
| Icons | Lucide React |
| Build Tool | Vite 7 |
| Runtime | Cloudflare Workers (edge) |
QuickBite uses a warm, appetizing color palette defined in src/styles.css:
| Token | Value | Usage |
|---|---|---|
| Primary | #E8470A (Deep Orange) |
Buttons, accents, links, CTAs |
| Background | #FFF8F0 (Cream White) |
Page background |
| Foreground | #1A1A1A (Charcoal) |
Body text, headings |
| Card | #FFFFFF |
Cards, modals, drawer |
| Muted | #F5F0EB |
Secondary backgrounds |
| Accent | #FFE8D6 |
Highlights, tags, badges |
| Border | #E8E0D8 |
Dividers, input borders |
| Admin Sidebar | #0F172A (Slate 900) |
Admin panel dark sidebar |
- Font: Poppins (display/headings) + Inter (body)
- Border Radius: 0.75rem base, rounded cards and buttons
- Shadows: Warm orange-tinted shadows for depth
- Gradients:
linear-gradient(135deg, #E8470A, #F28A4D)for primary buttons
βββ src/
β βββ components/ # Reusable UI components
β β βββ FoodCard.tsx # Menu item card with add-to-cart
β β βββ CartDrawer.tsx # Slide-out shopping cart
β β βββ Navbar.tsx # Top navigation with auth state
β β βββ Footer.tsx # Site footer
β β βββ admin/
β β β βββ AdminLayout.tsx # Admin sidebar + header + mobile drawer
β β βββ ui/ # shadcn/ui primitives (button, dialog, sheet, etc.)
β βββ hooks/
β β βββ use-auth.ts # Auth session hook (Supabase)
β β βββ use-admin.ts # Admin role checker hook
β βββ integrations/
β β βββ lovable/ # Lovable Cloud Auth (OAuth broker)
β β βββ supabase/ # Supabase clients (browser, server, middleware)
β βββ routes/ # TanStack file-based routes
β β βββ __root.tsx # Root layout (Navbar + Footer + Outlet)
β β βββ index.tsx # Homepage (hero + popular items)
β β βββ menu.tsx # Full menu with category filters
β β βββ checkout.tsx # Checkout page (delivery + payment)
β β βββ orders.tsx # Order history for logged-in users
β β βββ order-confirmation.tsx # Post-order success page
β β βββ login.tsx # Sign-in (email + Google OAuth)
β β βββ signup.tsx # Sign-up (email)
β β βββ about.tsx # About / contact page
β β βββ admin.tsx # Admin route guard (redirects non-admins)
β β βββ admin.index.tsx # Admin dashboard overview
β β βββ admin.orders.tsx # Admin order management
β β βββ admin.menu.tsx # Admin menu CRUD
β β βββ admin.customers.tsx # Admin customer list + history
β β βββ admin.analytics.tsx # Admin analytics charts
β βββ server.ts # Server entry point
β βββ start.ts # Start instance configuration
β βββ router.tsx # Router setup
β βββ store/
β β βββ cart.ts # Zustand cart store (items, qty, open/close)
β βββ styles.css # Global styles + Tailwind theme tokens
βββ supabase/
β βββ config.toml # Supabase CLI config
β βββ migrations/ # Database migrations (tables, RLS, seed data, roles)
βββ package.json
βββ vite.config.ts
βββ tsconfig.json
βββ wrangler.jsonc # Cloudflare Workers config
The app uses a PostgreSQL database with the following tables:
Stores extended user info linked to Supabase Auth.
| Column | Type | Notes |
|---|---|---|
id |
UUID | FK β auth.users, primary key |
full_name |
TEXT | User's display name |
email |
TEXT | Email address |
phone |
TEXT | Contact number |
address |
TEXT | Default delivery address |
created_at |
TIMESTAMPTZ | Auto-generated |
Role-based access control. One row per role assignment.
| Column | Type | Notes |
|---|---|---|
id |
UUID | Auto-generated |
user_id |
UUID | FK β auth.users |
role |
app_role | admin or customer |
The food menu catalog.
| Column | Type | Notes |
|---|---|---|
id |
UUID | Auto-generated |
name |
TEXT | Item name |
description |
TEXT | Item description |
price |
NUMERIC | Price in USD |
category |
TEXT | Burgers, Pizza, Pasta, Drinks, Desserts |
image_url |
TEXT | Unsplash image URL |
rating |
NUMERIC | Default 4.5 |
is_available |
BOOLEAN | Default true |
created_at |
TIMESTAMPTZ | Auto-generated |
Customer orders.
| Column | Type | Notes |
|---|---|---|
id |
UUID | Auto-generated |
user_id |
UUID | FK β auth.users |
status |
TEXT | Pending / Preparing / Out for Delivery / Delivered / Cancelled |
total_amount |
NUMERIC | Order total including delivery |
delivery_address |
TEXT | Delivery location |
phone |
TEXT | Contact number |
full_name |
TEXT | Recipient name |
created_at |
TIMESTAMPTZ | Auto-generated |
Line items for each order.
| Column | Type | Notes |
|---|---|---|
id |
UUID | Auto-generated |
order_id |
UUID | FK β orders |
menu_item_id |
UUID | FK β menu_items |
quantity |
INTEGER | Item count |
unit_price |
NUMERIC | Price at time of order |
name |
TEXT | Item name (snapshot) |
- Menu items: Public read for all visitors. Admins can create, update, and delete.
- Profiles: Users can only read/insert/update their own profile. Admins can read all.
- Orders: Users can only read/insert their own orders. Admins can read and update all.
- Order items: Users can only access items belonging to their own orders. Admins can read all.
- User roles: Managed via a security-definer
has_role()function to prevent recursive RLS checks.
bun install
# or
npm installbun dev
# or
npm run devThe app will be available at http://localhost:3000.
bun run build
# or
npm run buildbun run preview
# or
npm run previewQuickBite supports two authentication methods:
- Email + Password β Standard Supabase Auth with email confirmation.
- Google OAuth β Managed via Lovable's OAuth broker (
@lovable.dev/cloud-auth-js). Users are redirected to Google's consent screen, and tokens are securely injected into Supabase Auth upon return.
The useAuth() hook (src/hooks/use-auth.ts) provides reactive session state across the app.
The cart is managed via a Zustand store (src/store/cart.ts) with the following features:
- Add items β Click "Add to Cart" on any food card or from the item modal.
- Quantity control β Increment/decrement in the cart drawer or item modal.
- Remove items β One-tap removal from the cart drawer.
- Live totals β Subtotal and item count update instantly.
- Persistent during session β Cart state persists across page navigation within the session.
- Slide-out drawer β Animated cart drawer accessible from the navbar.
Delivery fee is fixed at $2.99.
The admin panel lives at /admin and is completely separate from the customer-facing app.
To make a user an admin, insert a row into the user_roles table:
INSERT INTO public.user_roles (user_id, role)
VALUES ('<USER_UUID>', 'admin');Only users with role = 'admin' can access /admin and its sub-routes. Non-admins are redirected to the home page.
| Route | Description |
|---|---|
/admin |
Dashboard overview with live stats and 7-day order chart |
/admin/orders |
Search, filter, paginate, and update order statuses |
/admin/menu |
Full CRUD for menu items (add, edit, delete, toggle availability) |
/admin/customers |
Customer directory with order history detail modal |
/admin/analytics |
Revenue trends, top-selling items, category breakdown, peak hours |
| Command | Description |
|---|---|
dev |
Start Vite dev server with HMR |
build |
Build for production (SSR + client) |
build:dev |
Build in development mode |
preview |
Preview production build locally |
lint |
Run ESLint across the project |
format |
Format code with Prettier |
- React 19 + React DOM
- TanStack Start β Full-stack React framework
- TanStack Router β Type-safe file-based routing
- TanStack Query β Server state management
- Tailwind CSS v4 β Utility-first styling
- Framer Motion β Declarative animations
- Recharts β Data visualization for admin analytics
- Zustand β Lightweight state management
- Supabase JS Client β Database & auth SDK
- Zod β Schema validation
- Sonner β Toast notifications
- Lucide React β Icon library
- shadcn/ui primitives β Radix UI + Tailwind components
This project is built for Cloudflare Workers edge runtime. It is optimized to run on the edge with minimal cold starts.
Deploy via your preferred platform that supports Vite + Cloudflare Workers (e.g., Lovable Cloud publishing).
MIT β feel free to use, modify, and distribute.
Built with β€οΈ using Lovable.