A production-quality Pizza Hut clone built with Spring Boot and Thymeleaf.
- 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).
- Backend: Java 17, Spring Boot 3.2.0
- Frontend: Thymeleaf, HTML5, CSS3
- Database: MySQL 8.0
- Build: Maven
- Containerization: Docker, Docker Compose
- Java 17+
- Maven 3.8+
- Docker & Docker Compose
The project is configured to use an in-memory database (H2), so no external database installation is required.
- Open terminal in project directory.
- Run the application:
Or if using the packaged jar:
mvn spring-boot:run
java -jar target/clone-0.0.1-SNAPSHOT.jar
- Access the application at
http://localhost:8080.
If you prefer running with a real MySQL database:
- Uncomment MySQL config in
src/main/resources/application.properties. - Run
docker-compose up --build.
- Admin User:
- Email:
admin@pizzahut.com - Password:
password
- Email:
- Regular User:
- Email:
john@example.com - Password:
password
- Email:
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.
src/main/java/com/pizzahut/clone: Source codeconfig: Security and app configurationcontroller: Web controllersmodel: Domain entitiesrepository: JDBC repositoriesservice: Business logic
src/main/resources:static: CSS, JS, Imagestemplates: Thymeleaf viewsschema.sql: Database schemadata.sql: Seed data
Run unit tests:
mvn test