A full-stack database management and booking platform for restaurants. TableTreats supports two user roles: Customer and Restaurant Owner. Owners register their restaurant and maintain details (menus, hours, tables, availability), while customers browse restaurants, filter/search by features, and make bookings.
| Application | URL |
|---|---|
| Customer App | https://table-treats-eight.vercel.app/ |
| Restaurant Owner App | https://table-treats-d27w.vercel.app/ |
- Project Description
- Features
- Architecture Overview
- Tech Stack
- Prerequisites
- Setup Guide
- Environment Variables
- API Documentation
- Deployment
TableTreats is a full-stack application designed to:
- Let restaurant owners register and manage their restaurant details, menus, and availability
- Let customers discover restaurants and make table bookings
- β Provide a straightforward onboarding flow for restaurant owners
- β Allow customers to search restaurants by location, cuisine, rating, price range, and special features
- β Support bookings with time slots, party size, and booking confirmation
- β Be easy to run locally and simple to deploy
- π Sign up / Sign in (email/password authentication)
- π Browse restaurants with photos and details
- π― Filter and search (location, cuisine, price, rating, availability)
- π View menu images and restaurant details (hours, address, contact)
- π Make, view, or cancel bookings
- π§ Receive booking confirmation
- π³ Pay bills
- π Register and claim owner account
- πͺ Create and manage restaurant profile (name, address, opening hours)
- π Add menus images, and ambiance images
- πͺ Configure seating arrangements
- π View booking history along with total customers and total revenue
- π Create and manage deals/promotions
- π§Ύ Create bills for customers
TableTreats/
βββ .gitignore
βββ README.md
βββ package.json
βββ requirements.txt
β
βββ backend/
β βββ requirements.txt
β βββ app/
β βββ __init__.py
β βββ config.py
β βββ database.py
β βββ main.py
β βββ routers/
β β βββ auth_customer.py
β β βββ customer_restaurant_router.py
β β βββ deals.py
β β βββ reservation_router.py
β βββ schemas/
β β βββ bill_schema.py
β β βββ customer_restaurant_schema.py
β β βββ deal_schema.py
β β βββ reservation_schema.py
β β βββ user_schema.py
β βββ services/
β β βββ bill_service.py
β β βββ customer_restaurant_service.py
β β βββ deal_service.py
β β βββ reservation_service.py
β β βββ user_service.py
β βββ utils/
β βββ auth.py
β
βββ docs/
β βββ api-specs.md
β βββ architecture.md
β
βββ frontend/
β βββ customer-app/
β β βββ public/
β β β βββ index.html
β β βββ src/
β β βββ assets/
β β βββ pages/
β β βββ services/
β β βββ App.js
β β βββ App.jsx
β β βββ index.css
β β βββ index.js
β β βββ routes.js
β β βββ package.json
β β βββ package-lock.json
β β βββ postcss.config.js
β β βββ tailwind.config.js
β β
β βββ restaurant-app/
β βββ public/
β βββ src/
β βββ api/
β βββ assets/
β βββ components/
β βββ pages/
β βββ App.jsx
β βββ App.css
β βββ index.css
β βββ main.jsx
β βββ package.json
β βββ package-lock.json
β βββ tailwind.config.js
β βββ vite.config.js
β βββ vercel.json
β
βββ restaurant_backend/
βββ __init__.py
βββ requirements.txt
βββ app/
βββ config.py
βββ connect_test.py
βββ database.py
βββ main.py
βββ models/
βββ routers/
βββ schemas/
βββ services/
- React - UI Framework
- Vite - Build tool (Restaurant App)
- Create React App - Build tool (Customer App)
- Tailwind CSS - Styling
- FastAPI - Web Framework
- Uvicorn - ASGI Server
- Motor - MongoDB Async Driver
- python-jose - JWT Encoding/Decoding
- Passlib - Password Hashing
- MongoDB Atlas - Cloud Database
- Vercel - Frontend Hosting
- Render - Backend Hosting
- Git
- Node.js (v16 or higher)
- Python 3.10+
- MongoDB Atlas Account
- Vercel Account (for frontend deployment)
- Render Account (for backend deployment)
git clone https://github.com/chirag1902/TableTreats.git
cd TableTreatscd backend
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
# Create and configure .env file
cp .env.example .env
# Start the server
uvicorn app.main:app --reload --port 8000β Customer Backend API: http://127.0.0.1:8000
cd frontend/customer-app
npm install
npm startβ Customer Frontend: http://localhost:3000
cd restaurant_backend
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
# Create and configure .env file
cp .env.example .env
# Start the server
uvicorn app.main:app --reload --port 8001β Restaurant Backend API: http://127.0.0.1:8001
cd frontend/restaurant-app
npm install
npm run devβ Restaurant Frontend: http://localhost:5173
Create a .env file in both backend/ and restaurant_backend/ directories:
# MongoDB Connection
MONGO_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/?retryWrites=true&w=majority
# JWT Configuration
JWT_SECRET=your_super_secret_key_here
JWT_ALGORITHM=HS256
JWT_EXPIRATION_HOURS=24
β οΈ Security Note: Never commit.envfiles to version control.
- Fork this repository
- Connect your GitHub to Vercel
- Import the project
- Set the root directory to
frontend/customer-apporfrontend/restaurant-app - Configure environment variables
- Deploy
- Create a new Web Service on Render
- Connect your GitHub repository
- Set the root directory to
backendorrestaurant_backend - Build Command:
pip install -r requirements.txt - Start Command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Add environment variables
- Deploy