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.
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:
-
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.
-
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.
-
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.
| 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 |
|---|---|
![]() |
![]() |
- 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.
| 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 |
This repository is organized into two main sub-folders, each containing its own README.md with specific setup instructions.
To get the full system running, you must set up the Backend first, followed by the Mobile App.
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.mdfile.
- Server: Use XAMPP (or a similar stack).
- Database: Create a MySQL database (e.g.,
food_ordering_system) and import thedatabase_schema.sqlfile. - Config: Configure your database credentials in
DB Connection/db_connect.php. (Adb_connect.example.phpis provided). - Run: Place the folder in
htdocsand start your Apache/MySQL servers.
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.mdfile.
- IDE: Open the
Mobile Appfolder in Android Studio. - Firebase: Add your own
google-services.jsonfile from Firebase to theapp/directory. - API URL: Update the
BASE_URLin the app's code (e.g., inConstants.java) to point to your live backend API. - Run: Build and run the app on an emulator or physical device.
- Institution: National Academy of Science and Technology (NAST), Dhangadhi, Kailali
- Affiliation: Pokhara University
- Hem Raj Joshi
- Mr. Sunil Bahadur Bist (Lecturer, Department of Computer Engineering, NAST)










