0% found this document useful (0 votes)
130 views145 pages

Divyareport File (Food Mania1)

The document introduces an Online Food Ordering System called Food Mania, which facilitates convenient food ordering through a user-friendly interface, secure payment options, and real-time order tracking. It categorizes the system under e-commerce, mobile applications, web development, cloud computing, and other technological domains, outlining key objects such as customers, restaurants, menus, and orders. Additionally, it discusses the benefits, challenges, and existing systems like Uber Eats and Zomato that have transformed the food delivery landscape.

Uploaded by

ankitaarya1207
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views145 pages

Divyareport File (Food Mania1)

The document introduces an Online Food Ordering System called Food Mania, which facilitates convenient food ordering through a user-friendly interface, secure payment options, and real-time order tracking. It categorizes the system under e-commerce, mobile applications, web development, cloud computing, and other technological domains, outlining key objects such as customers, restaurants, menus, and orders. Additionally, it discusses the benefits, challenges, and existing systems like Uber Eats and Zomato that have transformed the food delivery landscape.

Uploaded by

ankitaarya1207
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 145

CHAPTER 1 INTRODUCTION

INTODUCTION: ONLINE DINEORDER HUB SYSTEM (FOOD MANIA)

In today’s fast-paced world, where convenience and time-saving are paramount, online food
ordering systems have become an essential part of daily life. These platforms enable users to
browse through menus, place orders, and have food delivered directly to their doorstep with
just a few clicks, all from the comfort of their home or office.
The online food ordering system integrates modern technology with the food service industry,
providing customers with a wide variety of cuisines from various restaurants, accessible
anytime and anywhere. It simplifies the process of ordering food, eliminating the need to call
restaurants or wait in long lines.
The system typically involves a user-friendly interface, a secure payment gateway, real-time
order tracking, and options for customization, allowing customers to select their preferred
dishes, ingredients, and delivery time. For restaurant owners, this system offers a streamlined
process for managing orders, menus, inventory, and customer data, ultimately enhancing
customer satisfaction and increasing revenue.
With the rise of smartphones and internet connectivity, the online food ordering market has
grown significantly, becoming a preferred option for millions of customers globally. Whether
it's a casual meal, a special event, or a late-night craving, these platforms have revolutionized
the way we experience food delivery.

1.1 PROJECT CATEGORY:

1. The Online Food Ordering System project falls under several categories in the
context of software development and technology. The primary project categories for
an Online Food Ordering System are:
2.
1. E-Commerce Systems
 Description: The system facilitates transactions of food and beverages over
the internet, similar to other e-commerce platforms where customers can
browse, select, and purchase products online.
 Examples: Platforms like UberEats, Grubhub, and DoorDash.

2. Mobile Applications
 Description: As most food ordering is done through smartphones, the system
often falls under mobile app development. It involves creating mobile
applications for iOS or Android that allow users to browse menus, place
orders, and track deliveries.
 Examples: Native apps or hybrid apps developed for food ordering services.

3. Web Development

1
 Description: An online food ordering system can also be categorized as a
web-based application. The web development aspect involves creating
websites where customers can access the system from their computers or
laptops to order food.
 Examples: Restaurant websites with integrated ordering systems like
Domino’s Pizza.

4. Cloud Computing
 Description: Online food ordering systems typically use cloud platforms to
handle data storage, transaction processing, and scalability. This category
focuses on cloud-based solutions for managing large volumes of user data,
menu items, orders, and delivery tracking.
 Examples: Amazon Web Services (AWS), Google Cloud, or Microsoft Azure
used to host the application.

5. Data Analytics and Customer Relationship Management (CRM)


 Description: This category involves using customer data to analyze food
preferences, ordering patterns, and customer satisfaction to improve the
system and offer personalized services.
 Examples: Data analytics for predicting popular dishes, seasonal menu
recommendations, and customer loyalty programs.

6. Logistics and Supply Chain Management


 Description: Online food ordering systems are integrated with logistics
management to track deliveries and optimize routes for food delivery. This
category includes integrating GPS and real-time tracking to improve the
efficiency of food delivery services.
 Examples: Integration with delivery services like Postmates, UberEats, or in-
house logistics systems for restaurants.

7. Artificial Intelligence (AI) and Machine Learning (ML)


 Description: Many advanced online food ordering systems use AI and ML
algorithms to recommend food based on past orders, customer preferences, or
popular choices. They may also use chatbots for customer service and support.
 Examples: AI-driven recommendations, voice ordering assistants, and
chatbots for customer queries.

8. Payment Gateway Integration


 Description: The system also falls under the payment gateway and financial
technologies category. It involves integrating secure online payment methods
for order transactions, ensuring secure and seamless payment experiences for
customers.
 Examples: Integration with services like PayPal, Stripe, or local payment
systems for handling transactions.

2
Each of these categories plays a critical role in the development, functioning, and
optimization of an Online Food Ordering System. The project may overlap between
several categories depending on its features and the technological infrastructure used.

1.2 OBJECTS:
In an Online Food Ordering System, the concept of "objects" refers to the key entities or
components that interact within the system. These objects represent real-world or digital
elements that the system manipulates to facilitate food ordering, delivery, and management
processes. Below are the key objects in such a system:
1. Customer
 Description: Represents a person who places an order through the system.
 Attributes:
 Customer ID
 Name
 Email
 Phone Number
 Address
 Payment details
 Functions:
 Browse the menu
 Place orders
 Track orders
 Make payments
 Rate and review restaurants/food
2. Restaurant
 Description: Represents a food establishment that offers menu items for customers to
order.
 Attributes:
 Restaurant ID
 Name
 Address
 Cuisine type
 Contact information
3
 Available menu items
 Functions:
 Display menu items
 Update menu or pricing
 Accept orders
 Prepare and dispatch orders
3. Menu
 Description: Represents the list of food items available for customers to order.
 Attributes:
 Item ID
 Name
 Description
 Price
 Category (e.g., starters, main course, desserts)
 Ingredients
 Availability (in stock or out of stock)
 Functions:
 Show food options
 Allow customers to customize orders (e.g., adding or removing ingredients)
 Provide dietary information (e.g., vegetarian, vegan, gluten-free)
4. Order
 Description: Represents a customer's food order, which includes items and related
details.
 Attributes:
 Order ID
 Customer ID (refers to the customer who made the order)
 Restaurant ID (refers to the restaurant fulfilling the order)
 List of ordered menu items
 Total price
 Order status (e.g., pending, preparing, out for delivery, completed)
 Delivery address

4
 Functions:
 Place order
 Update order status
 Calculate total price and taxes
 Track order status in real time
5. Payment
 Description: Represents the transaction made for an order, including the method of
payment.
 Attributes:
 Payment ID
 Order ID (links to the order being paid for)
 Payment amount
 Payment method (credit card, PayPal, cash on delivery, etc.)
 Payment status (success, failed, pending)
 Payment timestamp
 Functions:
 Process payments securely
 Validate payment methods
 Record and confirm payment
6. Delivery
 Description: Represents the process and logistics of delivering food from the
restaurant to the customer.
 Attributes:
 Delivery ID
 Order ID (links to the order being delivered)
 Delivery address
 Delivery status (e.g., dispatched, in transit, delivered)
 Estimated delivery time
 Delivery person (driver ID)
 Functions:
 Assign a delivery driver

5
 Track delivery route and progress
 Update delivery status
 Handle issues like delays or order cancellations
7. Delivery Person (Driver)
 Description: Represents the individual responsible for delivering the order to the
customer.
 Attributes:
 Driver ID
 Name
 Contact information
 Vehicle details (optional)
 Current delivery status
 Functions:
 Receive assigned orders for delivery
 Update status of the delivery (e.g., picked up, on the way)
 Communicate with the customer in case of issues
8. Admin (System Administrator)
 Description: Represents the backend user who manages the system, including the
restaurant menu, customer orders, and payment details.
 Attributes:
 Admin ID
 Name
 Email
 Role/Permissions
 Functions:
 Manage customer accounts
 Update restaurant menus
 Process refunds and cancellations
 Generate reports (sales, customer activity)
 Maintain system security and functionality
9. Review

6
 Description: Represents feedback given by customers regarding their food order,
restaurant experience, or delivery service.
 Attributes:
 Review ID
 Customer ID (refers to the customer who gave the review)
 Restaurant ID (refers to the restaurant being reviewed)S
 Rating (1–5 stars)
 Comments or feedback
 Functions:
 Submit feedback
 Display customer reviews on restaurant pages
 Report inappropriate content

 Functions:
 Apply discounts to orders
 Validate coupon usage
 Track coupon usage and expiration
These objects are interrelated, and each one plays a crucial role in the efficient functioning of
the system. Proper interaction and management of these objects help ensure a smooth and
satisfying user experience, from placing the order to receiving the delivery.

1.3 Identification:

The Online Food Ordering System is a digital platform that allows customers to browse
menus, place food orders, and have them delivered or prepared for pick-up from restaurants
or food vendors. It involves several components and technologies working together to enable
a seamless experience for both customers and food providers. Below is a breakdown of the
key aspects of identifying the Online Food Ordering System:

1. Key Features:

 Menu Browsing: Customers can view a variety of menu items offered by different
restaurants, categorized by type (e.g., appetizers, main courses, desserts).

7
 Order Customization: Users can modify their food orders by adding or removing
ingredients, selecting portion sizes, or choosing preferences like extra toppings or
dietary requirements (e.g., vegetarian, gluten-free).
 Secure Payment Gateway: Multiple payment methods (credit/debit cards, digital
wallets, or cash on delivery) are supported to ensure safe and seamless transactions.
 Real-Time Order Tracking: Customers can track the status of their orders, including
the preparation and delivery stages, in real-time via the app or website.
 Order History & Repeat Orders: Registered users can access their previous orders
and quickly reorder their favorite meals with minimal effort.
 Customer Reviews and Ratings: Customers can rate their food, the service, and
provide feedback to help future users make informed decisions.
 Discounts and Coupons: Special offers, loyalty rewards, and discount coupons can
be applied to orders to encourage repeat business and attract new customers.

3. Components of the System:

 User Interface (UI): The front-end design of the application (either web-based or
mobile app) that customers interact with. It is intuitive, easy to navigate, and
responsive.
 Backend Server: The server handles user requests, processes orders, updates the
menu, and manages data such as user profiles, payment transactions, and order status.
 Restaurant Dashboard: A platform for restaurant owners to manage their menu
items, track orders, update stock, and manage customer feedback.
 Delivery System: Integration with delivery drivers or services that help in real-time
tracking of food deliveries and ensure timely and accurate order fulfillment.
 Database Management: Stores customer data, restaurant details, payment records,
order history, and feedback. Ensures data security and smooth operation of the
platform.

4. Stakeholders Involved:

 Customers: The end-users who place the orders, customize their meals, make
payments, and receive deliveries. Their feedback and experience play a critical role in
system optimization.
 Restaurants: Food vendors that provide menu items, accept orders, and prepare the
food. They rely on the system to increase their customer base and streamline their
operations.
 Delivery Personnel: Individuals or third-party services who pick up the orders from
restaurants and deliver them to customers. Their efficiency directly impacts customer
satisfaction.
 System Admin/Operators: Manage the platform's functionality, monitor system
performance, ensure smooth transactions, and address issues like order cancellations
or refunds.

8
5. Technologies Involved:

 Mobile and Web Applications: Developed using technologies like React, Angular, or
Vue.js (for frontend) and Node.js, Django, or Ruby on Rails (for backend). These
platforms are built to be user-friendly and scalable.
 Database Management: Relational databases (e.g., MySQL, PostgreSQL) or NoSQL
databases (e.g., MongoDB) are used to store and manage large volumes of user and
transaction data.
 Payment Gateway Integration: Payment processors like Stripe, PayPal, or local
banks enable secure online payments. Integration of SSL certificates ensures the
security of financial transactions.
 GPS and Mapping Services: GPS services (e.g., Google Maps, Mapbox) help in
real-time tracking of orders, and optimized routing for delivery drivers to ensure the
most efficient path.
 Cloud Infrastructure: Cloud platforms like Amazon Web Services (AWS), Microsoft
Azure, or Google Cloud are used for hosting the system, ensuring scalability, and
maintaining uptime during high traffic.

6. Benefits of the System:

 Convenience: Customers can place orders anytime, anywhere, eliminating the need to
make calls or visit restaurants in person.
 Wide Variety: Access to a broad range of cuisines and restaurants, making it easier
for customers to discover new foods.
 Time-Saving: Streamlined ordering and payment processes, faster preparation and
delivery times, and a simplified system for managing repeat orders.
 Business Growth: For restaurants, an online ordering system opens new sales
channels, increases visibility, and provides valuable customer data for targeted
marketing.
 Cost Efficiency: Reduces the need for phone-based order taking, minimizes errors,
and improves delivery logistics through automation.

7. Challenges:

 Delivery Logistics: Ensuring timely and accurate delivery, managing traffic, and
dealing with unpredictable delivery conditions can be challenging.
 Customer Support: Handling customer complaints, order issues, or refunds in a
timely and efficient manner is crucial to maintain satisfaction.
 Data Security: Ensuring user data, especially payment and personal details, is
protected from breaches or cyber-attacks.
 Restaurant Coordination: Synchronizing orders between multiple restaurants,
managing inventory, and ensuring quality control can be complex, especially with
large volumes of orders.

9
1.4 EXISTING SYSTEM:
Several well-established platforms have revolutionized the online food ordering experience,
providing convenient, reliable, and user-friendly systems for customers to order food and
have it delivered to their doorstep. These existing systems have become dominant players in
the market, offering a range of features for both customers and restaurant owners. Below are
some of the most popular and successful existing online food ordering systems:

1. Uber Eats
 Overview: Uber Eats is one of the largest and most popular online food ordering and
delivery platforms globally. It operates in numerous countries and offers a wide
variety of restaurant choices.
 Key Features:
 User-Friendly Interface: Customers can browse menus, read reviews, and
place orders easily.
 Real-Time Tracking: Customers can track the delivery progress in real-time.
 Payment Integration: Multiple payment methods, including credit/debit
cards, PayPal, and Uber wallet, are supported.
 Order Customization: Users can customize their orders by selecting different
food options or adding special instructions.
 Delivery Tracking: Real-time GPS tracking of the delivery driver.
 Technology: Uber Eats uses cloud-based infrastructure to ensure scalability and high
availability. The system is mobile-first with apps for iOS and Android, and the
website is responsive.

5. Zomato
 Overview: Zomato is a popular restaurant discovery and food delivery platform in
India and several other countries. It started as a restaurant review platform and later
expanded into food delivery.
 Key Features:
 Restaurant Discovery: Helps users discover new restaurants based on
location, type of cuisine, and ratings.
 Online Ordering and Delivery: Allows users to place food orders from
restaurants directly through the app.
 Cashless Transactions: Supports online payments through various methods.

10
 Restaurant Reviews: Provides detailed customer reviews and restaurant
ratings.
 Subscription Service (Zomato Pro): Offers exclusive discounts and offers to
subscribers at participating restaurants.
 Technology: Zomato uses a combination of native mobile applications (iOS and
Android) and a web platform, backed by a cloud-based infrastructure for scalability.
 Technology: Swiggy uses a robust back-end system built with Python and
Ruby on Rails. The mobile apps are developed with modern frameworks such
as React Native and Kotlin.

1.5 PROPOSED SYSTEM :

The proposed Online Food Ordering System aims to improve the overall user experience,
streamline restaurant operations, and enhance delivery efficiency by integrating new features,
advanced technologies, and user-centric design. The system will provide a robust and
scalable platform for customers, restaurant owners, and delivery personnel to ensure a
seamless, secure, and efficient process from placing an order to delivery.

Key Components of the Proposed System


The system can be broken down into several key components, each focusing on different
stakeholders and processes involved in the online food ordering experience:
1. Customer Interface (Web & Mobile Application)
The Customer Interface will allow users to interact with the platform, browse menus, place
orders, track deliveries, and provide feedback.
Key Features:
 User Registration & Login: Customers can create accounts, log in, and securely save
their preferences, addresses, and payment details.
 Menu Browsing & Search: Users can browse through restaurant menus, search for
specific dishes, and filter results based on cuisine, price, ratings, etc.
 Order Customization: Customers can customize their orders (e.g., toppings, portion
sizes, special instructions) before placing an order.
 Real-Time Order Tracking: Customers can track their orders in real time, from
preparation to delivery.
 Payment Gateway Integration: Secure payment options for credit/debit cards,
mobile wallets (e.g., Google Pay, Apple Pay), and cash on delivery.

11
 Ratings and Reviews: After receiving their orders, customers can rate their food and
delivery experience, helping future customers make informed decisions.
 Order History & Quick Reorder: Customers can view past orders and easily reorder
their favorite meals with a few clicks.
 Notifications: Push notifications or SMS alerts about order status updates (order
confirmation, preparation, dispatch, and delivery).
 Loyalty Programs & Discounts: Customers can earn points, receive promotional
discounts, and use coupons for special deals.
Technologies:
 Frontend: React Native/Flutter for mobile apps
(iOS/Android), React.js/Angular for web.
 Backend: Node.js, Django, or Ruby on Rails.
 Database: PostgreSQL/MySQL for customer data, orders, and payment records.
 Payment Integration: Stripe, Razorpay, PayPal.

2. Restaurant Interface
The Restaurant Interface will be a platform for restaurant owners to manage their menus,
process orders, track inventory, and communicate with customers.
Key Features:
 Restaurant Registration & Dashboard: Restaurant owners can register on the
platform, manage their profile, and customize their menu (add, update, or remove
dishes).
 Order Management: Restaurants can receive, accept, and process orders in real-time,
along with customer details.
 Menu Management: Update prices, descriptions, availability, and special offers,
including the ability to mark items as unavailable if out of stock.
 Order Status Updates: Restaurants can update the order status (e.g., preparing, ready
for delivery) in real-time to notify customers.
 Analytics & Reporting: Restaurant owners can view sales reports, customer reviews,
popular dishes, and customer demographics.
 Inventory Management: Track stock levels and receive alerts for low inventory,
helping restaurants to manage supplies effectively.
 Customer Communication: Direct communication tools (chat or call) to resolve
order issues, queries, or special requests.
Technologies:

12
 Frontend: React.js or Vue.js for restaurant web interface.
 Backend: Node.js or Django for order processing, notifications, and data
management.
 Database: MongoDB/PostgreSQL to store menu items, order data, inventory, and
restaurant details.

3. Delivery Personnel Interface


The Delivery Personnel Interface will enable delivery drivers to manage their tasks,
optimize routes, and ensure timely deliveries.
Key Features:
 Driver Registration: Drivers can register on the platform, complete their profiles,
and undergo verification for safety and security.
 Assigned Deliveries: The system will assign deliveries to drivers based on their
location, availability, and proximity to the restaurant.
 Route Optimization: Using GPS, the system will suggest the best routes for drivers
to ensure quick and efficient delivery.
 Real-Time Tracking: Customers can track the driver’s location and estimated
delivery time.
 Order Status Update: Drivers will update the system when they pick up the order,
during transit, and upon successful delivery.
 Payment & Earnings Tracking: Delivery personnel can view their earnings, tips,
and request payment for completed deliveries.
 Driver Ratings & Feedback: After delivery, customers can rate the delivery service
and provide feedback on the driver’s performance.
Technologies:
 Mobile App: React Native/Flutter for cross-platform compatibility.
 GPS and Mapping: Integration with Google Maps API, Mapbox,
or OpenStreetMap for route optimization and real-time tracking.
 Notification System: Firebase Cloud Messaging (FCM) for push notifications.

4. Admin Interface (System Administrator)


The Admin Interface will provide an overarching control panel for administrators to manage
users, restaurants, payments, and system-wide operations.
Key Features:

13
 User Management: Admins can monitor and manage both customer and restaurant
accounts, handle disputes, and ensure compliance with platform rules.
 Order Monitoring: Admins can view real-time updates on all orders, including
customer complaints, delivery delays, or canceled orders.
 Payment & Transaction Management: Monitor payment flows, manage refunds,
disputes, and track financial reports.
 System Analytics & Reports: Generate reports on platform usage, sales, top
restaurants, and customer behavior.
 Promotions & Discounts: Admins can create and manage promotional campaigns,
coupon codes, and discounts across the platform.
 Security and Privacy: Admins can ensure the security of customer data, monitor
unauthorized activities, and maintain GDPR compliance.
Technologies:
 Admin Dashboard: React.js or Angular for responsive admin panels.
 Backend: Node.js or Django for handling admin functionalities.
 Database: PostgreSQL/MySQL for secure data storage and management.

Technological Stack
 Frontend:
 Mobile App: React Native or Flutter for building cross-platform
applications.
 Web App: React.js, Vue.js, or Angular for a dynamic, responsive web
application.
 Backend:
 Node.js or Django for building scalable APIs and handling requests.
 GraphQL (optional) for optimized data querying.
 WebSocket for real-time updates, especially for order tracking.
 Database:
 PostgreSQL/MySQL for relational data (customer info, orders, payments).
 MongoDB (optional) for flexible, non-relational data storage (restaurant
menus, reviews).
 Cloud & Hosting:
 AWS, Google Cloud, or Microsoft Azure for cloud hosting, file storage, and
scalability.

14
 Payment Gateway:
 Stripe, Razorpay, PayPal for secure transactions.
 Geolocation & Mapping:
 Google Maps API or Mapbox for location tracking, route optimization, and
map displays.
 Notifications:
 Firebase Cloud Messaging (FCM) for push notifications.

CHAPTYER 2 REQUIREMENT AND SYSTEM ANALYSIS

2.1 Functional Requirements


These are the core functionalities that the system must provide to its users.
A. Customer Module
 User Registration and Authentication:
 Customers should be able to sign up, log in, and manage their profiles.
 Authentication should be secured using email/password or social media logins
(Google, Facebook).
 Menu Browsing:
 Customers should be able to view menus categorized by restaurant, cuisine,
type (e.g., vegetarian, vegan, non-vegetarian), and price.
 They should be able to search for specific items or restaurants.
 Order Placement:
 Customers should be able to select dishes, customize orders (e.g., extra
toppings, special requests), and add them to the cart.
 Ability to place orders for delivery or pick-up.
 Order Customization:
 Allow customers to modify the order, such as selecting portion size, changing
ingredients, or specifying cooking preferences.

15
 Payment Integration:
 Integration with secure payment gateways (e.g., Stripe, PayPal, local payment
methods).
 Support for multiple payment options: credit/debit cards, digital wallets, and
cash on delivery.
 Order Tracking:
 Real-time tracking of the order from preparation to delivery.
 Provide estimated delivery time and real-time updates on order status.
 Reviews and Ratings:
 After receiving the order, customers should be able to leave feedback about
the food, restaurant, and delivery service.
 Order History and Reordering:
 Customers should be able to view past orders and reorder their favorites with a
single click.
 Notifications:
 Push notifications for order confirmation, updates, and delivery status.
 Promotions & Discounts:
 Ability to use coupons, discounts, or loyalty points during checkout.

B. Restaurant Module
 Restaurant Registration and Profile Management:
 Allow restaurants to register, update their profile, and manage business details
like hours of operation, contact info, and location.
 Menu Management:
 Restaurants can add, update, or remove menu items, adjust prices, and indicate
availability.
 Order Management:
 Restaurants should be able to view and manage incoming orders, mark orders
as accepted, being prepared, or ready for delivery.
 Order Notification:
 Restaurants should receive instant notifications when a new order is placed.
 Inventory Management:

16
 Integration to track inventory levels, manage stock, and receive alerts when
ingredients run low.
 Analytics and Reporting:
 View sales reports, popular dishes, and customer trends to help make data-
driven decisions.
 Customer Communication:
 Allow communication with customers via chat or phone in case of order
modifications, issues, or clarifications.

C. Delivery Module
 Delivery Personnel Registration:
 Delivery drivers can register on the platform and provide necessary
identification for verification.
 Order Assignment:
 Delivery drivers are assigned orders based on proximity, availability, and
traffic conditions.
 Route Optimization:
 The system suggests optimal delivery routes to drivers using GPS integration
(e.g., Google Maps, Mapbox).
 Real-Time Updates:
 Drivers should update the system with the delivery status (e.g., picked up, in
transit, delivered).
 Earnings Management:
 Delivery personnel should be able to view their earnings, tips, and payment
history.
 Delivery Ratings:
 After completing the delivery, drivers can be rated by customers to maintain
high service standards.

D. Admin Module
 System Administration and User Management:
 Admin can manage customer, restaurant, and delivery personnel accounts.
 Ability to suspend, activate, or block users for violations.
 Payment Management:

17
 Admin can oversee all transactions, monitor payments, handle disputes, and
process refunds.
 Promotions and Discounts Management:
 Admin can create and manage promotional campaigns, coupons, and special
offers for restaurants and customers.
 Analytics and Reporting:
 Admin has access to real-time data for overall system performance, sales,
order volume, popular restaurants, customer behavior, etc.
 System Monitoring and Security:
 Continuous monitoring of the platform’s security, data integrity, and user
activity.
 Admin should be able to configure security measures like 2-factor
authentication for users.

2. Non-Functional Requirements

These requirements define how the system performs and the qualities it must have.
A. Performance Requirements
 Scalability: The system should be able to handle a large number of users, orders, and
restaurant listings without degradation in performance. This includes both the website
and mobile app (iOS/Android).
 Fast Response Time: The system should provide quick responses (under 2 seconds
for page loads and order submissions) to ensure a smooth user experience.
 High Availability: The system should be available 24/7 with minimal downtime. Use
of cloud platforms and load balancing to ensure fault tolerance and uptime.
 Concurrency: The system should be able to handle simultaneous orders and
interactions from multiple users without data loss or slowdowns.
B. Security Requirements
 Data Encryption: All sensitive data, especially payment details and user information,
should be encrypted using SSL/TLS protocols to prevent unauthorized access.
 Secure Authentication: Use secure login mechanisms such as OAuth or multi-factor
authentication for both customers and restaurant owners.
 Transaction Integrity: The system should guarantee that financial transactions are
secure and accurately processed without errors or fraud.

18
 Privacy Compliance: The system must adhere to data privacy regulations like GDPR
(General Data Protection Regulation) for users' personal and payment data.
C. Usability Requirements
 User-Friendly Interface: The system’s interface should be simple, intuitive, and
responsive across all devices (desktop, tablet, and mobile).
 Multilingual Support: The system should support multiple languages to cater to
users from diverse geographic regions.
 Accessibility: The platform must comply with accessibility standards (WCAG 2.1) to
ensure that it is usable by people with disabilities.
D. Reliability Requirements
 Error Handling: The system should handle errors gracefully and provide clear
messages to users in case of issues (e.g., order failure, payment decline).
 Backup and Recovery: Implement regular data backups and a disaster recovery plan
to ensure minimal data loss in case of system failures.
E. Maintainability Requirements
 Modular Design: The system architecture should be modular to allow easy updates,
addition of new features, and scalability as the system grows.
 Logging and Monitoring: Implement logging for system events and continuous
monitoring for performance bottlenecks and potential security issues.

2.1 FEASIBILITY STUDY

A feasibility study is essential in determining whether a project, like an Online Food


Ordering System, is viable from technical, economic, operational, and legal perspectives.
The study helps in identifying any potential challenges that might arise during the
development and implementation of the system and evaluates whether the investment
required is justified. Below is a detailed feasibility study for an online food ordering system:

1. Technical Feasibility
Technical feasibility assesses whether the proposed system can be developed using existing
technology and infrastructure. It looks at the software, hardware, and technical expertise
required for the system.
A. Technologies and Platform
 Web and Mobile Platforms:
 The system will operate as a web application (accessible via browsers) and
mobile applications for iOS and Android. Mobile apps can be built using

19
frameworks like React Native or Flutter, while the web platform can be built
using technologies like HTML5, CSS, and JavaScript, with backend
technologies like Node.js,.
 Database Management:
 The system will require databases to store user information, orders, restaurant
menus, reviews, payments, and delivery tracking data. Relational
databases like MySQL or PostgreSQL and NoSQL
databases like MongoDB or Firebase will be suitable.
 Third-Party Integrations:
 Payment Gateways like Stripe, PayPal, or Razorpay will be integrated for
secure payments.
 Real-time Notifications: Services like Firebase Cloud Messaging for push
notifications.
 Geolocation & Mapping: APIs like Google Maps or Mapbox for real-time
tracking of deliveries.
B. Development Team and Expertise
 The development team will require expertise in:
 Frontend development (HTML, CSS, JavaScript, React, Vue, or Angular).
 Backend development (Node.js, Python, Java, Ruby).
 Mobile development (React Native, Flutter).
 Database management (SQL/NoSQL).
 Payment and API integration.
 The team will also need UX/UI designers, QA testers, and DevOps experts for
deployment and maintenance.
C. Infrastructure Requirements
 The system will need cloud hosting (AWS, Google Cloud, or Microsoft Azure) to
scale and manage high user traffic.
 Scalability: The infrastructure should allow the system to scale as demand grows,
ensuring minimal downtime.
 Security: Implementing encryption (SSL/TLS) for payment processing and protecting
user data is crucial.
 Hardware and Infrastructure: Costs for cloud services (AWS, Google
Cloud), servers, storage, and networking.
 Licensing Fees: Payment gateway and map API integrations may come with
licensing or transaction fees.

3. Operational Feasibility

20
Operational feasibility assesses whether the organization has the ability to operate and
manage the system after development, including the resources, personnel, and procedures.
A. System Usability
 The system must be user-friendly, with simple navigation for customers, restaurant
owners, and delivery personnel.
 Customers should easily browse menus, place orders, make payments, and track
deliveries.
 Restaurant owners need an intuitive dashboard to manage their menus, orders, and
performance.
 Delivery personnel should be able to receive orders, navigate to delivery locations,
and update status with ease.
B. Support and Maintenance
 Customer Support: 24/7 customer support via live chat, email, or phone to handle
complaints, refunds, and service inquiries.
 System Maintenance: Regular software updates, bug fixes, and new feature releases
will be necessary.
 Performance Monitoring: Ongoing monitoring of system performance (uptime,
response time, order accuracy) is required to maintain quality.
C. User Adoption
 Customer adoption depends on the system’s ease of use, availability of food options,
and delivery speed.
 Restaurants will be more inclined to join the platform if they can easily manage orders
and access detailed analytics.
 Delivery personnel will need an efficient system to optimize routes and track orders in
real-time.

D. Delivery Regulations
 Delivery Logistics: Depending on the jurisdiction, there might be laws governing the
working hours of delivery personnel or the types of vehicles used for delivery.
E. Employment Regulations
 If the platform hires delivery personnel directly, compliance with labor
laws and taxation is necessary

.
2.2 SDLC (Software Development Life Cycle)

21
The Software Development Life Cycle (SDLC) is a structured approach to software
development, providing a systematic process for planning, creating, testing, and deploying a
software application. For an Online Food Ordering System, the SDLC can be broken down
into several phases that guide the development process from start to finish. Below is a
detailed overview of the SDLC applied to an Online Food Ordering System.

1. Planning Phase
The planning phase is the foundation for the project. In this phase, the project goals, scope,
and feasibility are outlined. The planning process ensures that the project has a clear
direction.
Key Activities:
 Requirement Gathering:
 Define the system’s functional requirements such as order placement, payment
processing, menu management, and delivery tracking.
 Identify non-functional requirements like performance, security, and usability.
 Feasibility Study:
 Assess technical, operational, economic, and legal feasibility of the project.
 Project Scope:
 Define the features and functionality to be included in the system, such as user
registration, payment integration, real-time tracking, and restaurant dashboard.
 Timeline and Budgeting:
 Estimate the development time, resources, and budget required.

2. System Design Phase


In this phase, the system architecture and design are created based on the requirements
defined in the planning phase.
Key Activities:
 High-Level Design:
 Define the overall architecture of the system (e.g., client-server architecture,
cloud-based infrastructure).
 Identify the key components (user interface, backend servers, databases, third-
party integrations) and how they will interact.
 Database Design:
 Design the database schema to store user data, orders, menu items, transaction
 System Security Design:

22
 Plan how the system will handle secure payments (PCI DSS compliance),
protect personal data (GDPR compliance), and ensure secure user
authentication.
 Technology Stack Selection:
 Select the frontend, backend, database, and hosting technologies based on the
system requirements (e.g., React, Node.js, MySQL, AWS).

3. Development Phase
The development phase is where the actual coding and implementation of the system take
place. This phase focuses on translating the system design into a functional application..

4. Testing Phase
The testing phase ensures the system works as expected and meets the requirements. It
identifies and resolves any bugs or issues before deployment.
Key Activities:
 Unit Testing:
 Test individual components or modules (e.g., order placement, payment
gateway integration) to ensure they work as expected.
 Integration Testing:
 Verify that different components of the system (frontend, backend, database,
APIs) work seamlessly together.
 System Testing:
 Test the entire system to ensure it meets all functional and non-functional
requirements.
 Security Testing:
 Ensure the system is secure from vulnerabilities such as SQL injection, cross-
site scripting (XSS), and payment fraud.
 User Acceptance Testing (UAT):
 Validate the system with real users (restaurant owners, delivery personnel,
customers) to ensure the system is user-friendly and meets the user needs.
 Load Testing:
 Check the system’s ability to handle a large number of simultaneous users,
particularly during peak ordering times.

5. Deployment Phase

23
The deployment phase involves making the system live for public use. It ensures that the
system is properly deployed and accessible to users.
 Conduct a soft launch to a smaller audience before making it widely available,
to gather user feedback and resolve any final issues.

6. Maintenance Phase
After deployment, the system enters the maintenance phase, where the application is
monitored, updated, and improved as needed.
Key Activities:
 Bug Fixes and Updates:
.
 System Monitoring:
 Feature Enhancements:
 . Compliance Updates:

CHAPTER 3 SYSTEM DESIGN

3.1 DFD (DATA FLOW DIAGRAM)

Online Food Ordering System is actually a type of software that allows the manager of
restaurants to manage and accept the placed orders over the Internet or in the restaurant. Let
us understand the working of the food ordering system by using DFD (Data Flow Diagram).
DFD for Food Ordering System is shown below.

Level 0 DFD –

24
At this level, the Input and Output of the system are shown. The system is designed and
established across the world with input and output at this level.

Level 0: Context Diagram


 Customer: The end-user who orders food online.
 Restaurant: The food provider who processes orders.
 Payment Gateway: A third-party system to handle payments securely.
 Delivery Personnel: The individual responsible for delivering the food.
System:
 Online Food Ordering System: The central system that handles user orders,
restaurant menus, payments, and delivery.

Level 1 DFD
It shows the data flow between customers, restaurants, the order system, and third-party
services.
Key Processes:
 Customer Registration & Login: Manages user account creation and authentication.
 Menu Browsing: Customers view available menu items from restaurants.
 Order Placement: Customers place their food order by selecting items and adding to
the cart.
 Order Processing: The system processes the order, handles payment, and notifies the
restaurant.
 Payment Processing: Interaction with payment gateways for secure transaction
handling.
 Order Assignment & Delivery: The system assigns the order to a delivery person
and tracks delivery status.

25
 Order Tracking: Customers can track the real-time status of their order.

26
Explanation of Processes in the Level 1 DFD
1. Customer Registration & Login:
 Input: Customer’s personal details (e.g., name, email, address, password).
 Output: A registered user or authenticated session to proceed with ordering.
2. Menu Browsing:
 Input: Restaurant details, items, and menu information.
 Output: Menu items displayed to the customer for order selection.
3. Order Placement:
 Input: Selected menu items, quantity, and any special instructions.
 Output: A food order placed by the customer, which is forwarded to the
restaurant for processing.
4. Payment Processing:
 Input: Payment details (e.g., credit card information).
 Output: Payment status (successful or failed), which is sent back to the
system.
 Interaction: Communicates with third-party payment gateways (e.g., Stripe,
PayPal).
5. Order Processing:
 Input: Food order details from the customer and payment status.
 Output: Confirmation of the order, notifying both the restaurant and customer.
 Interaction: Interacts with the restaurant's order management system to
update order status.
6. Restaurant Order Management:
 Input: Customer order details and updates to order status.
 Output: Order updates (e.g., “In Progress”, “Out for Delivery”).
7. Delivery Assignment:

27
 Input: Finalized order, assigned delivery personnel details.
 Output: Order assigned to delivery personnel, with delivery instructions.
8. Delivery Tracking:
 Input: Real-time location of the delivery personnel.
 Output: Real-time updates for the customer on delivery status.
 Interaction: Provides tracking information through integration with services
like Google Maps.

Level 2 DFD
The Level 2 DFD further decomposes specific processes from Level 1 into sub-
processes. For example, the Order Placement process could be broken down into
sub-processes like:

 Add Item to Cart


 View Cart

28
 Proceed to Checkout
 Apply Promo Code
 Confirm Order
The Order Processing process could be broken down into:
 Check Inventory
 Validate Payment
 Notify Restaurant
 Send Confirmation to Customer
The Delivery Assignment process could include:
 Assign Delivery Personnel
 Track Delivery Location
 Update Delivery Status

ADMIN SIDE DFD:

29
3.3 USER INTERFACE DESIGN

Below is an outline of the key components and features of the UI Design for an Online Food
Ordering System, broken down into multiple sections for clarity.

1. Home Page / Landing Page


Objective: The homepage should provide a welcoming, user-friendly experience, guiding
users to quickly begin their food ordering journey.
Features:
 Search Bar: A prominent search bar at the top for customers to quickly search for
their favorite dishes, cuisines, or restaurants.
 Restaurant/Cuisine Categories: Display popular restaurants and food categories
(e.g., Italian, Chinese, Vegan).
 Sign-Up/Login Button: Easy access for returning users to log in and for new users to
register.
 Promotions & Discounts: Highlight current offers or discounts with banners or
carousels.
 Location Input: Customers can input or select their delivery location to view
restaurants or menus available in their area.
 Navigation Menu: Accessible at the top, leading to sections
like Menu, Orders, Profile, Cart, and Contact.

30
1. Menu Page

Objective: Display the restaurant menu items in an organized and visually appealing
way, allowing users to browse and select their items.
Features:
 Restaurant Name and Details: At the top of the page, display the restaurant name,
ratings, and a brief description.
 Menu Categories: Organize food into clear categories (e.g., Appetizers, Main
Course, Desserts, Beverages).
 Item Filters: Allow customers to filter by dietary preferences, such as vegetarian,
gluten-free, etc.
 Item Images: Display images of food items to encourage selection.
 Add to Cart Button: Each item should have an "Add to Cart" button to allow users
to select multiple items.
 Pricing: Clear display of item prices and any additional charges.
 Special Offers: Display combo meals, discounts, or special offers at the top or in a
dedicated section.

31
2. Cart Page

Objective: Allow customers to review their selected items before proceeding to


checkout.
Features:
 Item List: Display all selected items with quantities, prices, and total amount.
 Modify Quantity: Enable customers to adjust quantities or remove items.
 Item Details: Show detailed information for each item (e.g., ingredients, allergens,
special requests).
 Promotions/Discounts: Allow users to apply promo codes or vouchers for discounts.
 Estimated Delivery Time: Display estimated delivery time or availability.
 Proceed to Checkout Button: Prominent button for users to go to the checkout
process.
 Total Price: Clearly display the subtotal, taxes, and total amount.

4. Checkout Page
Objective: Allow customers to finalize their order with payment, delivery, and billing
information.
Features:
 Customer Information: Fields for the user to enter their delivery address, phone
number, and any special delivery instructions.
 Payment Options: Provide multiple payment methods (credit/debit card, PayPal,
cash on delivery, etc.).
 Order Summary: Display a summary of the order (items, quantities, total cost).
 Delivery Method: Allow users to choose between standard delivery, express delivery,
or pickup.
 Promotions: Include a space to apply any discount codes before confirming payment.
 Place Order Button: A final button to submit the order and proceed with payment.
5. Order Tracking Page
Objective: Allow customers to track the status of their order in real-time.
Features:
 Order Status: Show the current status of the order (e.g., Preparing, Out for Delivery,
Delivered).
 Order Timeline: A timeline indicating the stages of the order (e.g., Order Placed,
Preparing, Out for Delivery, Delivered).

32
 Delivery Location: Integrate a map to show the real-time location of the delivery
personnel (if possible).
 Contact Information: Display restaurant and delivery contact information in case the
customer needs support.
 Estimated Delivery Time: Update the estimated time of arrival in real-time.
6. User Profile Page
Objective: Provide users with an area to manage their account settings, view order history,
and save preferences.
Features:
 Profile Information: Allow users to edit their personal details (name, address, phone
number).
 Order History: A list of past orders with options to reorder items.
 Payment Methods: Manage stored payment options.
 Favorites: Users can save favorite restaurants or dishes for quick reordering.
 Logout Button: Easy access to log out from the system.

3.4 ER DIAGRAM

The Entity-Relationship (ER) Diagram for an Online Food Ordering System models the
relationships between different entities in the system. It defines how the data is structured and
how various components interact within the system. The key entities involved in such a
system include Users (Customers), Restaurants, Menu Items, Orders, Payments,
Delivery, and Admins.

Below is a detailed explanation of the entities and their relationships that form the ER
Diagram for the system:

33
1. User – Order Relationship: A user can place multiple orders, and each order is
associated with a user.
2. Restaurant – Menu Item Relationship: A restaurant has many menu items, which
are linked via the Menu Item entity.
3. Order – Menu Item Relationship: An order can contain multiple menu items, and
each menu item can appear in many orders, hence the many-to-many relationship.
The Order_Menu_Item join table handles this.
4. Order – Payment: Each order is tied to one payment, ensuring that the order has
been paid for before delivery.
5. Order – Delivery: Each order has one associated delivery, which includes
information about the delivery person and the delivery status.
6. Admin – Restaurant: An admin manages many restaurants, controlling their menu,
orders, and payments.
7. Delivery Personnel – Delivery: A delivery person is responsible for multiple
deliveries. They are assigned specific orders for delivery.

34
3.5 DATABASE DESIGN

Database design for an Online Food Ordering System focuses on structuring data efficiently
while supporting functionalities such as user management, restaurant details, orders,
payments, and delivery tracking. Below is an outline of the database design,
including tables, attributes, primary keys, and foreign keys that ensure referential integrity.

Entities and Tables


1. User Table (Customers)
This table stores information about the users/customers who place orders.
Table Name: users

Attribute Data Type Constraints Description

Unique
PRIMARY KEY, identifier for
user_id INT AUTO_INCREMENT each user.

Full name of
name VARCHAR(100) NOT NULL the user.

Email address
email VARCHAR(100) UNIQUE, NOT NULL for user login.

Contact number
phone_number VARCHAR(15) NOT NULL of the user.

Delivery
address for the
address TEXT NOT NULL user.

Hashed
password for
password VARCHAR(255) NOT NULL user login.

Type of user
ENUM('Regular', (Regular or
user_type 'Premium') DEFAULT 'Regular' Premium).

2. Restaurant Table
This table contains information about the restaurants available in the system.
Table Name: restaurants

35
Attribute Data Type Constraints Description

PRIMARY KEY, Unique identifier


restaurant_id INT AUTO_INCREMENT for each restaurant.

Name of the
name VARCHAR(100) NOT NULL restaurant.

Physical location
or address of the
location VARCHAR(255) NOT NULL restaurant.

Average rating of
rating DECIMAL(2,1) DEFAULT 0.0 the restaurant.

Type of cuisine
served (e.g.,
cuisine_type VARCHAR(50) NOT NULL Italian, Chinese).

Contact
information of the
contact_info VARCHAR(100) NOT NULL restaurant.

3. Menu Item Table


This table stores the menu items available at each restaurant.
Table Name: menu_items

Attribute Data Type Constraints Description

Unique
identifier for
PRIMARY KEY, each menu
menu_item_id INT AUTO_INCREMENT item.

Reference to
the restaurant
FOREIGN KEY offering the
restaurant_id INT (restaurants.restaurant_id) menu item.

Name of the
name VARCHAR(100) NOT NULL food item.

Description
of the food
description TEXT NULL item.

Price of the
price DECIMAL(8,2) NOT NULL food item.

category ENUM('Appetizer', NOT NULL Category of

36
Attribute Data Type Constraints Description

'Main Course',
'Dessert', 'Beverage') the food item.

Ingredients
used in the
ingredients TEXT NULL dish.

4. Order Table
This table stores information about each order placed by customers.
Table Name: orders

Attribute Data Type Constraints Description

Unique
PRIMARY KEY, identifier for
order_id INT AUTO_INCREMENT each order.

Reference to
the user
FOREIGN KEY placing the
user_id INT (users.user_id) order.

Reference to
the restaurant
FOREIGN KEY being
restaurant_id INT (restaurants.restaurant_id) ordered from.

Date and
time when
the order was
order_date DATETIME NOT NULL placed.

Total cost of
total_amount DECIMAL(8,2) NOT NULL the order.

ENUM('Pending',
'In Progress', Current
'Delivered', status of the
order_status 'Cancelled') NOT NULL order.

Delivery
address for
delivery_address TEXT NOT NULL the order.

Payment
ENUM('Paid', status of the
payment_status 'Unpaid', 'Failed') NOT NULL order.

37
5. Order Menu Item Table (Join Table)
This table stores the relationship between orders and menu items, capturing which menu
items belong to which order.
Table Name: order_menu_items

Data
Attribute Type Constraints Description

Reference to the
order_id INT FOREIGN KEY (orders.order_id) order.

FOREIGN KEY Reference to the


menu_item_id INT (menu_items.menu_item_id) menu item.

Quantity of the
quantity INT NOT NULL menu item ordered.

6. Payment Table
This table contains information about the payment for each order.
Table Name: payments

Attribute Data Type Constraints Description

Unique
PRIMARY KEY, identifier for
payment_id INT AUTO_INCREMENT each payment.

Reference to
FOREIGN KEY the order being
order_id INT (orders.order_id) paid for.

Total amount
amount DECIMAL(8,2) NOT NULL paid.

ENUM('Credit
Card', 'PayPal', Payment
payment_method 'Cash on Delivery') NOT NULL method used.

Date and time


of the
payment_date DATETIME NOT NULL payment.

ENUM('Paid', Status of the


payment_status 'Failed', 'Pending') NOT NULL payment.

7. Delivery Table
This table tracks the delivery status and information for each order.
Table Name: deliveries

38
Descriptio
Attribute Data Type Constraints n

Unique
identifier
PRIMARY KEY, for each
delivery_id INT AUTO_INCREMENT delivery.

Reference
to the order
being
order_id INT FOREIGN KEY (orders.order_id) delivered.

Reference
to the
FOREIGN KEY delivery
delivery_person_ (delivery_personnel.delivery_person person
id INT _id) assigned.

ENUM('In Current
Transit', status of
'Delivered', the
delivery_status 'Pending') NOT NULL delivery.

Estimated
DATETIM delivery
estimated_time E NOT NULL time.

Actual
DATETIM time of
delivery_time E NULL delivery.

8. Delivery Personnel Table


This table stores information about the delivery personnel who are assigned to deliver the
orders.
Table Name: delivery_personnel

Attribute Data Type Constraints Description

Unique
identifier for
PRIMARY KEY, each delivery
delivery_person_id INT AUTO_INCREMENT person.

Name of the
delivery
name VARCHAR(100) NOT NULL person.

contact_info VARCHAR(100) NOT NULL Contact details

39
Attribute Data Type Constraints Description

for the
delivery
person.

9. Admin Table
This table stores information about the admins who manage the system, including
restaurant management and order processing.
Table Name: admins

Attribute Data Type Constraints Description

PRIMARY KEY, Unique identifier


admin_id INT AUTO_INCREMENT for each admin.

Name of the
name VARCHAR(100) NOT NULL admin.

Email address for


email VARCHAR(100) UNIQUE, NOT NULL admin login.

Hashed password
password VARCHAR(255) NOT NULL for admin login.

ENUM('Manager', Role of the admin


role 'Staff') DEFAULT 'Manager' in the system.

Relationships Between Tables


1. User ↔ Order: A user can place many orders (1:N). Each order has a reference to the
user.
2. Restaurant ↔ Menu Item: A restaurant has many menu items (1:N). Each menu
item belongs to one restaurant.
3. Order ↔ Menu Item: An order can contain many menu items, and each menu item
can be part of many orders (M:N). This relationship is managed by
the order_menu_items table.
4. Order ↔ Payment: Each order has one payment (1:1). The payment table has a
foreign key to the order.
5. Order ↔ Delivery: Each order has one delivery (1:1). The delivery table has a
foreign key to the order.
6. Restaurant ↔ Admin: An admin manages many restaurants (1:N). Each restaurant
has a reference to the admin.
7. Delivery ↔ Delivery Personnel: A delivery personnel is assigned many deliveries
(1:N). Each delivery is assigned to one delivery person.

40
CHAPTER 4 IMPLEMENTATION AND TESTING

The implementation of an Online Food Ordering System involves developing the system
from a database design to a fully functional web or mobile application. This implementation
includes both the backend (server-side logic, database interaction) and frontend (user
interface for customers, admin, and restaurant management) components.
Below is a comprehensive guide for implementing such a system, including key steps,
technologies, and best practices.

1. Requirements & Technologies used


Technologies to be used:
 Frontend:
 HTML5/CSS3/JavaScript (Basic structure, styling, and dynamic
interactions)
 Bootstrap or Material-UI (For UI components and design consistency)
 Backend:
 Node.js with Express (Server-side framework to handle routing and business
logic)
 Java with Spring Boot (Alternative for server-side)
 PHP (As an option for a lighter backend framework)
 Database:
 MySQL or PostgreSQL (Relational Database Management Systems for
storing orders, users, menu items, etc.)
 MongoDB (Optional NoSQL database if scalability and flexibility are key)
 Payment Integration:
 Stripe API or PayPal SDK (For processing payments)

2. System Architecture and Components


The system consists of the following major components:
1. User Module (Customer Interface)
 User Registration & Authentication: Users can register, log in, and manage
their accounts.
 Menu Browsing: Users can browse restaurant menus and select food items.
 Order Placement: Users can add items to their cart, place orders, and specify
delivery addresses.

41
 Payment Gateway: Integration with payment providers (e.g., Stripe, PayPal)
for processing payments.
 Order Tracking: Users can view the status of their orders (e.g., Pending, In
Progress, Delivered).
2. Restaurant Module
 Restaurant Dashboard: Allows restaurant owners/managers to manage their
menus, view orders, and update order statuses.
 Menu Management: Restaurants can add/edit/remove menu items, manage
pricing, and specify availability.
 Order Management: Restaurants can accept, reject, and update orders.
3. Admin Module
 Admin Dashboard: Admins can manage users, restaurants, and monitor
orders across the system.
 User Management: Admins can block/unblock users and handle customer
support issues.
 Restaurant Management: Admins can add/edit/delete restaurants and
monitor their performance.
 Reporting: Admins can view system analytics, such as total sales, top-rated
restaurants, and user activity.
4. Delivery Module
 Delivery Assignment: Delivery personnel can accept or reject delivery
assignments.
 Delivery Tracking: Allows users and restaurants to track the status of
deliveries in real-time.

3. Database Implementation
1. Database Schema: The database schema was discussed previously. Implement the
tables using SQL, setting up primary keys, foreign keys, and relationships as
described.
2. Database Tables:
 Use CREATE TABLE statements to define the structure of each table (Users,
Restaurants, Orders, Payments, etc.).
 Ensure proper indexing for performance (e.g., on order dates, user IDs, etc.).

4.1 TECHNOLOGY USED

42
The development of an Online Food Ordering System involves integrating several
technologies to ensure that the platform is user-friendly, scalable, secure, and capable of
handling various operations like ordering, payment processing, menu management, and
delivery tracking. Below are the key technologies used in different aspects of such a system:
1. Frontend Technologies
The frontend is the user interface (UI) where customers, restaurant owners, and delivery
personnel interact with the system.
 HTML, CSS, and JavaScript:
 These are the fundamental technologies for structuring (HTML), styling
(CSS), and making the page interactive (JavaScript). They are essential for
building responsive, interactive web pages.

 CSS Frameworks:
 Bootstrap: A framework for building responsive websites quickly. It offers
pre-built components like grids, navigation, and forms.
2. Backend Technologies
The backend is responsible for processing requests, managing databases, authenticating users,
and integrating with payment and third-party services.
 Programming Languages:
 Java (Spring Boot): A widely used backend technology with excellent
performance and scalability, ideal for enterprise-grade applications.
 PHP (Laravel): A server-side scripting language that, when paired with the
Laravel framework, helps create scalable web applications quickly..
 Spring Boot (Java): A framework for building stand-alone, production-grade
Spring-based applications with minimal configurations.
3. Database Technologies
A robust database system is required to store user data, orders, menus, transactions, reviews,
and delivery tracking information.
 Relational Databases (SQL):
 MySQL: An open-source relational database system commonly used for web
applications and e-commerce platforms.
4. Payment Integration Technologies
Payment processing is a critical part of any online ordering system, and the integration of
third-party payment gateways is essential.
 Payment Gateways:
 PayPal: Another widely used gateway for processing payments securely.

43
 Razorpay: A payment gateway offering multiple payment options such as
debit/credit cards, net banking, and wallets, particularly useful for Indian
businesses.
4.2 PERT CHART
A PERT (Program Evaluation Review Technique) chart is a project
management tool used to schedule, organize, and coordinate tasks within a
project. To create a diagram with a date-based PERT chart for the FoodMania
project, we need to first define the key tasks, their dependencies, and
estimated durations. Then, we can assign start and end dates for each task.
breakdown of tasks for an online food ordering system like FoodMania:

Project Timeline Assumptions


• Project Start Date: nov-dec, 2024
• Total Duration: 8 weeks (56 days)

Tasks Breakdown:

1. Requirement Gathering and Analysis (Duration: 5 days)


2. Design the System (Duration: 10 days)
3. Database Setup (Duration: 7 days)
4. Back-end Development (Duration: 15 days)
5. Front-end Development (Duration: 12 days)
6. Integration and Testing (Duration: 7 days)
7. Deployment and Go-Live (Duration: 3 days)

Dependencies:

Task 2 depends on Task 1


Task 3 depends on Task 1.
Task 4 depends on Task 2 and Task 3.
Task 5 depends on Task 2
PERT Chart (Data Based)
Task Id Task Name Duration (Days) Start Date End Date Dependency
1 Requirement 5 02-11-2024 06-11-2024 -
Gathering
2 System Design 10 06-11-2024 15-11-2024 1
3 Database Setup 7 15-11-2024 21-11-2024 1
4 Front-End- 15 21-11-2024 03-12-2024 2,3

44
Development
5 Back-End- 12 03-12-2024 15-12-2024 2
Development
6 Integration And 7 21-12-2024 28-12-2024 4,5
Testing
7 Deployment and 3 28-12-2024 31-12-2024 6
Go-live

4.3 PROJECT SCHEDULING

Project scheduling is a crucial part of project management. It outlines the timeline and
milestones of the project, allocating sufficient time for each phase of development to ensure
the successful and timely completion of the project. Below is a comprehensive project
schedule for the development of an Online Food Ordering System.

Phases of the Project


The project can be broken down into the following phases:
1. Project Planning
2. Requirements Gathering and Analysis
3. System Design
4. Database Design
5. Frontend and Backend Development
6. Payment Integration
7. Testing
8. Deployment
9. Training and Support
10. Post-launch Monitoring and Maintenance

1. Project Planning (Week 1)


 Task 1.1: Initial Project Setup
 Define scope, objectives, and deliverables.
 Task 1.2: Risk Assessment
 Identify possible risks and mitigation strategies.

45
2. Requirements Gathering and Analysis (Week 2-3)
 Task 2.1: Stakeholder Meetings.
 Document user stories, use cases, and technical requirements.

3. System Design (Week 4-5)


 Task 3.1: High-Level System Architecture Design
 Design the overall architecture (client-server, database design, API structure).
 Task 3.2: User Interface Design
 Design wireframes and UI/UX for the customer, restaurant, and admin
interfaces.
 Create a UI design that is intuitive and responsive.
 Task 3.3: API Design and Documentation
 Define RESTful API endpoints.
 Document API contracts for integration between frontend and backend.

4. Database Design (Week 6)


 Task 4.1: Define Database Schema
 Design tables (Users, Restaurants, Menu Items, Orders, etc.).
 Set up relationships between tables and ensure data normalization.
 Task 4.2: Database Implementation
 Set up the database (MySQL, PostgreSQL, etc.) and create tables based on the
schema.

5. Frontend and Backend Development (Week 7-10)


Frontend Development (Week 7-8)
 Task 5.1: Setup Frontend Framework.
 Task 5.2: Implement User and Admin Interfaces
 Develop interfaces for customer login, registration, menu browsing, cart, and
order management.
 Develop restaurant and admin dashboards for managing menus, orders, and
payments.
 Task 5.3: Integrate API with Frontend
 Use Axios or Fetch API to communicate with backend APIs (order placement,
payment processing, order tracking).

46
Backend Development (Week 9-10)
 Task 5.4: Set Up Backend Framework
 Set up Node.js with Express or other backend frameworks (Django, Spring
Boot).
 Establish the database connection.
 Task 5.5: Implement Backend APIs
 Task 5.6: Implement Admin and Restaurant APIs
 Develop APIs for restaurant and admin management, including
adding/updating menus, tracking orders, and processing payments.

6. Payment Integration (Week 11)


 Task 6.1: Integrate Payment Gateway (e.g., Stripe, PayPal)
 Implement the payment process flow (payment processing, success, failure).
 Test with sandbox environments before going live.
 Task 6.2: Configure Webhooks for Payment Confirmation
 Set up webhook listeners to confirm payments after successful transactions.

7. Testing (Week 12-13)


 Task 7.1: Unit Testing
 Perform unit tests for backend and frontend components.
 Ensure all functions and methods are working as expected.
 Task 7.2: Integration Testing
 Test integration between frontend and backend APIs.
 Test the full order process from browsing the menu to payment processing.
 Task 7.3: User Acceptance Testing (UAT)
 Test the system with real users to ensure it meets business and functional
requirements.
 Gather feedback from stakeholders and adjust as needed.
 Task 7.4: Load Testing
 Test the system's ability to handle a high number of users and transactions
concurrently.

8. Deployment (Week 14)

47
 Task 8.1: Deployment Setup
 Set up hosting (e.g., AWS EC2, Heroku) for the backend.
 Set up hosting for the frontend (e.g., Netlify, Vercel).
 Task 8.2: Database Deployment
 Set up cloud database (e.g., AWS RDS, Heroku Postgres).
 Migrate database to production.
 Task 8.3: Final Deployment and Go-Live
 Deploy the system to production.
 Monitor the system post-deployment for any immediate issues.

9. Training and Support (Week 15)


 Task 9.1: User Training
 Provide training for users on how to place orders, track deliveries, and make
payments.
 Task 9.2: Admin and Restaurant Training
 Train restaurant owners and admins on how to manage their menus, orders,
payments, and customer data.
 Task 9.3: Documentation
 Provide user manuals, admin manuals, and API documentation.

10. Post-launch Monitoring and Maintenance (Ongoing)


 Task 10.1: Bug Fixes and Updates
 Monitor the system for bugs or issues.
 Release patches or updates as needed.
 Task 10.2: Performance Monitoring
 Use monitoring tools (e.g., Google Analytics, New Relic) to track user
activity, order volume, and system performance.
 Task 10.3: Feature Enhancements
 Based on user feedback, enhance system features, add new restaurants, and
improve the overall user experience.

Gantt Chart for Scheduling


A Gantt chart provides a visual representation of the project schedule. It will include all the
tasks, milestones, and their respective timeframes.

48
Task Start Date End Date Duration (Weeks)

Project Planning Week 1 Week 1 1

Requirements Gathering & Analysis Week 2 Week 3 2

System Design Week 4 Week 5 2

Database Design Week 6 Week 6 1

Frontend Development Week 7 Week 8 2

Backend Development Week 9 Week 10 2

Payment Integration Week 11 Week 11 1

Testing Week 12 Week 13 2

Deployment Week 14 Week 14 1

Training & Support Week 15 Week 15 1

Post-launch Monitoring & Maintenance Ongoing Ongoing Ongoing

4.3 CODING
Login code:
<!DOCTYPE html>
<html lang="en" >

<head>
<meta charset="UTF-8">
<title>Login</title>

<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?


family=Roboto:400,100,300,500,700,900|RobotoDraft:400,100,300,500,700,900'>
<link rel='stylesheet prefetch'
href='https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'>

49
<link rel="stylesheet" href="css/login.css">

<style type="text/css">
#buttn{
color:#fff;
background-color: #5c4ac7;
}
</style>

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-


fit=no">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">

</head>

<body>
<header id="header" class="header-scroll top-header headrom">
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">

50
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>

<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{

echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}

?>

</ul>
</div>
</div>
</nav>
</header>
<div style=" background-image: url('images/img/pimg.jpg');">

51
<?php
include("connection/connect.php");
error_reporting(0);
session_start();
if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = $_POST['password'];

if(!empty($_POST["submit"]))
{
$loginquery ="SELECT * FROM users WHERE username='$username' &&
password='".md5($password)."'"; //selecting matching records
$result=mysqli_query($db, $loginquery); //executing
$row=mysqli_fetch_array($result);

if(is_array($row))
{
$_SESSION["user_id"] = $row['u_id'];

header("refresh:1;url=index.php");
}
else
{
$message = "Invalid Username or Password!";
}
}

}
?>

52
<div class="pen-title">
<
</div>

<div class="module form-module">


<div class="toggle">

</div>
<div class="form">
<h2>Login to your account</h2>
<span style="color:red;"><?php echo $message; ?></span>
<span style="color:green;"><?php echo $success; ?></span>
<form action="" method="post">
<input type="text" placeholder="Username" name="username"/>
<input type="password" placeholder="Password" name="password"/>
<input type="submit" id="buttn" name="submit" value="Login" />
</form>
</div>

<div class="cta">Not registered?<a href="registration.php" style="color:#5c4ac7;">


Create an account</a></div>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

<div class="container-fluid pt-3">


<p></p>

53
</div>

<footer class="footer">
<div class="container">

<div class="bottom-footer">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png" alt="Maestro">
</a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>

54
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>

</div>
</footer>

</body>

</html>

REGISTRATION CODE:
!DOCTYPE html>
<html lang="en">
<?php

session_start();
error_reporting(0);
include("connection/connect.php");
if(isset($_POST['submit'] ))

55
{
if(empty($_POST['firstname']) ||
empty($_POST['lastname'])||
empty($_POST['email']) ||
empty($_POST['phone'])||
empty($_POST['password'])||
empty($_POST['cpassword']) ||
empty($_POST['cpassword']))
{
$message = "All fields must be Required!";
}
else
{

$check_username= mysqli_query($db, "SELECT username FROM users where


username = '".$_POST['username']."' ");
$check_email = mysqli_query($db, "SELECT email FROM users where email =
'".$_POST['email']."' ");

if($_POST['password'] != $_POST['cpassword']){

echo "<script>alert('Password not match');</script>";


}
elseif(strlen($_POST['password']) < 6)
{
echo "<script>alert('Password Must be >=6');</script>";
}
elseif(strlen($_POST['phone']) < 10)
{

56
echo "<script>alert('Invalid phone number!');</script>";
}

elseif (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL))


{
echo "<script>alert('Invalid email address please type a valid email!');</script>";
}
elseif(mysqli_num_rows($check_username) > 0)
{
echo "<script>alert('Username Already exists!');</script>";
}
elseif(mysqli_num_rows($check_email) > 0)
{
echo "<script>alert('Email Already exists!');</script>";
}
else{

$mql = "INSERT INTO


users(username,f_name,l_name,email,phone,password,address) VALUES('".
$_POST['username']."','".$_POST['firstname']."','".$_POST['lastname']."','".
$_POST['email']."','".$_POST['phone']."','".md5($_POST['password'])."','".
$_POST['address']."')";
mysqli_query($db, $mql);

header("refresh:0.1;url=login.php");
}
}

57
?>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Registration</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> </head>
<body>
<div style=" background-image: url('images/img/pimg.jpg');">
<header id="header" class="header-scroll top-header headrom">
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-
link active" href="index.php">Home <span class="sr-only">(current)</span></a>
</li>

58
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>

<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{

echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}

?>

</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">

<div class="container">
<ul>

59
</ul>
</div>

<section class="contact-page inner-page">


<div class="container ">
<div class="row ">
<div class="col-md-12">
<div class="widget" >
<div class="widget-body">

<form action="" method="post">


<div class="row">
<div class="form-group col-
sm-12">
<label for="exampleInputEmail1">User-Name</label>
<input class="form-control" type="text" name="username"
id="example-text-input">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">First Name</label>
<input class="form-control" type="text" name="firstname"
id="example-text-input">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Last Name</label>
<input class="form-control" type="text" name="lastname"
id="example-text-input-2">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Email Address</label>

60
<input type="text" class="form-control" name="email"
id="exampleInputEmail1" aria-describedby="emailHelp">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Phone number</label>
<input class="form-control" type="text" name="phone"
id="example-tel-input-3">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control"
name="password" id="exampleInputPassword1">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputPassword1">Confirm
password</label>
<input type="password" class="form-control"
name="cpassword" id="exampleInputPassword2">
</div>
<div class="form-group
col-sm-12">
<label for="exampleTextarea">Delivery Address</label>
<textarea class="form-control" id="exampleTextarea"
name="address" rows="3"></textarea>
</div>

</div>

<div class="row">
<div class="col-sm-4">
<p> <input type="submit" value="Register" name="submit"
class="btn theme-btn"> </p>
</div>

61
</div>
</form>

</div>

</div>

</div>

</div>
</div>
</section>

<footer class="footer">
<div class="container">

<div class="row bottom-footer">


<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>

62
<a href="#"> <img src="images/maestro.png" alt="Maestro">
</a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>

</div>
</footer>

</div>

<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>

63
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>

</html>

RESTAURANTS CODE:
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
error_reporting(0);
session_start();
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Restaurants</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">

64
<link href="css/style.css" rel="stylesheet"> </head>

<body>

<header id="header" class="header-scroll top-header headrom">


<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>

<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{

echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';

65
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}

?>

</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">
<div class="top-links">
<div class="container">
<ul class="row links">

<li class="col-xs-12 col-sm-4 link-item active"><span>1</span><a


href="#">Choose Restaurant</a></li>
<li class="col-xs-12 col-sm-4 link-item"><span>2</span><a
href="#">Pick Your favorite food</a></li>
<li class="col-xs-12 col-sm-4 link-item"><span>3</span><a
href="#">Order and Pay</a></li>
</ul>
</div>
</div>
<div class="inner-page-hero bg-image"
data-image-src="images/img/pimg.jpg">
<div class="container"> </div>
</div>
<div class="result-show">
<div class="container">
<div class="row">

66
</div>
</div>
</div>
<section class="restaurants-page">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-3">
</div>
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-9">
<div class="bg-gray restaurant-entry">
<div class="row">
<?php $ress=
mysqli_query($db,"select * from restaurant");

while($rows=mysqli_fetch_array($ress))
{

echo' <div class="col-sm-12 col-md-12 col-lg-8 text-xs-center text-sm-left">

<div class="entry-logo">

<a class="img-fluid" href="dishes.php?res_id='.


$rows['rs_id'].'" > <img src="admin/Res_img/'.$rows['image'].'" alt="Food logo"></a>

</div>

<!-- end:Logo -->

<div class="entry-dscr">

<h5><a href="dishes.php?res_id='.$rows['rs_id'].'" >'.


$rows['title'].'</a></h5> <span>'.$rows['address'].'</span>

67
</div>

<!-- end:Entry description -->

</div>

<div class="col-sm-12 col-md-12 col-lg-4 text-xs-center">

<div class="right-content bg-white">

<div class="right-review">

<a href="dishes.php?res_id='.
$rows['rs_id'].'" class="btn btn-purple">View Menu</a> </div>

</div>

<!-- end:right info -->

</div>';
}

?>

</div>

</div>

68
</div>

</div>
</div>
</div>
</section>

<footer class="footer">
<div class="container">

<div class="bottom-footer">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png" alt="Maestro">
</a>
</li>

69
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>

</div>
</footer>

<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>

70
</body>

</html>

Logout code:
<?php
session_start();
session_destroy();
$url = 'login.php';
header('Location: ' . $url);

?>

PRODUCT ACTION CODE:


<?php
if(!empty($_GET["action"]))
{
$productId = isset($_GET['id']) ? htmlspecialchars($_GET['id']) : '';
$quantity = isset($_POST['quantity']) ? htmlspecialchars($_POST['quantity']) : '';

switch($_GET["action"])
{
case "add":
if(!empty($quantity)) {
$stmt = $db-
>prepare("SELECT * FROM dishes where d_id= ?");
$stmt->bind_param('i',
$productId);
$stmt->execute();
$productDetails = $stmt-
>get_result()->fetch_object();

71
$itemArray = array($productDetails-
>d_id=>array('title'=>$productDetails->title, 'd_id'=>$productDetails->d_id,
'quantity'=>$quantity, 'price'=>$productDetails->price));
if(!empty($_SESSION["cart_item"]))
{
if(in_array($productDetails-
>d_id,array_keys($_SESSION["cart_item"])))
{
foreach($_SESSION["cart_item"] as
$k => $v)
{
if($productDetails->d_id == $k)
{

if(empty($_SESSION["cart_item"][$k]["quantity"]))
{

$_SESSION["cart_item"][$k]["quantity"] = 0;
}

$_SESSION["cart_item"][$k]["quantity"] += $quantity;
}
}
}
else
{
$_SESSION["cart_item"] =
$_SESSION["cart_item"] + $itemArray;
}
}
else
{
$_SESSION["cart_item"] = $itemArray;

72
}
}
break;

case "remove":
if(!empty($_SESSION["cart_item"]))
{
foreach($_SESSION["cart_item"] as $k => $v)
{
if($productId == $v['d_id'])
unset($_SESSION["cart_item"][$k]);
}
}
break;

case "empty":
unset($_SESSION["cart_item"]);
break;

case "check":
header("location:checkout.php");
break;
}
}

YOUR ORDER CODE:


<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");

73
error_reporting(0);
session_start();

if(empty($_SESSION['user_id']))
{
header('location:login.php');
}
else
{
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>My Orders</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<style type="text/css" rel="stylesheet">

.indent-small {
margin-left: 5px;
}
.form-group.internal {

74
margin-bottom: 0;
}
.dialog-panel {
margin: 10px;
}
.datepicker-dropdown {
z-index: 200 !important;
}
.panel-body {
background: #e5e5e5;
/* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-
stop(0%, #e5e5e5), color-stop(100%, #ffffff));
/* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #e5e5e5 0%, #ffffff 100%);
/* IE10+ */
background: radial-gradient(ellipse at center, #e5e5e5 0%, #ffffff 100%);
/* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5',
endColorstr='#ffffff', GradientType=1);
font: 600 15px "Open Sans", Arial, sans-serif;
}
label.control-label {
font-weight: 600;
color: #777;

75
}

/*
table {
width: 750px;
border-collapse: collapse;
margin: auto;

/* Zebra striping */
/* tr:nth-of-type(odd) {
background: #eee;
}

th {
background: #404040;
color: white;
font-weight: bold;

td, th {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
font-size: 14px;

} */ */

76
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {

/* table {
width: 100%;
}

table, thead, tbody, th, td, tr {


display: block;
} */

/* thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}

tr { border: 1px solid #ccc; } */

/* td {

border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}

td:before {
77
position: absolute;

top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;

content: attr(data-column);

color: #000;
font-weight: bold;
} */

</style>

</head>

<body>

<header id="header" class="header-scroll top-header headrom">

78
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>

<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{

echo '<li class="nav-


item"><a href="your_orders.php" class="nav-link active">My Orders</a> </li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}

?>

79
</ul>
</div>
</div>
</nav>

</header>
<div class="page-wrapper">

<div class="inner-page-hero bg-image"


data-image-src="images/img/pimg.jpg">
<div class="container"> </div>

</div>
<div class="result-show">
<div class="container">
<div class="row">

</div>
</div>
</div>

<section class="restaurants-page">
<div class="container">
<div class="row">
<div class="col-xs-12">
</div>
<div class="col-xs-12">

80
<div class="bg-gray">
<div class="row">

<table class="table table-bordered


table-hover">
<thead style = "background: #404040;
color:white;">
<tr>

<th>Item</th>
<th>Quantity</th>
<th>Price</th>
<th>Status</th>
<th>Date</th>
<th>Action</th>
<th>Update Items</th>

</tr>
</thead>
<tbody>

<?php

$query_res= mysqli_query($db,"select * from


users_orders where u_id='".$_SESSION['user_id']."'");
if(!
mysqli_num_rows($query_res) > 0 )

echo '<td colspan="6"><center>You have No orders Placed yet.


</center></td>';

81
}

else

while($row=mysqli_fetch_array($query_res))
{

?>

<tr>

<td data-column="Item"> <?php echo $row['title']; ?></td>

<td data-column="Quantity"> <?php echo $row['quantity']; ?></td>

<td data-column="price">$<?php echo $row['price']; ?></td>

<td data-column="status">

<?php

$status=$row['status'];

if($status=="" or $status=="NULL")

?>

<button type="button" class="btn


btn-info"><span class="fa fa-bars" aria-hidden="true" ></span> Dispatch</button>

<?php

82
}

if($status=="in process")

{ ?>

<button type="button"
class="btn btn-warning"><span class="fa fa-cog fa-spin" aria-hidden="true"
></span> On The Way!</button>

<?php

if($status=="closed")

?>

<button type="button" class="btn


btn-success" ><span class="fa fa-check-circle" aria-hidden="true"></span>
Delivered</button>

<?php

?>

<?php

if($status=="rejected")

?>

83
<button type="button" class="btn
btn-danger"> <i class="fa fa-close"></i> Cancelled</button>

<?php

?>

</td>

<td data-column="Date"> <?php echo $row['date']; ?></td>

<td data-column="Action"> <a href="delete_orders.php?order_del=<?


php echo $row['o_id'];?>" onclick="return confirm('Are you sure you want to cancel
your order?');" class="btn btn-danger btn-flat btn-addon btn-xs m-b-10"><i class="fa
fa-trash-o" style="font-size:16px"></i></a>

</td>

<td data-column="Action">

<!-- Add Edit Button here -->

84
<a href="edit_order.php?order_id=<?php echo $row['o_id'];?>"
class="btn btn-warning btn-flat btn-addon btn-xs m-b-10">
<i class="fa fa-edit" style="font-size:16px"></i>
</a>
</td>

</tr>

<?php }} ?>

</tbody>
</table>

</div>

</div>

</div>

85
</div>
</div>
</div>
</section>

<footer class="footer">
<div class="row bottom-footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal">
</a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png"
alt="Maestro"> </a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe">
</a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin">
</a>

86
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>

</div>
</footer>

</div>

<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>

87
</html>
<?php
}
?>
CHECKOUT CODE:
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
include_once 'product-action.php';
error_reporting(0);
session_start();

function function_alert() {

echo "<script>alert('Thank you. Your Order has been placed!');</script>";


echo "<script>window.location.replace('your_orders.php');</script>";
}

if(empty($_SESSION["user_id"]))
{
header('location:login.php');
}
else{

foreach ($_SESSION["cart_item"] as $item)

88
{

$item_total += ($item["price"]*$item["quantity"]);

if($_POST['submit'])

$SQL="insert into users_orders(u_id,title,quantity,price) values('".


$_SESSION["user_id"]."','".$item["title"]."','".$item["quantity"]."','".
$item["price"]."')";

mysqli_query($db,$SQL);

unset($_SESSION["cart_item"]);
unset($item["title"]);
unset($item["quantity"]);
unset($item["price"]);

$success = "Thank you. Your order has been placed!";

function_alert();

89
}
?>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Checkout</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> </head>
<body>

<div class="site-wrapper">
<header id="header" class="header-scroll top-header headrom">
<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-
toggle="collapse" data-target="#mainNavbarCollapse">☰</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right"
id="mainNavbarCollapse">
<ul class="nav navbar-nav">

90
<li class="nav-item"> <a class="nav-link active"
href="index.php">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>

<?php
if(empty($_SESSION["user_id"]))
{
echo '<li class="nav-item"><a
href="login.php" class="nav-link active">Login</a> </li>
<li class="nav-item"><a
href="registration.php" class="nav-link active">Register</a> </li>';
}
else
{

echo '<li
class="nav-item"><a href="your_orders.php" class="nav-link active">My Orders</a>
</li>';
echo '<li class="nav-
item"><a href="logout.php" class="nav-link active">Logout</a> </li>';
}

?>

</ul>
</div>
</div>
</nav>
</header>
<div class="page-wrapper">
<div class="top-links">

91
<div class="container">
<ul class="row links">

<li class="col-xs-12 col-sm-4 link-item"><span>1</span><a


href="restaurants.php">Choose Restaurant</a></li>
<li class="col-xs-12 col-sm-4 link-item "><span>2</span><a
href="#">Pick Your favorite food</a></li>
<li class="col-xs-12 col-sm-4 link-item active" ><span>3</span><a
href="checkout.php">Order and Pay</a></li>
</ul>
</div>
</div>

<div class="container">

<span style="color:green;">
<?php echo $success; ?>
</span>

</div>

<div class="container m-t-30">


<form action="" method="post">
<div class="widget clearfix">

<div class="widget-body">
<form method="post" action="#">
<div class="row">

92
<div class="col-sm-12">
<div class="cart-totals margin-b-20">
<div class="cart-totals-title">
<h4>Cart Summary</h4> </div>
<div class="cart-totals-fields">

<table class="table">
<tbody>

<tr>
<td>Cart Subtotal</td>
<td> <?php echo "$".$item_total; ?></td>
</tr>
<tr>
<td>Delivery Charges</td>
<td>Free</td>
</tr>
<tr>
<td class="text-color"><strong>Total</strong></td>
<td class="text-color"><strong> <?php echo "$".
$item_total; ?></strong></td>
</tr>
</tbody>

</table>
</div>

93
</div>
<div class="payment-option">
<ul class=" list-unstyled">
<li>
<label class="custom-control custom-radio m-b-20">
<input name="mod" id="radioStacked1" checked
value="COD" type="radio" class="custom-control-input"> <span class="custom-
control-indicator"></span> <span class="custom-control-description">Cash on
Delivery</span>
</label>
</li>
<li>
<label class="custom-control custom-radio m-b-10">
<input name="mod" type="radio" value="paypal"
disabled class="custom-control-input"> <span
class="custom-control-indicator"></span> <span class="custom-control-
description">Paypal <img src="images/paypal.jpg" alt="" width="90"></span>
</label>
</li>
</ul>
<p class="text-xs-center"> <input type="submit"
onclick="return confirm('Do you want to confirm the order?');" name="submit"
class="btn btn-success btn-block" value="Order Now"> </p>
</div>
</form>
</div>
</div>

</div>
</div>
</form>
</div>

<footer class="footer">

94
<div class="row bottom-footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal">
</a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png"
alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png"
alt="Maestro"> </a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe">
</a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin">
</a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-gray">
<h5>Address</h5>
<p>1086 Stockert Hollow Road, Seattle</p>
<h5>Phone: 75696969855</a></h5> </div>

95
<div class="col-xs-12 col-sm-5 additional-info color-gray">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having
partnered with us.</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</div>

<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/animsition.min.js"></script>
<script src="js/bootstrap-slider.min.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/headroom.js"></script>
<script src="js/foodpicky.min.js"></script>
</body>

</html>

<?php
}
?>

ONLINE FOOD PHP DATABASE CODE:

96
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 27, 2022 at 03:22 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


SET time_zone = "+00:00";

/*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `onlinefoodphp`
--

-- --------------------------------------------------------

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (


97
`adm_id` int(222) NOT NULL,
`username` varchar(222) NOT NULL,
`password` varchar(222) NOT NULL,
`email` varchar(222) NOT NULL,
`code` varchar(222) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`adm_id`, `username`, `password`, `email`, `code`, `date`)


VALUES
(1, 'admin', 'CAC29D7A34687EB14B37068EE4708E7B', '[email protected]', '', '2022-
05-27 13:21:52');

-- --------------------------------------------------------

--
-- Table structure for table `dishes`
--

CREATE TABLE `dishes` (


`d_id` int(222) NOT NULL,
`rs_id` int(222) NOT NULL,
`title` varchar(222) NOT NULL,
`slogan` varchar(222) NOT NULL,
`price` decimal(10,2) NOT NULL,
`img` varchar(222) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
98
--
--
-- Dumping data for table `remark`
--

INSERT INTO `remark` (`id`, `frm_id`, `status`, `remark`, `remarkDate`) VALUES


(1, 2, 'in process', 'none', '2022-05-01 05:17:49'),
(2, 3, 'in process', 'none', '2022-05-27 11:01:30'),
(3, 2, 'closed', 'thank you for your order!', '2022-05-27 11:11:41'),
(4, 3, 'closed', 'none', '2022-05-27 11:42:35'),
(5, 4, 'in process', 'none', '2022-05-27 11:42:55'),
(6, 1, 'rejected', 'none', '2022-05-27 11:43:26'),
(7, 7, 'in process', 'none', '2022-05-27 13:03:24'),
(8, 8, 'in process', 'none', '2022-05-27 13:03:38'),
(9, 9, 'rejected', 'thank you', '2022-05-27 13:03:53'),
(10, 7, 'closed', 'thank you for your ordering with us', '2022-05-27 13:04:33'),
(11, 8, 'closed', 'thanks ', '2022-05-27 13:05:24'),
(12, 5, 'closed', 'none', '2022-05-27 13:18:03');

-- --------------------------------------------------------

--
-- Table structure for table `restaurant`
--

CREATE TABLE `restaurant` (


`rs_id` int(222) NOT NULL,
`c_id` int(222) NOT NULL,
`title` varchar(222) NOT NULL,

99
`email` varchar(222) NOT NULL,
`phone` varchar(222) NOT NULL,
`url` varchar(222) NOT NULL,
`o_hr` varchar(222) NOT NULL,
`c_hr` varchar(222) NOT NULL,
`o_days` varchar(222) NOT NULL,
`address` text NOT NULL,
`image` text NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `restaurant`
--

INSERT INTO `restaurant` (`rs_id`, `c_id`, `title`, `email`, `phone`, `url`, `o_hr`, `c_hr`,
`o_days`, `address`, `image`, `date`) VALUES
(1, 1, 'North Street Tavern', '[email protected]', '3547854700',
'www.northstreettavern.com', '8am', '8pm', 'mon-sat', '1128 North St, White Plains',
'6290877b473ce.jpg', '2022-05-27 08:10:35'),
(2, 2, 'Eataly', '[email protected]', '0557426406', 'www.eataly.com', '11am', '9pm',
'Mon-Sat', '800 Boylston St, Boston', '606d720b5fc71.jpg', '2022-05-27 08:06:41'),
(3, 3, 'Nan Xiang Xiao Long Bao', '[email protected]', '1458745855',
'www.nanxiangbao45.com', '9am', '8pm', 'mon-sat', 'Queens, New York',
'6290860e72d1e.jpg', '2022-05-27 08:04:30'),
(4, 4, 'Highlands Bar & Grill', '[email protected]', '6545687458', 'www.hbg.com', '7am',
'8pm', 'mon-sat', '812 Walter Street', '6290af6f81887.jpg', '2022-05-27 11:01:03');

-- --------------------------------------------------------

--
-- Table structure for table `res_category`

100
--

CREATE TABLE `res_category` (


`c_id` int(222) NOT NULL,
`c_name` varchar(222) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `res_category`
--

INSERT INTO `res_category` (`c_id`, `c_name`, `date`) VALUES


(1, 'Continental', '2022-05-27 08:07:35'),
(2, 'Italian', '2021-04-07 08:45:23'),
(3, 'Chinese', '2021-04-07 08:45:25'),
(4, 'American', '2021-04-07 08:45:28');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (


`u_id` int(222) NOT NULL,
`username` varchar(222) NOT NULL,
`f_name` varchar(222) NOT NULL,
`l_name` varchar(222) NOT NULL,
`email` varchar(222) NOT NULL,

101
`phone` varchar(222) NOT NULL,
`password` varchar(222) NOT NULL,
`address` text NOT NULL,
`status` int(222) NOT NULL DEFAULT '1',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`u_id`, `username`, `f_name`, `l_name`, `email`, `phone`,


`password`, `address`, `status`, `date`) VALUES
(1, 'eric', 'Eric', 'Lopez', '[email protected]', '1458965547',
'a32de55ffd7a9c4101a0c5c8788b38ed', '87 Armbrester Drive', 1, '2022-05-27 08:40:36'),
(2, 'harry', 'Harry', 'Holt', '[email protected]', '3578545458',
'bc28715006af20d0e961afd053a984d9', '33 Stadium Drive', 1, '2022-05-27 08:41:07'),
(3, 'james', 'James', 'Duncan', '[email protected]', '0258545696',
'58b2318af54435138065ee13dd8bea16', '67 Hiney Road', 1, '2022-05-27 08:41:37'),
(4, 'christine', 'Christine', 'Moore', '[email protected]', '7412580010',
'5f4dcc3b5aa765d61d8327deb882cf99', '114 Test Address', 1, '2022-05-01 05:14:42'),
(5, 'scott', 'Scott', 'Miller', '[email protected]', '7896547850',
'5f4dcc3b5aa765d61d8327deb882cf99', '63 Charack Road', 1, '2022-05-27 10:53:51'),
(6, 'liamoore', 'Liam', 'Moore', '[email protected]', '7896969696',
'5f4dcc3b5aa765d61d8327deb882cf99', '122 Bleck Street', 1, '2022-05-27 12:57:00');

-- --------------------------------------------------------

--
-- Table structure for table `users_orders`
--

102
CREATE TABLE `users_orders` (
`o_id` int(222) NOT NULL,
`u_id` int(222) NOT NULL,
`title` varchar(222) NOT NULL,
`quantity` int(222) NOT NULL,
`price` decimal(10,2) NOT NULL,
`status` varchar(222) DEFAULT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users_orders`
--

INSERT INTO `users_orders` (`o_id`, `u_id`, `title`, `quantity`, `price`, `status`, `date`)
VALUES
(1, 4, 'Spring Rolls', 2, '6.00', 'rejected', '2022-05-27 11:43:26'),
(2, 4, 'Prawn Crackers', 1, '7.00', 'closed', '2022-05-27 11:11:41'),
(3, 5, 'Chicken Madeira', 1, '23.00', 'closed', '2022-05-27 11:42:35'),
(4, 5, 'Cheesy Mashed Potato', 1, '5.00', 'in process', '2022-05-27 11:42:55'),
(5, 5, 'Meatballs Penne Pasta', 1, '10.00', 'closed', '2022-05-27 13:18:03'),
(6, 5, 'Yorkshire Lamb Patties', 1, '14.00', NULL, '2022-05-27 11:40:51'),
(7, 6, 'Yorkshire Lamb Patties', 1, '14.00', 'closed', '2022-05-27 13:04:33'),
(8, 6, 'Lobster Thermidor', 1, '36.00', 'closed', '2022-05-27 13:05:24'),
(9, 6, 'Stuffed Jacket Potatoes', 1, '8.00', 'rejected', '2022-05-27 13:03:53');

--
--
-- Indexes for table `restaurant`
--

103
ALTER TABLE `restaurant`
ADD PRIMARY KEY (`rs_id`);

--

Login code:
body {
background: #e9e9e9;
color: #666666;
background-image: url("images/img/background_login.jpg");
font-family: "RobotoDraft", "Roboto", sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
}
.pen-title h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
.pen-title span {
font-size: 12px;
}

104
.pen-title span .fa {
color: #5c4ac7;
}
.pen-title span a {
color: #5c4ac7;
font-weight: 600;
text-decoration: none;
}

/* Form Module */
.form-module {
position: relative;
background: #ffffff;
max-width: 320px;
width: 100%;
border-top: 5px solid #5c4ac7;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
}
.form-module .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;

105
line-height: 30px;
text-align: center;
}
.form-module .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.form-module .toggle .tooltip:before {
content: "";
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
}
.form-module .form:nth-child(2) {

106
display: block;
}
.form-module h2 {
margin: 0 0 20px;
color: #5c4ac7;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
.form-module input {
outline: none;
display: block;
width: 100%;
border: 1px solid #ccc;
margin: 0 0 20px;
padding: 10px 15px;
box-sizing: border-box;
font-wieght: 400;
transition: 0.3s ease;
}
.form-module input:focus {
border: 1px solid #5c4ac7;
color: #333333;
}
.form-module button {
cursor: pointer;
background: #5c4ac7;
width: 100%;
border: 0;
padding: 10px 15px;

107
color: #ffffff;
transition: 0.3s ease;
}
.form-module button:hover {
background: #b92a07;
}
.form-module .cta {
background: #f2f2f2;
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.form-module .cta a {
color: #333333;
text-decoration: none;
}

Stylecss

/* The version of Bourbon used in this Pen was 4.* */


@import "bourbon";

// Main Colors
$accent: null;
$white: #ffffff;
$black: #000000;
$dark-gray: lighten($black, 20%);

108
$gray: lighten($black, 40%);
$light-gray: lighten($black, 60%);
$lighter-gray: lighten($black, 80%);

// Pen Settings
$accent: #33b5e5;
$module-width: 320px;

body {
background: #e9e9e9;
color: $gray;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
span {
font-size: 12px;
.fa {

109
color: $accent;
}
a{
color: $accent;
font-weight: 600;
text-decoration: none;
}
}
}

/* Form Module */
.form-module {
position: relative;
background: $white;
max-width: $module-width;
width: 100%;
border-top: 5px solid $accent;
box-shadow: 0 0 3px rgba($black, .1);
margin: 0 auto;
.toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: $accent;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: $white;
font-size: 12px;

110
line-height: 30px;
text-align: center;
.tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba($black, .6%);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
&:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba($black, .6);
}
}
}
.form {
display: none;
padding: 40px;
&:nth-child(2) {
display: block;

111
}
}
h2 {
margin: 0 0 20px;
color: $accent;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
input {
outline: none;
display: block;
width: 100%;
border: 1px solid darken($white, 15%);
margin: 0 0 20px;
padding: 10px 15px;
box-sizing: border-box;
font-wieght: 400;
@include transition(.3s ease);
&:focus {
border: 1px solid $accent;
color: $dark-gray;
}
}
button {
cursor: pointer;
background: $accent;
width: 100%;
border: 0;
padding: 10px 15px;

112
color: $white;
@include transition(.3s ease);
&:hover {
background: darken($accent, 15%);
}
}
.cta {
background: darken($white, 5%);
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: $gray;
font-size: 12px;
text-align: center;
a{
color: $dark-gray;
text-decoration: none;
}
}
}

JAVA SCRIPT

/*!
* Foodpicky HTML template V 1.0
* A simple and easy to use HTML template designed for online food ordering.
* http://codenpixel.com
* Author : codenpixel (http://codenpixel.com/)
*/

113
/*
* Table of content
*************************************
* Loading animation seetings
* Adding images via data atr
* Range slider.Pricing slider
* Headroom (hide - show menu on scrool)
* Isotope
*
**/

$(document).ready(function() {
"use strict";

$(".animsition").animsition({
inClass: 'fade-in',
outClass: 'fade-out',
inDuration: 300,
outDuration: 300,
linkElement: '.animsition-link', // e.g. linkElement :
'a:not([target="_blank"]):not([href^=#])'
loading: true,
loadingParentElement: 'body', //animsition wrapper element
loadingClass: 'animsition-loading',
unSupportCss: ['animation-duration', '-webkit-animation-duration', '-o-animation-
duration'], //"unSupportCss" option allows you to disable the "animsition" in case the
css property in the array is not supported by your browser.
//The default setting is to disable the "animsition" in a browser that does not
support "animation-duration".
overlay: false,
overlayClass: 'animsition-overlay-slide',
overlayParentElement: 'body'

114
});

$(".bg-image").css("background",function(){var a="url("+$(this).data("image-src")
+") no-repeat center center";return a}),$(".bg-image").css("background-
size","cover"),

/// Range slider


$("#ex2").slider({});
$("#ex2").on("slide", function(slideEvt) {
$("#ex2SliderVal").text(slideEvt.value);
});

// grab an element
var myElement = document.querySelector('#header');
// construct an instance of Headroom, passing the element
var headroom = new Headroom(myElement, {
// vertical offset in px before element is first unpinned
offset: 80, // scroll tolerance in px before state changes
tolerance: 40, // if you need other CSS classes, to apply these options.
classes: {
initial: "animated",
pinned: "fadeInDown",
unpinned: "fadeOutUp"
}
});
// initialise
headroom.init();

// initialise
headroom.init();

115
////////Packages filter
var $container = $(".restaurant-listing");
$container.isotope({
filter: "*",
animationOptions: {
duration: 750,
easing: "linear",
queue: false,
}
});

/////// Isotope
$("nav.primary ul a").click(function() {
var selector = $(this).attr("data-filter");
$container.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: "linear",
queue: false,
}
});
return false;
});
var $optionSets = $("nav.primary ul"),
$optionLinks = $optionSets.find("a");
$optionLinks.click(function() {
//alert( $optionLinks);
var $this = $(this);
// don"t proceed if already selected

116
if ($this.hasClass("selected")) {
return false;
}
var $optionSet = $this.parents("nav.primary ul");
$optionSet.find(".selected").removeClass("selected");
$this.addClass("selected");

});

//// Range slider seetings


$("#slider-range").slider({
range: true,
min: 0,
max: 500,
values: [75, 300],
slide: function(event, ui) {
//$( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
$(".minvalue").html("$" + ui.values[0]);
$(".maxvalue").html("$" + ui.values[1]);
}
});
$("#amount").val("$" + $("#slider-range").slider("values", 0) + " - $" + $("#slider-
range").slider("values", 1));

////// Increment and decrement select box


$(".up").on("click", function() {
var thisObj = $(this);

117
var thisInput = thisObj.parent().find("input");
var prevVal = parseInt(thisInput.val());
var newVal = prevVal + 1;
thisInput.val(newVal);
});
$(".down").on("click", function() {
var thisObj = $(this);
var thisInput = thisObj.parent().find("input");
var prevVal = parseInt(thisInput.val());
var newVal = prevVal - 1;
if (newVal >= 0) {
thisInput.val(newVal);
}
});

4.4 TESTING

Testing is a crucial phase in the development of an Online Food Ordering System. It ensures
that the system is working as expected and that there are no bugs, security issues, or usability
problems. Testing involves verifying the functionality, usability, performance, and security of
the system.

118
Here’s a detailed breakdown of the types of testing and testing techniques for the Online
Food Ordering System:

1. Types of Testing
1. Unit Testing
2. Integration Testing
3. Functional Testing
4. Usability Testing
5. Security Testing
6. Performance Testing
7. System Testing
8. User Acceptance Testing (UAT)
9. Regression Testing
10. Smoke Testing

2. Unit Testing
Unit Testing involves testing individual components or functions of the application in
isolation to ensure they work correctly. This is typically done by developers during the coding
phase.
Examples of Unit Tests for Online Food Ordering System:
 User Registration: Test if user registration functionality works as expected
(validating input fields, password encryption).
 Order Placement: Ensure that when a user places an order, the correct data is added
to the database.
 Menu Management: Verify that restaurants can add, update, and delete menu items.
Tools:
 Jest, Mocha, or Chai for JavaScript
 JUnit for Java
 PyTest for Python

3. Integration Testing
Integration Testing checks if different components/modules of the system work together as
expected. This involves testing the interaction between the frontend, backend, and database.
Examples of Integration Tests:

119
 Test the interaction between the Order API and the Payment Gateway. When a user
places an order, the system should correctly communicate with the payment processor.
 Test the interaction between the Restaurant Module and Order Management
System. Ensure that a restaurant can view and update the status of the orders placed
by customers.
Tools:
 Postman for API testing
 JUnit or TestNG for Java integration tests

4. Functional Testing
Functional Testing ensures that the system’s features work as per the requirements. In the
case of the Online Food Ordering System, functional tests would focus on validating the
following functionalities:
Examples of Functional Tests:
 Login/Registration: Ensure that users can successfully log in and register.
 Add to Cart: Validate that customers can add items to their cart, remove them, and
view the cart contents.
 Order Placement: Verify that an order can be placed successfully with the correct
details, such as food items, total cost, and delivery address.
 Payment Processing: Ensure that payments are processed correctly through the
integrated payment gateway (Stripe, PayPal).
 Order Tracking: Verify that users can track the status of their order (e.g., “Pending”,
“In Progress”, “Delivered”).
Tools:
 Selenium for automated UI testing
 Cucumber for behavior-driven development (BDD) testing

5. Usability Testing
Usability Testing ensures that the system is easy to use and offers a good user experience.
For an Online Food Ordering System, usability testing can be performed by real users to see
how intuitive and efficient the interface is.
Examples of Usability Tests:
 Test the navigation of the app to ensure that users can easily find the menu, place an
order, and proceed to checkout.
 Test if the checkout process is simple and doesn’t confuse users.
 Ensure the order status tracking feature is easily understandable for customers.

120
Tools:
 Crazy Egg, Hotjar for user behavior tracking
 Lookback.io for live user testing

6. Security Testing
Security Testing identifies vulnerabilities in the system to prevent unauthorized access and
potential threats. Security is critical in an online food ordering system because sensitive data
like user information and payment details are involved.
Examples of Security Tests:
 Data Encryption: Ensure that sensitive information such as passwords, credit card
details, and personal information are encrypted.
 SQL Injection Testing: Test if the system is vulnerable to SQL injection attacks,
where a malicious user can manipulate database queries.
 Cross-Site Scripting (XSS): Test for vulnerabilities that may allow an attacker to
inject malicious scripts into the frontend.
 Authentication and Authorization: Verify that users have the appropriate
permissions and can only access their data.
Tools:
 OWASP ZAP for vulnerability scanning
 Burp Suite for security testing and penetration testing

7. Performance Testing
Performance Testing ensures that the system performs well under expected and peak loads.
It also checks how the system behaves under high traffic volumes and heavy usage.
Examples of Performance Tests:
 Load Testing: Test how the system performs when multiple users place orders
simultaneously (e.g., hundreds of orders being placed in a short period).
 Stress Testing: Determine how the system performs under extreme conditions (e.g.,
when there are more users than the system can handle).
 Scalability Testing: Test if the system can scale to accommodate increasing numbers
of users and orders over time.
Tools:
 Apache JMeter for load and performance testing
 LoadRunner for stress testing

8. System Testing

121
System Testing involves testing the entire system to ensure all components work together
and the system meets the specified requirements. This includes end-to-end testing of the
application.
Examples of System Tests:
 Order Process Flow: Test the entire process, starting from browsing the menu to
placing an order, making payment, and tracking the delivery.
 User Account Management: Ensure that users can register, log in, update their
profiles, and log out successfully.
Tools:
 Selenium for automated browser-based testing
 Cypress for modern end-to-end testing

9. User Acceptance Testing (UAT)


User Acceptance Testing (UAT) is performed by end-users or stakeholders to validate that
the system meets the business requirements. It is the final check before the system goes live.
Examples of UAT Tests:
 Order Placement: Test if users can place orders smoothly and the system correctly
calculates the total price, taxes, and delivery fees.
 Admin Functions: Admins can log in, view user orders, and manage restaurant
details.
Tools:
 Manual Testing with real users
 TestRail for test case management

10. Regression Testing


Regression Testing ensures that new updates or bug fixes do not negatively impact existing
functionalities. It’s done every time there is a change in the codebase.
Examples of Regression Tests:
 Order Flow: Ensure that after a new feature is added, the order process still works as
expected.
 Login/Logout: Verify that login/logout functionality is not broken after changes.
Tools:
 Selenium for automated regression testing
 JUnit for automated backend regression testing

122
11. Smoke Testing
Smoke Testing is a preliminary test to check if the most critical functionalities of the system
work correctly. This is usually done before performing more detailed testing.
Examples of Smoke Tests:
 Ensure the system starts correctly.
 Verify that users can log in and register.
 Check if the payment gateway is functional.
Tools:
 Manual Testing or Automated Tests for basic functionality.

5 RESULT

5.1 USER INTERFACE


The User Interface (UI) for an Online Food Ordering System plays a crucial role in
providing users with an intuitive and engaging experience. The design should be user-
friendly, responsive, and visually appealing to facilitate smooth interaction for various types
of users (customers, restaurants, and admins). Below is a breakdown of the typical UI
components and pages for the customer side of an online food ordering system.

1. Homepage / Landing Page


The homepage is the first point of contact for users, where they can quickly navigate to key
areas of the system.
Key UI Elements:
 Navigation Bar: Links to Home, Menu, Cart, Account, and Contact Us.
 Search Bar: To search for specific food items, cuisines, or restaurants.
 Featured Restaurants: Highlight popular or recommended restaurants.
 Special Offers or Discounts: Display current promotions.
 Login/Sign-Up Buttons: Access to user account management.
 Order Now Button: Encourages users to start browsing or placing orders.
Visual Appearance:

123
 Clean and minimalistic design with high-quality images of food.
 A vibrant color scheme that reflects the brand.
 Easy-to-read fonts and clear call-to-action buttons.

2. Login / Registration Page


Users can log in to their existing account or register a new one.
Key UI Elements:
 Login Form: Username/email and password fields with a "Forgot Password?" link.
 Registration Form: Fields to enter name, email, phone number, and create a
password.
 Social Media Logins: Options to log in via Google or Facebook.
 Sign-up/Sign-in Buttons: Clear and prominent buttons for login and registration
actions.
Visual Appearance:
 Simple and focused form layout.
 Fields should be well-labeled with helpful tooltips for form validation.
 Clear distinction between the login and registration sections.

3. Menu Page
The menu page displays the food items available for ordering from a selected restaurant.
Key UI Elements:
 Restaurant Name and Details: Display the restaurant's name, rating, and cuisine
type.
 Food Categories: Categories like "Starters," "Main Course," "Desserts," etc.
 Search Filters: Filter food items by category, price, or popularity.
 Food Items: Each item should have a name, image, description, price, and "Add to
Cart" button.
 Sort Options: Sort food by price, rating, or popularity.
 Pagination: If there are many food items, pagination should be included.
Visual Appearance:
 Grid or list layout for displaying food items.
 Each food item should have a high-quality image, making it visually appealing.

124
 Interactive buttons like "Add to Cart" should be easy to locate and click.
 Hover effects or animations to highlight actions like adding to the cart.

4. Cart Page
Once the user adds food items to their cart, the cart page allows them to review the items,
modify quantities, or proceed to checkout.
Key UI Elements:
 Food List: Display a list of food items with their name, quantity, price, and total cost.
 Update Quantity Buttons: Options to increase or decrease the quantity of an item.
 Remove Item: A button to remove an item from the cart.
 Total Cost: Display the subtotal, taxes, and delivery fees.
 Proceed to Checkout Button: Prominent button to continue to the checkout process.
 Apply Promo Code: An input box to enter discount or promo codes.
Visual Appearance:
 Well-organized, easy-to-read table or list layout.
 Simple and user-friendly controls to adjust the order.
 Color-coded sections to distinguish between food items, pricing, and actions.

5. Checkout Page
The checkout page allows users to provide delivery details and payment information before
completing their order.
Key UI Elements:
 Delivery Information Form: Fields to enter the delivery address, phone number, and
delivery instructions.
 Payment Method Selection: Buttons or dropdowns to select the payment method
(credit card, PayPal, cash on delivery).
 Order Summary: Show a breakdown of the order (food items, delivery address, total
cost).
 Place Order Button: A clear call-to-action to finalize the order.
 Cancel or Edit Order: Options to go back or edit the order before confirming.
Visual Appearance:
 Simple, step-by-step layout for easy user flow.

125
 Clear and concise labels and input fields.
 A secure feel, especially in the payment section, using visual cues like locks for
secure payment processing.

6. Order Confirmation Page


Once the order is placed, users should see a confirmation page with details of their order.
Key UI Elements:
 Order Number: Display the unique order number.
 Order Details: Show food items, delivery address, estimated delivery time, and total
cost.
 Track Order Button: A button that allows users to track the status of their order.
 Thank You Message: A friendly thank you message to the user for placing the order.
Visual Appearance:
 Bright, welcoming design with clear confirmation of the order.
 An option to share the order or track it in real-time.

7. User Profile Page


The user profile page allows customers to manage their personal information, past orders, and
payment methods.
Key UI Elements:
 Personal Information: Display and edit user information such as name, email, and
phone number.
 Order History: List of previous orders with order details and the ability to reorder.
 Payment Methods: Manage saved credit cards or payment methods.
 Settings: Options to change account settings, password, or email preferences.
Visual Appearance:
 Clean layout with easy-to-navigate sections for user info, order history, etc.
 Options for each section to be expandable or collapsible.

8. Restaurant Dashboard (For Restaurant Admin)


Restaurant admins need an interface to manage their menu, orders, and customer data.
Key UI Elements:

126
 Menu Management: Add, edit, and remove food items from the menu.
 Order Management: View incoming orders, change their status (e.g., in preparation,
out for delivery).
 Reports: View analytics about sales, popular items, and customer feedback.
 Customer Support: Respond to customer inquiries or complaints.
Visual Appearance:
 A simple yet effective dashboard with tables or charts displaying key metrics.
 Actionable buttons for menu and order management.
 Clear sections for easy navigation (e.g., orders, reports, support).

5.2 SNAPSHOT OF THE SYSTEM

127
5.3 OUTPUT OF THE SCREEN

XAMPP CONTROL PANEL

128
HOME PAGE:

129
130
RESTAURANTS PAGE

131
LOGIN PAGE

132
REGISTER PAGE

ORDER CART

133
CHECKOUT ORDER

MY ORDERS

134
ADMIN PANEL

ADMIN DASHBOARD

135
USERS

MENUS (ALL MEENUS)

136
MENUS(ADD MENU)

ORDERS

137
5.4 SNAPSHOT OF DATABASE DESIGN

DATABASE DESIGN

138
6 CONCLUSION AND FUTURE SCOPE

In conclusion, the Online Food Ordering System represents a significant advancement in


how customers interact with restaurants and place food orders. It simplifies the process of
ordering food by eliminating the need for physical menus, long waits, or time-consuming
phone calls. With the rise of smartphones and internet access, the online food ordering model
has become increasingly popular, providing customers with the convenience of ordering food
from anywhere and at any time.
The key benefits of implementing such a system include:
1. Convenience: Customers can place orders from the comfort of their homes or while
on the go, without the need to visit restaurants physically or make calls. This 24/7
availability enhances customer satisfaction.
2. Efficiency: Online food ordering systems streamline the order process, minimizing
human error and increasing the speed of order processing. Restaurants benefit from
automated order handling, which reduces the time spent managing orders manually.

139
3. Broader Reach: Restaurants can expand their customer base by offering online
services, reaching more potential customers who may not be within close proximity to
the restaurant. Additionally, the system can offer features like reviews and ratings,
helping restaurants to attract new customers based on positive feedback.
4. Payment Flexibility: Integration with multiple payment gateways allows customers
to choose their preferred method (credit card, mobile wallet, or cash on delivery),
enhancing the overall shopping experience.
5. Real-time Order Tracking: Customers benefit from real-time tracking of their
orders, giving them peace of mind and allowing them to plan their schedules
accordingly.
6. Data Insights: Both customers and restaurants can benefit from valuable data
insights. Customers get personalized recommendations based on past orders, while
restaurant owners can analyze order trends, customer preferences, and sales data to
optimize their offerings and operations.
Challenges & Considerations
While the system offers several advantages, it is not without its challenges. Security of
sensitive data, ensuring uptime and system reliability, and managing logistics (delivery times,
quality of food, etc.) are some of the key aspects that need careful attention. Furthermore,
maintaining an intuitive user interface and continuously improving the system's functionality
based on user feedback is crucial for long-term success.

FUTURE SCOPE

The future scope of an Online Food Ordering System is vast, as the global trend toward
digitalization and convenience continues to grow. As technology advances, the online food
ordering industry is expected to evolve in ways that enhance both the customer experience
and operational efficiency. Below are some key areas where the future of online food
ordering is headed:

1. Integration of Artificial Intelligence (AI) and Machine Learning (ML)


AI and ML are set to revolutionize the online food ordering system by making it more
personalized and efficient.
 Personalized Recommendations: AI can analyze customer data, preferences, and
past orders to provide tailored menu suggestions, improving the overall user
experience.
 Smart Order Prediction: ML algorithms can predict customer orders based on
historical data, time of day, weather conditions, and more.
 Chatbots and Virtual Assistants: AI-driven chatbots can handle customer queries,
take orders, and offer support 24/7, enhancing customer service.

140
 Demand Forecasting: AI can help predict demand trends, assisting restaurants in
managing inventory and reducing food wastage.

2. Voice-enabled Ordering
As voice assistants like Amazon Alexa, Google Assistant, and Apple Siri become more
widespread, the integration of voice-activated ordering is an exciting area for growth.
Customers could place orders through their voice commands, making the process faster and
more accessible, especially for those who may have difficulty using traditional interfaces.
 Voice-activated Search: Users can search for menu items or restaurants by simply
speaking.
 Order Completion via Voice: With voice recognition and processing, users can add
items to their cart, check out, and make payments without needing to touch their
devices.

3. Enhanced Delivery Options: Drones and Autonomous Vehicles


One of the most promising advancements in the future of online food ordering is the use
of drones and autonomous vehicles for delivery.
 Drones: Drones can deliver food faster and more efficiently, especially in urban areas
with heavy traffic. They can reduce delivery time, and their potential for rapid and
contactless delivery would be especially valuable in the post-pandemic era.
 Self-driving Vehicles: Companies like Uber Eats and DoorDash are already
experimenting with autonomous delivery vehicles. These vehicles would be able to
deliver food orders with minimal human intervention, cutting costs and improving
delivery speeds.

4. Cloud Kitchens and Virtual Restaurants


The rise of cloud kitchens (also known as ghost kitchens) is another significant trend that
will shape the future of online food ordering.
 Cloud Kitchens: These are commercial kitchens optimized for delivery-only services,
often located in areas with high demand for food delivery. They don’t have a physical
storefront and operate exclusively through online platforms, reducing operational
costs for restaurant owners.
 Virtual Restaurants: These are entirely online-based restaurants that have no
physical presence, relying on food delivery apps for all of their orders. Virtual
restaurants can serve multiple brands or cuisine types from a single location, allowing
for a broader variety of food.

5. Cryptocurrency and Blockchain Integration

141
The use of cryptocurrency for online transactions in the food delivery space is becoming
more viable. Cryptocurrencies like Bitcoin and Ethereum are slowly gaining mainstream
adoption.
 Payment with Cryptocurrency: Online food ordering platforms may accept
cryptocurrency payments, offering more convenience for customers who prefer digital
currencies.
 Blockchain for Transparency: Blockchain technology can be used to create
transparent and tamper-proof systems for tracking food sourcing, ensuring food
quality, and improving supply chain management.

6. Advanced User Experience (UX) Design and Augmented Reality (AR)


Future developments in UX and Augmented Reality (AR) will provide users with
immersive, engaging experiences when ordering food.
 AR Menus: Users could virtually "see" dishes in 3D before they order, helping them
make better decisions and enhancing the overall ordering experience.
 Interactive UX: Future apps may incorporate gamification features, allowing
customers to earn rewards or discounts based on their interactions or activity on the
platform.

7. Sustainability and Eco-Friendly Practices


As consumers become more environmentally conscious, sustainability will play a critical role
in the future of food ordering systems.
 Eco-friendly Packaging: Expect a shift towards biodegradable and recyclable
packaging to reduce environmental impact.
 Carbon Footprint Tracking: Some platforms may provide information about the
carbon footprint of each meal or offer carbon offset programs.
 Sustainable Sourcing: Integration of sustainability metrics to ensure that restaurants
source ingredients ethically and with minimal environmental impact.

8. Integration with Smart Appliances


The integration of IoT (Internet of Things) devices into the online food ordering experience
could be another exciting avenue for the future.
 Smart Refrigerators: Imagine a smart fridge that can track the ingredients you have
at home, suggest recipes based on your inventory, and even automatically order the
ingredients you are running low on from local restaurants.
 Automated Cooking: As IoT technology advances, smart kitchens could automate
certain cooking processes. For example, a user could order a dish from a restaurant,
and their smart kitchen would automatically begin preparing it using ingredients
provided by the restaurant.

142
9. Subscription-based Models
Subscription models, where users can subscribe to receive regular meal deliveries, are
becoming more popular.
 Meal Plans and Boxes: Users could subscribe to receive weekly meal kits or pre-
cooked meals based on their dietary preferences.
 Loyalty Programs: Subscription models could be integrated with loyalty programs
where customers earn points or discounts for regular orders.

10. 5G Network and Faster Connectivity


The rollout of 5G networks will significantly impact the online food ordering experience.
 Faster Order Processing: With faster internet speeds, orders can be placed and
processed with near-zero latency, improving user experience.
 Real-time Delivery Tracking: Enhanced 5G connectivity will make real-time
tracking of food deliveries more accurate, ensuring that customers can monitor their
orders closely.

BIBLIOGRAPHY

 https://www.w3schools.com
 https://www.canvasjs.com
 https://.getbootstrap.com
 https://fontawesome.com
 https://www.youtube.com/watch?v-4hQHwP5oFc0
 https://www.w3schools.com/php/php_session.asp
 https://www.w3schools.com/css/default.asp

REFERENCES

 Liu, X., & Liu, Y. (2020). Design and Implementation of an Online Food Ordering
System. International Journal of Computer Applications, 178(7), 10-15.
https://doi.org/10.5120/ijca2020-802850

143
 Smith, R. (2019). The Future of Online Food Delivery: A Global Perspective.
Springer.
ISBN: 978-3-319-86830-1.

 Chou, Y., & Lin, C. (2021). User Experience Design in Online Food Ordering
Systems: A Case Study of Mobile Applications. Journal of Digital Commerce, 22(4),
251-267.
https://doi.org/10.1016/j.jdoc.2020.11.004

 Khan, M., & Kapoor, S. (2018). E-commerce and Online Ordering in the Food
Industry: A Review. International Journal of Business and Social Science, 9(12), 112-
121.
https://www.ijbssnet.com/

 Gonzalez, R. (2022). Impact of Online Food Ordering Platforms on Restaurant


Businesses. Food Service Technology Review, 5(2), 45-58.
https://www.foodservicetech.com/

 Kumar, V., & Agarwal, S. (2020). A Comparative Study of Online Food Delivery
Platforms: User Preferences and Market Trends. International Journal of Information
Management, 40(1), 100-110.
https://doi.org/10.1016/j.ijinfomgt.2018.12.004

144
145

You might also like