Skip to content

HemJoshi111/online-food-ordering-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FoodHub - A Full-Stack Food Ordering System

Backend Mobile Database Frontend Styling Architecture

This repository contains the complete source code for "Food Ordering System," a full-stack project developed for the partial fulfillment of the Bachelor of Computer Engineering degree at the National Academy of Science and Technology (NAST).

The project's goal is to create a complete digital ecosystem that connects customers with local restaurants through a mobile app and a web-based admin panel. It digitizes the ordering process, reduces manual errors, and provides an efficient platform for both customers and restaurant owners.


πŸ›οΈ System Architecture

The system is built on a classic 3-tier architecture, consisting of a client layer, a server/business logic layer, and a database layer.

The system is divided into three primary components:

  1. Backend (PHP RESTful API):

    • The central "brain" of the operation.
    • Built with PHP and MySQL.
    • It handles all business logic, user authentication, order processing, and database interactions.
    • It serves data in JSON format to both the web portals and the Android app.
  2. Web Portals (Admin & Restaurant):

    • A web-based application built with PHP, HTML, CSS, JavaScript, and Tailwind CSS.
    • It serves two distinct roles:
      • Super Admin: Manages the overall system, with the primary function of approving or rejecting new restaurant applications.
      • Restaurant Admin: Allows restaurant owners to manage their menus (CRUD), view incoming orders, and update order statuses.
  3. Mobile App (Customer):

    • A native Android application built with Java.
    • Follows the MVVM (Model-View-ViewModel) architecture for a clean and maintainable codebase.
    • Uses Retrofit for network calls, Glide for image loading, and SharedPreferences for session/cart management.
    • Allows customers to browse, search, add to cart, and place orders.


πŸ“Έ Screenshots

Web Login Super Admin Dashboard Restaurant Dashboard
Web Register Restaurants Order Management Profile
Mobile App Login Customer Sign Up App Home Screen
Browse & Filter Menus Customer Orders History

✨ Core Features (System-Wide)

  • Role-Based Access: Three distinct roles (Customer, Restaurant Admin, Super Admin) with separate interfaces and permissions.
  • Full Order Lifecycle: A complete workflow for a customer to place an order, the restaurant to process it, and the customer to receive updates.
  • Real-time Push Notifications: Uses Firebase Cloud Messaging (FCM) to send instant order status updates to the customer's Android device.
  • Restaurant Approval System: A secure workflow where new restaurants must register and be manually approved by the Super Admin to maintain a trusted ecosystem.
  • Secure Authentication: Passwords are hashed using Bcrypt (password_hash()). The system uses session-based auth for the web and a token-based approach for the mobile API.
  • Dynamic Menu & Restaurant Management: Restaurants have full CRUD control over their menus and categories.
  • Order History & Tracking: Customers can view their past and active orders with their current status.

πŸ›  Tech Stack Summary

Component Technology
Backend API PHP 8+ (Modular structure), RESTful principles
Database MySQL (via MariaDB in XAMPP)
Web Portals HTML5, CSS3, JavaScript, Tailwind CSS
Mobile App Native Android (Java), MVVM, Retrofit, Glide, SharedPreferences
Notifications Firebase Cloud Messaging (FCM)
Development Env XAMPP, Android Studio, VS Code

πŸ“ Repository Structure

This repository is organized into two main sub-folders, each containing its own README.md with specific setup instructions.

πŸš€ Getting Started

To get the full system running, you must set up the Backend first, followed by the Mobile App.

1. Backend & Web Portal Setup

The web portals and API must be running on a server (e.g., XAMPP) for the mobile app to connect.

➑️ For detailed instructions, see the Web Portals/readme.md file.

  1. Server: Use XAMPP (or a similar stack).
  2. Database: Create a MySQL database (e.g., food_ordering_system) and import the database_schema.sql file.
  3. Config: Configure your database credentials in DB Connection/db_connect.php. (A db_connect.example.php is provided).
  4. Run: Place the folder in htdocs and start your Apache/MySQL servers.

2. Mobile App Setup

Once the backend is live and you have its IP address or URL, you can configure the Android app.

➑️ For detailed instructions, see the Mobile App/readme.md file.

  1. IDE: Open the Mobile App folder in Android Studio.
  2. Firebase: Add your own google-services.json file from Firebase to the app/ directory.
  3. API URL: Update the BASE_URL in the app's code (e.g., in Constants.java) to point to your live backend API.
  4. Run: Build and run the app on an emulator or physical device.

πŸŽ“ Project Details

  • Institution: National Academy of Science and Technology (NAST), Dhangadhi, Kailali
  • Affiliation: Pokhara University

πŸ§‘β€πŸ’» Authors

  • Hem Raj Joshi

Supervisor

  • Mr. Sunil Bahadur Bist (Lecturer, Department of Computer Engineering, NAST)

About

🍴 Complete Food Ordering System with web portal for restaurant management (PHP, MySQL) and Android app for customers (Java).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors