A Full Stack Food Delivery Web Application built using Java, JSP, Servlets, JDBC, MySQL, HTML, CSS, JavaScript, BCrypt and Razorpay.
TapFoods is a full-stack food delivery web application that allows users to securely register and log in, browse restaurants, explore menus, search food items, manage a shopping cart, place orders, make online payments, manage their profile, and track previous orders through a responsive and user-friendly interface.
The customer module is fully functional with secure authentication, complete ordering workflow, Cash on Delivery, and Razorpay Test Mode payment integration.
- Secure User Registration
- BCrypt Password Hashing
- Secure Login
- Session Management
- Change Password
- Logout
- Browse Restaurants
- Search Restaurants
- View Restaurant Menu
- Search Food Items
- View Food Details
- Add Items to Cart
- Update Item Quantity
- Remove Items
- Automatic Price Calculation
- Dynamic Grand Total
- Customer Delivery Details
- Delivery Address
- Cash on Delivery (COD)
- Razorpay Payment Gateway Integration
- Razorpay Test Mode Payments
- Secure Payment Verification
- Razorpay Order ID Management
- Razorpay Payment ID Management
- Payment Signature Verification
- Payment Status Storage
- Order Confirmation
- Order Success Page
- Place Orders
- Order History
- Search Orders
- Order Status Tracking
- Cancel Orders
- View Ordered Items
- Payment Method Information
- View Profile
- Edit Profile
- Update Delivery Address
- Change Password
- HTML5
- CSS3
- JavaScript
- JSP
- Java
- Jakarta Servlets
- JDBC
- DAO Architecture
- MySQL
- BCrypt Password Hashing
- Session-Based Authentication
- Razorpay Payment Signature Verification
- Razorpay
- Apache Tomcat 10
- Eclipse IDE
- Git
- GitHub
FoodDelivery
β
βββ src/main/java
β βββ com.food
β βββ DAO
β βββ DAOImpl
β βββ Model
β βββ servlets
β βββ utility
β
βββ src/main/webapp
β βββ images
β βββ WEB-INF
β β βββ lib
β βββ Cart.jsp
β βββ Checkout.jsp
β βββ Login.jsp
β βββ Menu.jsp
β βββ MyOrders.jsp
β βββ OrderSuccess.jsp
β βββ Profile.jsp
β βββ RazorpayPayment.jsp
β βββ Register.jsp
β βββ Restaurant.jsp
β
βββ Database
The complete customer ordering workflow is:
- User creates an account or logs in securely.
- User browses available restaurants.
- User selects a restaurant and explores its menu.
- User searches and adds food items to the cart.
- User updates quantities or removes unwanted items.
- User proceeds to checkout.
- User enters delivery information.
- User selects a payment method:
- Cash on Delivery (COD)
- Razorpay Online Payment
- For online payments, a Razorpay order is created securely.
- Razorpay processes the payment in Test Mode.
- The backend verifies the Razorpay payment signature.
- After successful verification, the order is stored in the database.
- The user is redirected to the Order Success page.
- The order becomes available in My Orders / Order History.
TapFoods integrates Razorpay for secure online payment processing.
The payment implementation includes:
- Razorpay Order Creation
- Amount Conversion from Rupees to Paise
- Razorpay Checkout Integration
- Payment ID Handling
- Razorpay Order ID Handling
- HMAC SHA-256 Signature Verification
- Payment Verification on the Backend
- Payment Status Management
- Order Creation After Successful Payment Verification
- Razorpay Test Mode Support
Note: The deployed project currently uses Razorpay Test Mode. No real money is charged while testing the application.
Security features implemented in the application include:
- BCrypt password hashing
- Session-based authentication
- Protected customer pages
- Server-side payment verification
- Razorpay HMAC SHA-256 signature validation
- Environment-based configuration for sensitive deployment credentials
- User-specific order history
- Secure password change functionality
API keys, database credentials, and other sensitive information should never be committed to the repository.
TapFoods is deployed and available online.
π Live Application:
https://tapfoods-fullstack-food-delivery.onrender.com
- User Registration & Login
- Restaurant and Menu Browsing
- Shopping Cart
- Checkout
- Cash on Delivery
- Razorpay Test Payment
- Order History
- Order Cancellation
- Profile Management
Note: Razorpay is integrated in Test Mode for demonstration purposes.
The application is deployed as a Dockerized Java web application.
- Java 21
- Apache Tomcat 10.1
- Docker
- Render
- MySQL
- GitHub
The Java Dynamic Web Project is exported as a WAR file and deployed inside an Apache Tomcat Docker container.
FROM tomcat:10.1-jdk21-temurin
RUN rm -rf /usr/local/tomcat/webapps/*
COPY FoodDelivery.war /usr/local/tomcat/webapps/ROOT.war
RUN sed -i 's/port="8005"/port="-1"/' /usr/local/tomcat/conf/server.xml && \
sed -i 's/port="8080"/port="${PORT}"/' /usr/local/tomcat/conf/server.xml
ENV PORT=10000
EXPOSE 10000
CMD ["catalina.sh", "run"]











