My Fridge is a web application that helps user track the food items in their fridge. It allows users to add, view, update, and delete foot items, including their names, types, and expiration date.
- View all food items in the fridge with their details (name, type, and expiration date).
- Add new food items to the fridge.
- Update existing food items.
- Delete food items.
- Simple, user-friendly interface using Spring Boot and Thymeleaf.
- Java (JDK 17) - The backend of the application is built using Java.
- Spring Boot 3.4.3 - Backend framework used for the app.
- Spring Data JPA - For database interaction.
- MySQL - Database for storing food items.
- Thymeleaf - Templating engine for rendering HTML views.
- CSS - For styling the frontend.
Make sure you have the following installed:
- Java 11 or higher
- Maven (or use the Maven wrapper)
- MySQL
- An IDE like IntelliJ IDEA or Eclipse
git clone https://github.com/yourusername/myfridge.git
cd myfridge-
Create a MySQL Database
- Create a new database named
myfridgein MySQL.
- Create a new database named
-
Configure Database Connection
- Create a application.properties file at
src/main/resources/. - Configure the
spring.datasourcesettings to connect to your database:
spring.datasource.url=jdbc:mysql://localhost:3306/myfridge spring.datasource.username=root spring.datasource.password=yourpassword spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.jpa.hibernate.ddl-auto=update spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
- Replace yourpassword with your actual MySQL password.
- Create a application.properties file at
-
Build the Project
- Run the following command to build the project:
mvn clean install
-
Run the Application
- You can run the Spring Boot application using:
mvn spring-boot:run
-
Access the Application
- Once the application is running, navigate to the following URL in your browser:
http://localhost:8080/fridge-items
Here are some previews of MyFridge in action:



