This system is a Spring Boot + Java + MySQL web application designed for managing lost and found items. Users can register, log in, and report lost or found items. The system is structured with a backend for handling business logic and a frontend for user interaction.
To download the project, follow these steps:
- Open a terminal.
- Run:
Replace
git clone <repository_url>
<repository_url>
with the actual GitHub repository link. - Open the project in VS Code.
- Visit the GitHub repository.
- Click Code and select Download ZIP.
- Extract the ZIP file to a directory on your PC.
- Open the project folder in VS Code.
Before running the project, install the following:
-
Java Development Kit (JDK) 17+
- Download from Oracle JDK.
-
Spring Boot
- Already included via
pom.xml
.
- Already included via
-
MySQL Server
- Required to store user and lost/found item data.
-
VS Code Extensions
Install the following in VS Code:- Live Server (for running the frontend).
- Spring Boot Extension Pack (for backend development).
- Java Extension Pack (for Java support).
- Lombok Annotations Support for VS Code
- Start MySQL Server.
- Open MySQL Workbench or a terminal.
- Import the provided SQL file (
lostandfounddb_mysql
), which contains all required tables queries. - Verify that the tables have been created:
USE LostandFoundDB; SHOW TABLES;
The backend is located in com.example.LostAndFound
, which includes:
config
(security and database settings)dto
(data transfer objects)entity
(database models)repository
(database interaction)service
(business logic)
-
Open VS Code and load the project.
-
Open
application.properties
and configure database settings:spring.datasource.url=jdbc:mysql://localhost:3306/LostandFoundDB?useSSL=false&serverTimezone=UTC spring.datasource.username=root spring.datasource.password=your_password
Replace: root with your MySQL username, and your_password with your MySQL password.
-
Run the backend:
- In VS Code, open the main class (
LostAndFoundApplication.java
). - Click Run or execute this command in directory containing pom.xml:
mvn spring-boot:run
- If you don't have MAVEN installed, or it gives an error, Run or execute:
./mvnw spring-boot:run
- In VS Code, open the main class (
-
The backend should now be running on
http://localhost:8080
.
The frontend is located in com.example.LostAndFound.resources.static
, containing:
- CSS folder (styling)
- JS folder (JavaScript functionality)
- Pictures folder (images)
- Open the VS Code project.
- Navigate to the
static
folder. - Open
front.html
. - Right-click and select Open with Live Server or open
http://localhost:8080/front.html
in your broswer. - The frontend should now be running.
- Open the sign-up page.
- Enter user details and click Sign Up.
- Open the login page.
- Enter credentials and click Sign In.
If login is successful, the user will be redirected to the dashboard.
- Ensure MySQL is running.
- Verify
application.properties
has the correct database credentials.
- Check the browser console (
F12 > Console
). - Ensure the backend is running.
- Verify the MySQL database contains the necessary tables.
This document provides the necessary steps to set up and run the Lost and Found Management System.