Skip to content

shreyyyy666/Java-Project

Repository files navigation

Pizza Hut Clone

A production-quality Pizza Hut clone built with Spring Boot and Thymeleaf.

Features

  • User Accounts: Register, Login, Profile, Order History.
  • Restaurants & Menu: Browse restaurants, view menus, filter by category.
  • Cart & Checkout: Add items, update quantities, checkout with mock payments (Card/UPI).
  • Admin Panel: Manage restaurants, menu items, and orders.
  • Security: Role-based access control (User/Admin).

Tech Stack

  • Backend: Java 17, Spring Boot 3.2.0
  • Frontend: Thymeleaf, HTML5, CSS3
  • Database: MySQL 8.0
  • Build: Maven
  • Containerization: Docker, Docker Compose

Prerequisites

  • Java 17+
  • Maven 3.8+
  • Docker & Docker Compose

Setup & Run

Easy Run (Local)

The project is configured to use an in-memory database (H2), so no external database installation is required.

  1. Open terminal in project directory.
  2. Run the application:
    mvn spring-boot:run
    Or if using the packaged jar:
    java -jar target/clone-0.0.1-SNAPSHOT.jar
  3. Access the application at http://localhost:8080.

Docker (Optional)

If you prefer running with a real MySQL database:

  1. Uncomment MySQL config in src/main/resources/application.properties.
  2. Run docker-compose up --build.

Default Credentials

  • Admin User:
    • Email: admin@pizzahut.com
    • Password: password
  • Regular User:
    • Email: john@example.com
    • Password: password

API Documentation

The application uses Thymeleaf for server-side rendering, but API endpoints can be explored via the code structure in src/main/java/com/pizzahut/clone/controller.

Project Structure

  • src/main/java/com/pizzahut/clone: Source code
    • config: Security and app configuration
    • controller: Web controllers
    • model: Domain entities
    • repository: JDBC repositories
    • service: Business logic
  • src/main/resources:
    • static: CSS, JS, Images
    • templates: Thymeleaf views
    • schema.sql: Database schema
    • data.sql: Seed data

Testing

Run unit tests:

mvn test

About

Class: CS5 Group Members: Shreyas Tiwari - 0818CS241313 Siddh Sharma - 0818CS241317. This is our submission of the java group project for semester 3.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors