A modern, full-featured restaurant application with integrated ordering system, table reservations, and admin dashboard. Built with React, FastAPI, TypeScript, Prisma, and PostgreSQL.
- Landing Site (
restaurant.com): Marketing and conversion-focused landing page - Restaurant App (
app.restaurant.com): Menu browsing, ordering, reservations, and admin dashboard - Unified Backend: FastAPI serving both landing and web applications
- Mobile-First Design: Optimized for mobile ordering experience
- Online Food Ordering: Complete cart, checkout, and order tracking system
- Table Reservations: Real-time availability and booking management
- Takeaway Orders: Scheduled pickup with time slot selection
- Catering Services: Event catering requests and management
- Food Planner: Meal planning with nutritional tracking
- Menu Management: Dynamic menu with categories, variants, and add-ons
- Order Processing: Real-time kitchen display and order tracking
- Customer Management: Profiles, order history, and loyalty program
- Analytics Dashboard: Sales reports, popular items, and performance metrics
- Payment Processing: Multiple payment methods with Stripe integration
- Node.js 18+ and npm/yarn/pnpm (for frontend)
- Python 3.11+ (for backend)
- Docker and Docker Compose (for database)
- Git
- Landing Site (
apps/landing/) - Marketing website with React + Vite - Web Application (
apps/web/) - Main restaurant app with React + Vite - React 18 - UI library with TypeScript
- Vite - Lightning-fast build tool and dev server
- shadcn/ui - Accessible and customizable component library
- Tailwind CSS - Utility-first CSS framework
- React Router v6 - Client-side routing for SPA
- Clerk React - Authentication UI components
- Framer Motion - Smooth animations and transitions
- React Hook Form + Zod - Form handling and validation
- TanStack Query - Data fetching, caching, and synchronization
- Zustand - State management for cart and user data
- Axios - HTTP client for API communication
- FastAPI - High-performance Python web framework
- Pydantic - Data validation and settings management
- Prisma - Type-safe database ORM (Python client)
- PostgreSQL - Relational database for restaurant data
- Python-Jose[cryptography] - JWT token verification
- HTTPX - HTTP client for external API integration
- Python-Multipart - File uploads for menu images
- Pillow - Image processing and optimization
- Uvicorn - ASGI server for production
- Python-dotenv - Environment variables management
- WebSockets - Real-time order updates and notifications
- Stripe - Payment processing for orders
- Twilio - SMS notifications for order updates
- SendGrid - Email notifications and confirmations
- Google Maps API - Delivery zone mapping and distance calculation
- Docker - Containerization for consistent environments
- Docker Compose - Multi-container orchestration
- Nginx - Reverse proxy and static file serving
- pnpm - Efficient package management for monorepo
- ESLint + Prettier - Code quality and formatting
- Husky - Git hooks for code quality
- GitHub Actions - CI/CD pipeline automation
git clone https://github.com/yourusername/restaurant-app.git
cd restaurant-app# Install all dependencies
pnpm installcd apps/landing
npm installcd apps/web
npm installcd apps/backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt# Copy environment files
cp .env.example .env
cp apps/landing/.env.example apps/landing/.env.local
cp apps/web/.env.example apps/web/.env.local
cp apps/backend/.env.example apps/backend/.envRestaurant Apps .env.local (both landing and web):
VITE_API_URL=http://localhost:5000/api/v1
VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_clerk_key
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_key
VITE_GOOGLE_MAPS_API_KEY=your_maps_api_keyRestaurant Backend .env:
DATABASE_URL="postgresql://postgres:password@localhost:5432/restaurant_db"
PORT=5000
SECRET_KEY="your-super-secret-jwt-key"
CLERK_JWKS_URL=https://your-restaurant.clerk.accounts.dev/.well-known/jwks.json
STRIPE_SECRET_KEY=sk_test_your_stripe_secret
TWILIO_ACCOUNT_SID=your_twilio_sid
SENDGRID_API_KEY=your_sendgrid_key# From project root - start PostgreSQL with Docker
docker-compose up -d postgres
# Wait for database to be ready
sleep 30cd apps/backend
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev --name restaurant_init
# Seed with sample restaurant data (optional)
python -m scripts.seed_restaurant_data# From project root
pnpm devcd apps/backend
source venv/bin/activate # On Windows: venv\Scripts\activate
uvicorn main:app --reload --port 5000cd apps/landing
npm run dev # Runs on port 3000cd apps/web
npm run dev # Runs on port 5173- Landing Site: http://localhost:3000
- Restaurant App: http://localhost:5173
- Menu & Ordering: http://localhost:5173/menu
- Admin Dashboard: http://localhost:5173/admin
- API Documentation: http://localhost:5000/docs
- Alternative API Docs: http://localhost:5000/redoc
restaurant-app/
βββ apps/ # Restaurant applications
β βββ landing/ # Marketing/Landing site
β β βββ src/
β β β βββ components/ # Landing page components
β β β β βββ Hero.tsx # Hero section
β β β β βββ Features.tsx # Features section
β β β β βββ Pricing.tsx # Pricing section
β β β β βββ CTA.tsx # Call-to-action
β β β βββ pages/ # Page components
β β β βββ styles/ # Landing-specific styles
β β βββ public/ # Static assets
β β
β βββ web/ # Main restaurant application
β β βββ src/
β β β βββ components/ # UI components
β β β β βββ common/ # Shared UI components
β β β β βββ menu/ # Menu browsing components
β β β β βββ cart/ # Shopping cart components
β β β β βββ order/ # Order management components
β β β β βββ reservation/ # Table reservation components
β β β β βββ admin/ # Admin dashboard components
β β β βββ pages/ # Page components
β β β β βββ dashboard/ # User dashboard
β β β β βββ menu/ # Menu pages
β β β β βββ order/ # Order pages
β β β β βββ reservation/ # Reservation pages
β β β β βββ admin/ # Admin pages
β β β βββ hooks/ # Custom React hooks
β β β βββ services/ # API services
β β β βββ stores/ # Zustand state stores
β β β βββ types/ # TypeScript definitions
β β βββ public/ # Static assets
β β
β βββ backend/ # Restaurant API server
β βββ app/
β β βββ api/ # API route handlers
β β β βββ menu/ # Menu management endpoints
β β β βββ orders/ # Order processing endpoints
β β β βββ reservations/ # Reservation endpoints
β β β βββ admin/ # Admin-only endpoints
β β β βββ auth/ # Authentication endpoints
β β βββ core/ # Core configuration
β β βββ models/ # Pydantic data models
β β βββ services/ # Business logic services
β βββ prisma/ # Database schema & migrations
β βββ scripts/ # Database seeding scripts
β βββ main.py # FastAPI entry point
βββ docs/ # Documentation
β βββ restaurant/ # Restaurant-specific docs
β β βββ PROJECT_OVERVIEW.md # Architecture overview
β β βββ FEATURES.md # Feature specifications
β β βββ RESTAURANT_DATABASE.md # Database schema
β β βββ RESTAURANT_API.md # API documentation
β β βββ UI_COMPONENTS.md # Component library
β β βββ ADMIN_FEATURES.md # Admin dashboard guide
β β βββ IMPLEMENTATION_GUIDE.md # Step-by-step guide
β β βββ QUICK_START.md # Rapid setup guide
β βββ original/ # Original template docs
βββ docker/ # Docker configurations
β βββ nginx/ # Nginx reverse proxy
β βββ volumes/ # Persistent data storage
βββ docker-compose.yml # Development orchestration
βββ pnpm-workspace.yaml # Monorepo configuration
pnpm dev- Start all restaurant services (landing + web + backend)pnpm build- Build all applications for productionpnpm lint- Run ESLint on all projectspnpm format- Format all code with Prettierpnpm test- Run tests across all packages
npm run dev- Start landing site development server (port 3000)npm run build- Build for production deploymentnpm run preview- Preview production build locallynpm run lint- Run ESLint for code qualitynpm run type-check- TypeScript type checking
npm run dev- Start restaurant app development server (port 5173)npm run build- Build for production deploymentnpm run preview- Preview production build locallynpm run lint- Run ESLint for code qualitynpm run type-check- TypeScript type checking
uvicorn main:app --reload- Start API development server (port 5000)uvicorn main:app- Start production API serverpytest- Run backend testsblack .- Format Python coderuff check .- Lint Python codenpx prisma generate- Generate Prisma clientnpx prisma migrate dev- Run database migrationsnpx prisma studio- Open database GUIpython -m scripts.seed_restaurant_data- Seed with sample menu data
- Copy environment file
cp .env.example .env- Start all restaurant services
# From project root - starts everything
docker-compose up -dThis will start:
- PostgreSQL database (port 5432) - Restaurant data storage
- Redis cache (port 6379) - Session and cart caching
- Restaurant Backend API (port 5000) - FastAPI server
- Landing Site (port 3000) - Marketing website
- Restaurant Web App (port 5173) - Main application
- pgAdmin (port 5050) - Database management interface
- Set up restaurant database
# Wait for services to start
sleep 30
# Run database migrations
docker-compose exec backend npx prisma migrate dev
# Seed with sample restaurant data
docker-compose exec backend python -m scripts.seed_restaurant_data- Access your restaurant app
- Landing site: http://localhost:3000
- Restaurant app: http://localhost:5173
- Admin dashboard: http://localhost:5173/admin
- API docs: http://localhost:5000/docs
All persistent restaurant data is stored in docker/volumes/:
- PostgreSQL data:
docker/volumes/postgres/- Menu items, orders, reservations - Redis data:
docker/volumes/redis/- Session data and cart state - pgAdmin config:
docker/volumes/pgadmin/- Database GUI settings - File uploads:
docker/volumes/uploads/- Menu item images and assets
# Start all restaurant services
docker-compose up -d
# View real-time logs
docker-compose logs -f backend # API server logs
docker-compose logs -f frontend # React app logs
docker-compose logs -f postgres # Database logs
# Stop all services
docker-compose down
# Restart specific service
docker-compose restart backend
# Clean database (careful - removes all restaurant data!)
docker-compose down -v
rm -rf docker/volumes/postgres
# Backup restaurant data
tar -czf restaurant-backup-$(date +%Y%m%d).tar.gz docker/volumes/
# Restore from backup
tar -xzf restaurant-backup-20240101.tar.gz
# Production deployment
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -dConfigure your restaurant database in backend .env:
DATABASE_URL="postgresql://postgres:password@localhost:5432/restaurant_db"This project uses a two-app restaurant architecture:
-
Landing Site (
restaurant.com)- Marketing and conversion-focused
- Fast loading single-page site
- Call-to-action for app signup
-
Restaurant Web App (
app.restaurant.com)- Menu browsing and online ordering
- Table reservations and takeaway orders
- User accounts and order history
- Integrated admin dashboard at
/admin
-
Restaurant Backend API
- Unified FastAPI server serving both applications
- Menu management and order processing
- Real-time order tracking and notifications
- Payment processing and customer management
Clerk handles customer authentication with JWT verification:
Frontend Configuration:
VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_restaurant_keyBackend JWT Verification:
CLERK_JWKS_URL=https://your-restaurant.clerk.accounts.dev/.well-known/jwks.json
SECRET_KEY="your-super-secret-jwt-key"Stripe integration for order payments:
STRIPE_SECRET_KEY=sk_test_your_stripe_secret
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishableConfigure notification services:
# SMS notifications for order updates
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_token
# Email confirmations
SENDGRID_API_KEY=your_sendgrid_key
# Delivery zone mapping
GOOGLE_MAPS_API_KEY=your_maps_api_key- π Project Overview - Architecture and system design
- π Features Guide - Complete feature specifications based on Figma
- ποΈ Database Schema - Restaurant-specific database design
- π API Documentation - All restaurant API endpoints
- π¨ UI Components - Component library and design system
- π¨βπΌ Admin Features - Complete admin dashboard guide
- π§ Implementation Guide - Step-by-step development guide
- β‘ Quick Start - 15-minute setup guide
- General Architecture - System design patterns
- Deployment Guide - Production deployment instructions
- UI Specification - Base design system
- Admin Dashboard - General admin patterns
cd apps/landing
npm run test
npm run test:e2e
npm run type-checkcd apps/web
npm run test
npm run test:e2e
npm run test:coverage
npm run type-checkcd apps/backend
# Run API tests
pytest
# Test specific modules
pytest tests/test_orders.py
pytest tests/test_menu.py
# Run with coverage
pytest --cov=app tests/- Customer Journey: Browse menu β Add to cart β Checkout β Track order
- Reservation Flow: Check availability β Book table β Receive confirmation
- Admin Workflow: Login β Manage menu β Process orders β View analytics
See Implementation Guide for detailed production deployment.
- Use Docker Compose with production configuration
- Set up managed PostgreSQL database
- Configure domain and SSL certificates
- Fork the restaurant app repository
- Create your feature branch (
git checkout -b feature/new-restaurant-feature) - Make your changes following the restaurant app patterns
- Test your changes with the restaurant workflows
- Commit your changes (
git commit -m 'Add new restaurant feature') - Push to the branch (
git push origin feature/new-restaurant-feature) - Open a Pull Request with a detailed description
- Follow the restaurant domain patterns established in the codebase
- Add tests for new restaurant features (orders, menu, reservations)
- Update relevant documentation in
docs/restaurant/ - Ensure mobile-first responsive design for customer experience
This project is licensed under the MIT License - see the LICENSE file for details.
- Figma Design: Restaurant app design inspiration
- Icons: Heroicons and Lucide React
- Images: Unsplash for sample food photography
- UI Components: shadcn/ui component library
- Restaurant Inspiration: Modern food delivery and restaurant management platforms
- Documentation: Check restaurant-specific guides
- Issues: Create issues for bugs or feature requests
- Discussions: Use GitHub Discussions for restaurant app questions
- Email: support@your-restaurant-domain.com
- Quick Start: Follow the 15-minute setup guide
- Full Implementation: Use the comprehensive implementation guide
- Customize: Adapt the features to your restaurant's specific needs
- Deploy: Launch your restaurant's digital ordering platform
Happy cooking and coding! π½οΈπ¨βπ»
