https://github.com/pratikkhot100/online-food-order-application
A full-stack web application built using Java (JSP, Servlets), JDBC, and MySQL. The project allows users to browse and order food, while admins can manage menu items, categories, and orders.
https://github.com/pratikkhot100/online-food-order-application
bootstrap core-java css html java java-database-connectivity java-web-application javascript jsp model-view-controller mvc-architecture mysql-database online-food-order servlet
Last synced: about 1 month ago
JSON representation
A full-stack web application built using Java (JSP, Servlets), JDBC, and MySQL. The project allows users to browse and order food, while admins can manage menu items, categories, and orders.
- Host: GitHub
- URL: https://github.com/pratikkhot100/online-food-order-application
- Owner: pratikkhot100
- Created: 2025-04-07T16:08:46.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-11T19:03:47.000Z (about 1 month ago)
- Last Synced: 2025-04-12T02:15:28.008Z (about 1 month ago)
- Topics: bootstrap, core-java, css, html, java, java-database-connectivity, java-web-application, javascript, jsp, model-view-controller, mvc-architecture, mysql-database, online-food-order, servlet
- Language: Java
- Homepage:
- Size: 3.89 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🍔 Online Food Ordering Application
A full-stack web application built using Java (JSP, Servlets), JDBC, and MySQL. The project allows users to browse and order food, while admins can manage menu items, categories, and orders.
The goal of this project is to develop a user-friendly online food ordering system that streamlines the process of browsing menus, placing orders, and managing food items. It aims to bridge the gap between restaurants and customers through a digital platform, offering convenience, efficiency, and real-time order management for both users and administrators.
---
## 🧰 (images/tech-heading.png)
### 💻 Technologies Used
- **Backend**: Java, JSP, Servlets, JDBC, POJO classes
- **Frontend**: HTML, CSS, JavaScript, Bootstrap
- **Database**: MySQL---
### 🏗️ Architecture - MVC Pattern
This project follows the **MVC (Model-View-Controller)** architecture:
- **Model**: Java POJO classes representing data entities like `User`, `FoodItem`, `Order`, etc.
- **View**: JSP files used for rendering the frontend interface for users and admins.
- **Controller**: Servlets handling the business logic and routing requests between the view and model.---
### 👤 User
- Register and login
- Browse food items by category
- Add items to cart
- Place orders
- View order history### 🔐 Admin
- Login securely
- Manage categories and food items (CRUD)
- View and manage customer orders---
### ✨ Features
- Login/Signup with session management
- Role-based access (admin and user dashboards)
- Dynamic loading of food items and categories
- Responsive UI with Bootstrap
- Secure JDBC with Prepared Statements
- POJO model for data abstraction
- MVC pattern for separation of concerns---
### 📁 Project Structure
```
OnlineFoodApp/
│
├── src/
│ └── main/
│ ├── java/
│ │ └── com.onlinefood/
│ │ ├── controller/ # Servlets (Controllers)
│ │ ├── dao/ # Database logic (Data Access Objects)
│ │ ├── model/ # POJO classes (Models)
│ │ └── utils/ # DB connection, helpers
│ └── webapp/
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript files
│ ├── admin/ # Admin dashboard views
│ ├── user/ # User dashboard views
│ ├── images/ # Image assets
│ ├── index.jsp # Homepage
│ └── login.jsp # Login page
└── README.md
```---
## 🚀 How to Run
1. *Clone the Repository*
```bash
git clone https://github.com/yourusername/OnlineFoodApp.git
cd OnlineFoodApp2. Set up the MySQL Database
Import the database.sql file into your MySQL server.
Update your database credentials in DBConnection.java.
3. Deploy on Apache Tomcat
Build the project in your IDE.
Deploy the compiled WAR or project directory to the Tomcat webapps folder.
Start Tomcat and go to:
http://localhost:8080/OnlineFoodApp---
## 🖼️ Screenshots
### 🏠 Home Page
- Home

- Menus
- Company
- Contact
- Login
- Register
---
### 👥 User Dashboard
- Welcome User
- Profile

- My Order History
- Logout
- Home
---
### 🛠️ Admin Dashboard
- Login
- Welcome Admin
- Add Food

- Menus

---## 🍚 ================= MySQL Database =================
STEP 1: Open MySQL Command Prompt or MySQL Workbench
STEP 2: Login to the administrator user of MySql:
```mysql -u -p``` (Enter Password if asked)STEP 3: Copy paste and execute the MySQL Query from the following file:-
- Run the Sql Query From this file: [MySQL Database](https://github.com/pratikkhot100/Online-Food_Application/blob/main/mysql_database.sql)---
## 📌 "Suggestions and project improvement ideas are welcomed!"
- [Pratik Khot](https://github.com/pratikkhot100)