Foody Guys is a full-stack Java web application for online food ordering, inspired by modern food delivery platforms such as Swiggy and Zomato.
The project was developed to understand how a real-world food ordering platform works by implementing the frontend, backend, database connectivity, authentication, restaurant browsing, wishlist management, and shopping-cart functionality using Java web technologies.
Foody Guys allows users to:
- Create an account and log in
- Browse restaurants
- Search for restaurants
- Filter restaurants by food categories
- View restaurant menus
- View food images, descriptions, prices, and availability
- Add restaurants/menu items to wishlist
- Add food items to cart without leaving the menu page
- Increase or decrease food quantity directly from the menu
- View a floating cart with live item count and total price
- Manage cart items
- Navigate to the cart and continue with the ordering process
The application focuses not only on functionality but also on creating a modern and attractive food-delivery-style user interface.
- User registration
- User login
- Session-based user management
- Personalized wishlist and cart handling
- Display available restaurants
- Search restaurants
- Category-based filtering
- Dynamically calculated restaurant ratings
- Restaurant cards with modern UI
- Smooth scrolling to restaurant sections
Users can open a restaurant and view its menu.
Each menu item displays:
- Food image
- Item name
- Category
- Description
- Price
- Availability
- Wishlist option
- Add to Cart option
Users can add menu items to their wishlist and access their saved items later.
The project includes a dynamic shopping-cart experience.
Instead of redirecting users to the cart immediately after clicking Add to Cart, the item is added asynchronously using JavaScript Fetch API.
The button changes from:
Add to Cart
to:
- 1 +
Users can then increase or decrease the quantity directly from the menu page.
Cart operations are performed asynchronously without refreshing the page.
The frontend communicates with the Java Servlet backend using:
Fetch API
This provides a smoother and faster user experience.
A floating cart appears when users add items.
It displays:
3 Items
₹477
View Cart →
The item count and total price are updated dynamically as quantities change.
The frontend includes:
- Glassmorphism design
- Gradient backgrounds
- Food-focused visual design
- Hover animations
- Card animations
- Image zoom effects
- Hero banner slider
- Smooth transitions
- Interactive buttons
- Responsive layouts
The homepage contains an animated food banner that automatically changes between multiple food-themed promotional images.
Users can explore restaurants from the homepage and navigate through different food categories.
The project follows a layered/MVC-style structure.
Foody Guys
│
├── Java Model Classes
│ ├── User
│ ├── Restaurant
│ ├── Menu
│ ├── Cart
│ └── CartItem
│
├── DAO Layer
│ ├── RestaurantDAO
│ ├── MenuDAO
│ ├── WishlistDAO
│ └── DAO Implementations
│
├── Servlet Layer
│ ├── RestaurantServlet
│ ├── CartServlet
│ ├── Wishlist Servlets
│ └── Authentication Servlets
│
├── JSP Pages
│ ├── restaurant.jsp
│ ├── menu.jsp
│ ├── cart.jsp
│ ├── login.jsp
│ └── registration.jsp
│
└── Database
└── MySQL
- Java
- Java Servlets
- JSP
- JDBC
- Apache Tomcat
- HTML5
- CSS3
- JavaScript
- Fetch API
- MySQL
- Maven
The application uses MySQL for persistent data storage.
The database manages application data such as:
- Users
- Restaurants
- Menu items
- Wishlist information
- Ratings
- Other food-ordering related data
JDBC is used to communicate between the Java application and MySQL database.
The cart functionality works approximately as follows:
User clicks "Add to Cart"
↓
JavaScript intercepts request
↓
Fetch API sends request
↓
CartServlet receives request
↓
Cart is updated in HTTP Session
↓
Servlet returns response
↓
JavaScript updates UI
↓
"Add to Cart" → "- 1 +"
↓
Floating cart updates
When the user clicks + or -, the quantity is updated asynchronously without reloading the page.
Restaurant ratings are calculated dynamically from stored rating information.
The application retrieves the average rating for each restaurant and displays it on the restaurant card.
HTTP sessions are used to maintain user-specific information such as:
- Logged-in user
- Shopping cart
- Restaurant associated with the current cart
This allows the application to maintain state while the user navigates through different pages.
Responsible for:
- Restaurant retrieval
- Restaurant search
- Category filtering
- Restaurant rating retrieval
- Wishlist information
Responsible for:
- Adding items
- Updating quantities
- Removing items
- Maintaining the cart in the session
Represents the user's shopping cart and maintains cart items.
Represents an individual item inside the shopping cart.
The DAO classes separate database operations from servlet/business logic.
This project helped me gain practical experience in:
- Java web development
- Servlets
- JSP
- JDBC
- MySQL
- MVC architecture
- DAO pattern
- HTTP session management
- CRUD operations
- AJAX
- Fetch API
- DOM manipulation
- Dynamic UI updates
- Responsive web design
- Frontend animations
- Full-stack application development
Planned improvements include:
- 💳 Online payment gateway
- 📦 Complete order management
- 🚚 Live order tracking
- 👨💼 Admin dashboard
- 🏪 Restaurant management panel
- ⭐ Customer reviews and ratings
- 🔔 Order notifications
- 📱 Improved mobile responsiveness
- 📊 Admin analytics
- 🔐 Additional security improvements
Install:
- Java JDK
- Apache Tomcat 10+
- MySQL
- Maven
- Eclipse / IntelliJ IDEA / another Java IDE
- Clone the repository.
git clone <your-github-repository-url>-
Import the project into your IDE.
-
Create the MySQL database.
-
Configure the database connection inside the project.
-
Update the database credentials.
-
Run the project using Apache Tomcat.
-
Open the application in your browser.
http://localhost:8080/foody/
Developed as a Java Full Stack Web Development project to gain practical experience in building a real-world food ordering application.
Foody Guys combines Java backend development, MySQL database management, JSP/Servlet architecture, AJAX-based cart functionality, and modern frontend design into a complete food ordering experience.
If you find this project useful or interesting, feel free to ⭐ the repository.
🚧 Currently under development
The core restaurant browsing, menu, wishlist, and dynamic cart functionality has been implemented, with additional ordering and payment features planned for future versions.