Cafe management is a Java-based application designed to manage a café's menu, customer interactions, and shopping cart functionalities. Built using Spring Boot and JPA, this project provides a structured way to handle café-related operations, allowing users to view menus, manage their shopping carts, and place orders. This particular one is supernatural themed.
- Cafe Menu Management: Load and view cafe menus with various sections and items.
- Customer Management: Register, update, and manage customer information.
- Shopping Cart: Add, update, and remove items from the cart, with total price calculations.
- Role-Based Access: Different roles including ADMIN, EMPLOYEE, and CUSTOMER to handle permissions.
- Currently in MVP stage
- Reviews
- Blog
- Sign up for rewards
- Promo codes
- Earn points
- Join view/Events
- Java 17
- Spring Boot
- JPA (Hibernate)
- Lombok
- Jackson for JSON processing
- MySQL Database
cafe_mvp/
│
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── perscholas/
│ │ │ └── cafe_mvp/
│ │ │ ├── model/
│ │ │ ├── repository/
│ │ │ ├── service/
│ │ │ └── CafeMvpApplication.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── menu.json
│ └── test/
│ └── java/
├── pom.xml
└── README.md
- Java 17 or higher
- Maven
- Clone the repository:
git clone https://github.com/yourusername/cafe_mvp.git cd cafe_mvp - Make sure you name the database
cafemvpdbor alternatively, rename it inapplication,properties#Look for this line spring.datasource.url=jdbc:mysql://localhost:3306/cafemvpdb - You can configure the application by modifying the application.properties file located in src/main/resources. Here’s an example configuration for a MySQL database:
spring.datasource.url=jdbc:mysql://localhost:3306/cafedb spring.datasource.username=root spring.datasource.password=yourpassword spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application at:
http://localhost:8080
The application can load an initial menu from a JSON file (menu.json). Ensure that this file is placed in the src/main/resources directory.