Connecting Local Home Chefs with Food Lovers
A full-stack food delivery platform built with Django and React, designed to bring authentic home-cooked meals from local chefs directly to your doorstep.
Features β’ Setup β’ Documentation β’ Demo β’ Contributing
ChefSync is a comprehensive food delivery ecosystem that enables home chefs to monetize their culinary skills by connecting them with customers who crave authentic, homemade meals. The platform facilitates the entire journey from menu discovery to order tracking, ensuring a seamless experience for all stakeholders.
- Multi-role Platform: Serves customers, chefs, delivery partners, and administrators
- Location-Based Services: GPS tracking, route optimization, and real-time delivery updates
- AI-Powered Features: Intelligent food recommendations and interactive chat assistant
- Comprehensive Order Management: From cart to delivery with real-time status tracking
- Document Verification System: Secure document upload and admin approval workflow
- Analytics & Reporting: Detailed insights for chefs and administrators
- π Smart Shopping Cart - Easy-to-use cart with item management
- π Multi-Address Support - Save and manage multiple delivery locations
- π± Real-Time Order Tracking - Track your order from kitchen to doorstep
- β Rating & Reviews - Share your dining experience
- π Order Notifications - Stay updated on your order status
- π° Flexible Payment - Cash on delivery support
- π Menu Management - Create and manage your food offerings
- π Kitchen Dashboard - Monitor incoming orders and preparation schedule
- π΅ Earnings Tracking - Track revenue and order statistics
- πΈ Bulk Menu Upload - Efficiently add multiple items with images
- π Kitchen Location Management - Set up and manage multiple kitchen locations
- β° Preparation Time Management - Set realistic time estimates
- πΊοΈ Dual Navigation System - Integrated map + Google Maps for optimal routing
- π¦ Order Management - Accept, pick up, and deliver orders efficiently
- π° Earnings Dashboard - Track deliveries and earnings
- π Pickup & Delivery Tracking - Navigate to chefs and customers
- π Direct Communication - Contact chefs and customers with one tap
- β User Approval System - Review and approve chef/delivery partner applications
- π Document Management - Secure document review and verification
- π Analytics Dashboard - Platform-wide metrics and insights
- π― AI-Powered Insights - Automated report generation and recommendations
- π‘οΈ User Management - Comprehensive user administration tools
- π³ Order Oversight - Monitor and manage all platform orders
- Framework: Django 5.2.5 (Python 3.11+)
- Database: MySQL 8.0
- API: Django REST Framework
- Authentication: JWT (JSON Web Tokens) + OAuth 2.0
- Storage: Cloudinary (Image/Media Management)
- Background Tasks: Django APScheduler
- PDF Processing: pdf2image, PyPDF2
- Email Service: Brevo SMTP
- Framework: React 18.3.1 with TypeScript
- Build Tool: Vite
- State Management: Zustand
- UI Components: Shadcn/UI (Radix UI primitives)
- Styling: Tailwind CSS
- Forms: React Hook Form + Zod validation
- Routing: React Router v6
- Maps: Google Maps API
- AI Chat: Google Gemini API
- Version Control: Git
- Package Managers: pip, npm
- PDF Utilities: Poppler (Windows installation required)
Before you begin, ensure you have the following installed:
| Requirement | Version | Description |
|---|---|---|
| Python | 3.11+ | Backend runtime |
| Node.js | 18+ | Frontend runtime |
| MySQL | 8.0+ | Database server |
| Git | Latest | Version control |
| Poppler | Latest | PDF processing (Windows) |
Note: For Windows users, install Poppler from the official repository. Extract to
C:\poppler\and addC:\poppler\binto your PATH.
git clone https://github.com/yourusername/chefsync.git
cd chefsynccd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Copy environment template
cp env.example .env
# Edit .env file with your configuration
# See Environment Variables section below
# Run migrations
python manage.py migrate
# Create superuser (optional)
python manage.py createsuperuser
# Start development server
python manage.py runserverThe backend server will run on http://127.0.0.1:8000
cd frontend
# Install dependencies
npm install
# Copy environment template
cp .env.example .env.local
# Edit .env.local with your API keys
# See Environment Variables section below
# Start development server
npm run devThe frontend application will run on http://localhost:8081
Create a .env file in the backend directory:
# Django Settings
SECRET_KEY=your-super-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
# Database Configuration
DB_NAME=chefsync_db
DB_USER=root
DB_PASSWORD=your-mysql-password
DB_HOST=localhost
DB_PORT=3306
# Email Configuration (Brevo SMTP)
EMAIL_HOST_USER=your-email@domain.com
EMAIL_HOST_PASSWORD=your-smtp-password
DEFAULT_FROM_EMAIL=noreply@chefsync.com
# Google OAuth
GOOGLE_OAUTH_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET=your-google-client-secret
# Cloudinary (Media Storage)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Google AI (Gemini)
GOOGLE_AI_API_KEY=your-google-ai-api-key
# CORS Configuration
CORS_ALLOWED_ORIGINS=http://localhost:8081,http://127.0.0.1:8081Create a .env.local file in the frontend directory:
# API Configuration
VITE_API_BASE_URL=http://127.0.0.1:8000/api
# Google OAuth
VITE_GOOGLE_OAUTH_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
# Google Maps API
VITE_GOOGLE_MAPS_API_KEY=your-google-maps-api-key
# Google AI API
VITE_GOOGLE_AI_API_KEY=your-google-ai-api-key
# App Information
VITE_APP_NAME=ChefSync
VITE_APP_VERSION=1.0.0ChefSync integrates with several Google services to enhance functionality:
-
Google Maps API - Location services, address autocomplete, route planning
- Get your key from Google Cloud Console
- Enable Maps JavaScript API and Places API
-
Google OAuth 2.0 - Social authentication
- Enable Google Identity API
- Configure authorized origins and redirect URIs
- Google AI (Gemini) - AI chat assistant
- Get your key from Google AI Studio
- Visit
/setupin the application for interactive API configuration - Or manually add keys to
frontend/.env.local - Restart the development server
Note: The app works without API keys but with limited functionality. Location-based features require Google Maps API.
ChefSync/
βββ backend/ # Django Backend
β βββ apps/
β β βββ authentication/ # User authentication & JWT
β β β βββ models.py # User, JWTToken, EmailOTP
β β β βββ views.py # Auth endpoints
β β β βββ services/ # JWT, Email services
β β β βββ management/ # Django commands
β β βββ users/ # User profiles
β β β βββ models.py # Customer, Chef, Delivery profiles
β β β βββ views.py # Profile management
β β βββ food/ # Food management
β β β βββ models.py # Food, Cuisine, Category
β β β βββ views.py # Menu endpoints
β β β βββ cloudinary_utils.py # Image handling
β β βββ orders/ # Order processing
β β β βββ models.py # Order, OrderItem
β β β βββ views.py # Order management
β β β βββ services/ # Order logic
β β βββ payments/ # Payment handling
β β βββ admin_management/ # Admin features
β β βββ analytics/ # Analytics & reporting
β β βββ communications/ # Notifications
β βββ config/ # Django settings
β β βββ settings.py # Main configuration
β β βββ urls.py # URL routing
β β βββ middleware.py # Custom middleware
β βββ templates/emails/ # Email templates
β βββ utils/ # Shared utilities
β βββ scripts/ # Utility scripts
β βββ requirements.txt # Python dependencies
β βββ manage.py
β
βββ frontend/ # React Frontend
β βββ src/
β β βββ components/ # Reusable components
β β β βββ auth/ # Auth components
β β β βββ layout/ # Nav, Footer, Sidebar
β β β βββ admin/ # Admin components
β β β βββ cook/ # Chef components
β β β βββ delivery/ # Delivery components
β β β βββ ui/ # Shadcn/UI components
β β βββ pages/ # Page components
β β β βββ auth/ # Login, Register
β β β βββ admin/ # Admin dashboard
β β β βββ cook/ # Chef dashboard
β β β βββ customer/ # Customer pages
β β β βββ delivery/ # Delivery dashboard
β β βββ services/ # API services
β β βββ store/ # State management
β β βββ context/ # React Context
β β βββ hooks/ # Custom hooks
β β βββ types/ # TypeScript types
β β βββ utils/ # Utilities
β βββ public/ # Static assets
β βββ package.json # Dependencies
β βββ vite.config.ts # Vite config
β
βββ docs/ # Additional documentation
βββ README.md # This file
βββ LICENSE # MIT License
- Registration: Multi-step process with email verification
- Email Verification: OTP-based system (6-digit code)
- Role Selection: Choose Customer, Chef, or Delivery Partner
- Document Upload: Required for Chefs and Delivery Partners
- Admin Approval: Manual review for privileged roles
- JWT Token Issuance: Secure access and refresh tokens
- Automatic Token Refresh: Seamless session management
- π JWT Authentication - Secure token-based auth
- π Token Blacklisting - Immediate revocation of compromised tokens
- π‘οΈ Rate Limiting - Protection against brute force
- π Account Locking - Temporary suspension after failed attempts
- π Password Hashing - Bcrypt with Django's password validators
- π§ Email Verification - OTP-based email confirmation
- π« CSRF Protection - Cross-site request forgery prevention
- π Input Validation - Comprehensive form validation
- π Document Security - Secure cloud storage with access control
- Comprehensive Workflow: Cart β Placed β Confirmed β Preparing β Ready β Out for Delivery β Delivered
- Real-Time Updates: Status changes broadcasted instantly
- Payment Tracking: Independent payment status management
- Auto-Cancellation: Unconfirmed orders automatically cancelled after 15 minutes
- Delivery Fee Calculation: Distance-based pricing with time surcharges
- Drag & Drop Upload: Intuitive file upload interface
- Multi-Format Support: PDF, JPG, PNG, JPEG
- PDF Processing: Automatic conversion to images with validation
- Cloud Storage: Secure Cloudinary integration
- Admin Review: Document visibility control
- Proxy Download: Secure document access
- Smart Recommendations: Personalized food suggestions
- Chat Assistant: Interactive help powered by Google Gemini
- Automated Reports: AI-generated insights for administrators
- Natural Language Processing: Enhanced search capabilities
Dual Navigation System:
- Navigate (Google): Full-featured Google Maps with turn-by-turn directions
- Quick Navigate: Integrated map modal with instant access
Features:
- πΊοΈ Real-time traffic updates
- π£οΈ Route optimization
- π Multi-point routing
- π Direct contact integration
- π Pickup location detection
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register/ |
User registration |
| POST | /api/auth/login/ |
User login |
| POST | /api/auth/logout/ |
Logout & token revocation |
| POST | /api/auth/token/refresh/ |
Refresh JWT tokens |
| POST | /api/auth/send-otp/ |
Send verification OTP |
| POST | /api/auth/verify-otp/ |
Verify OTP |
| POST | /api/auth/google/login/ |
Google OAuth login |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/auth/documents/types/ |
Get document types |
| POST | /api/auth/documents/upload/ |
Upload document |
| GET | /api/auth/documents/ |
Get user documents |
| DELETE | /api/auth/documents/<id>/delete/ |
Delete document |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/orders/ |
List orders |
| POST | /api/orders/create/ |
Create order |
| GET | /api/orders/<id>/ |
Get order details |
| PUT | /api/orders/<id>/update/ |
Update order status |
| DELETE | /api/orders/<id>/cancel/ |
Cancel order |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/food/menus/ |
List menus |
| GET | /api/food/menus/<id>/ |
Get menu details |
| POST | /api/food/menus/create/ |
Create menu (Chef) |
| GET | /api/food/cuisines/ |
List cuisines |
cd backend
python manage.py testcd frontend
npm test- User registration and email verification
- Document upload (PDF and images)
- Admin approval workflow
- Login (email/password and Google OAuth)
- Order creation and tracking
- Real-time status updates
- Payment processing
- Role-based dashboard access
- Navigation features (delivery partners)
- AI chat assistant
- Set
DEBUG=Falsein environment variables - Configure production database
- Set up SSL/HTTPS certificates
- Configure production email service
- Set up Google OAuth for production domain
- Configure Cloudinary for production
- Update CORS allowed origins
- Set up monitoring and logging
- Configure backup strategy
- Enable security headers
- Set up CDN for static files
# Backend Dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# Frontend Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
CMD ["npm", "run", "preview"]We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch: `git push """
Branch Strategy:
main- Production-ready codedevelop- Development branchfeature/*- New featuresbugfix/*- Bug fixeshotfix/*- Critical fixes
- Python: Follow PEP 8 style guide
- TypeScript: Use strict mode and proper typing
- React: Use functional components with hooks
- CSS: Use Tailwind CSS utility classes
- Commits: Use conventional commit messages
- API Documentation - Complete API reference
- Google API Setup Guide - API configuration guide
- Poppler Installation - PDF processing setup
- Component Library - UI components
- Database Schema - Database structure
-
Database Connection Error
- Check database credentials in
.env - Ensure MySQL server is running
- Verify database exists
- Check database credentials in
-
CORS Error
- Verify
CORS_ALLOWED_ORIGINSin settings - Check frontend URL matches allowed origins
- Verify
-
Google OAuth Error
- Verify client ID and secret
- Check authorized origins in Google Console
- Ensure redirect URIs are configured
-
Token Refresh Error
- Check JWT settings in settings.py
- Verify token expiration times
-
PDF Processing Error
- Install Poppler utilities
- Verify Poppler is in PATH
- See Poppler Installation Guide
-
Email Not Sending
- Check SMTP configuration
- Verify Brevo credentials
- Test with console backend first
- Check existing Issues
- Create a new issue with detailed description
- Include error logs and environment details
- Provide steps to reproduce the issue
This project is licensed under the MIT License - see the LICENSE file for details.
- Django - Web framework for Python
- React - JavaScript library for UIs
- Shadcn/UI - Beautiful component library
- Tailwind CSS - Utility-first CSS framework
- Zustand - State management
- Google Cloud - Maps, OAuth, and AI services
- Cloudinary - Media management
- Brevo - Email service
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@chefsync.com
Made with β€οΈ by the ChefSync Team
β Star this repo if you find it helpful!