Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍽️ BiteRush — Online Food Ordering System

A full-featured online food ordering web application built with vanilla PHP, MySQL, and JavaScript. Users can browse a menu, add items to cart, place orders, and track delivery status in real time. Admins have a dedicated dashboard to manage menu items, categories, and order statuses.


🛠️ Technologies Used

Layer Technology
Backend PHP 8+ (Vanilla, No Framework)
Database MySQL / MariaDB
Frontend HTML5, CSS3, Vanilla JavaScript
Server Apache (XAMPP / WAMP / Laragon)
Architecture MVC-inspired (Models, Views, Controllers)

✨ Features

Customer Side

  • User Registration & Login — Secure authentication with bcrypt hashing and "Remember Me" cookie support
  • Browse Menu — View available food items organized by categories with search functionality
  • Add to Cart — Session-based cart with quantity control (add, update, remove) via AJAX
  • Checkout & Place Order — Enter delivery address, choose payment method, and confirm order
  • Order Tracking — Real-time order status polling (Pending → Preparing → Out for Delivery → Delivered)
  • Order History — View all past orders with item details
  • Profile Management — Update name, email, delivery address, and change password

Admin Panel

  • Dashboard — Overview of total orders, revenue, and recent activity
  • Manage Orders — View, filter, and advance order statuses
  • Manage Menu Items — Add, edit, delete items with image upload (JPEG/PNG, max 2 MB)
  • Manage Categories — Create, edit, and delete food categories
  • Toggle Availability — Instantly mark items as available or unavailable

🏗️ Build Process

This project was built step-by-step following an MVC-inspired architecture:

  1. Database Design — Defined the relational schema with 5 core tables: users, categories, menu_items, orders, and order_items.
  2. Backend Models — Created PHP model classes (User, Category, MenuItem, Order, Cart) encapsulating all database operations using PDO with prepared statements.
  3. Controllers — Built controllers for auth, profile, checkout, orders, and admin actions to handle business logic and routing.
  4. API Endpoints — Developed JSON API routes (/api/cart/, /api/orders/, /api/checkout/, /api/toggle.php) for AJAX interactions.
  5. Views & UI — Designed a modern, responsive UI with custom CSS — separate stylesheets for the storefront and admin panel.
  6. Frontend JS — Added interactive features (cart updates, menu search, order status polling, admin status controls) using vanilla JavaScript and Fetch API.
  7. Admin Panel — Built a full admin dashboard with sidebar navigation, data tables, and form-based CRUD for menu/category management.
  8. Image Uploads — Implemented secure file upload with MIME-type validation and unique filename generation.

🚀 How to Run the Project

Prerequisites

  • XAMPP (or WAMP / Laragon) with Apache & MySQL running
  • PHP 8.0+
  • A web browser

Steps

  1. Clone the repository into your localhost root directory:

    cd C:/xampp/htdocs
    git clone https://github.com/Junayed37/online-food-ordering-system.git "Online Food Ordering System"
  2. Import the database:

    • Open phpMyAdmin
    • Click Import → select the file food_ordering_system.sql from the project root
    • Click Go — this creates the database, tables, and sample data automatically
  3. Start Apache & MySQL from the XAMPP Control Panel.

  4. Open in browser:

    http://localhost/Online Food Ordering System/public/index.php
    
  5. Default Admin Login:

    Email:    admin@gmail.com
    Password: password
    

💡 How It Can Be Improved

  • Payment Gateway Integration — Add real payment processing (e.g., SSLCommerz, bKash, Stripe)
  • Email Notifications — Send order confirmation and status update emails to customers
  • Restaurant Multi-Tenancy — Support multiple restaurant vendors with separate dashboards
  • Delivery Personnel Module — Assign riders to orders with GPS-based live tracking
  • Ratings & Reviews — Let customers rate food items and leave reviews
  • Coupons & Discounts — Implement promo code system with percentage/flat discounts
  • PWA & Push Notifications — Make the app installable and send real-time browser notifications
  • REST API Refactor — Build a proper RESTful API to support a mobile app (React Native / Flutter)
  • Security Enhancements — Add CSRF protection, rate limiting, input sanitization middleware
  • Testing — Introduce unit tests and integration tests with PHPUnit
  • Containerization — Add Docker setup for one-command deployment

📝 License

This project is open-source and available for educational purposes.


Built with ❤️ in Bangladesh

About

A full-stack online food ordering system built with vanilla PHP, MySQL & JavaScript. Features user auth, menu browsing, cart, checkout, order tracking, and a complete admin panel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages