This project consists of two applications: a JavaFX frontend for user interaction and a Spring Boot backend for managing inventory data through a RESTful API.
- Features
- Technologies Used
- Architecture
- Screenshots
- Installation
- Usage
- Contributing
- License
- Acknowledgements
-
Frontend (JavaFX)
- User-friendly graphical interface
- Add, update, delete, and search inventory items
-
Backend (Spring Boot)
- RESTful API for inventory management
- CRUD operations
- Database integration with JPA/Hibernate
-
Frontend
- Java
- JavaFX
- FXML
-
Backend
- Java
- Spring Boot
- Spring Data JPA
- Hibernate
- MySQL
- Maven
- JavaFX Frontend: Handles the user interface and interacts with the backend API.
- Spring Boot Backend: Provides RESTful services to manage inventory data, with database integration for persistence.
- Java Development Kit (JDK) 11 or later
- Maven
- MySQL (or another relational database)
-
Clone the Repository:
git clone https://github.com/yourusername/inventory-management-system.git
-
Navigate to the Backend Directory:
cd inventory-management-system/backend
-
Configure the Database:
- Update the
application.properties
file (located insrc/main/resources
) with your database configuration:spring.datasource.url=jdbc:mysql://localhost:3306/inventory_db spring.datasource.username=your_db_username spring.datasource.password=your_db_password spring.jpa.hibernate.ddl-auto=update
- Update the
-
Build and Run the Backend Application:
mvn spring-boot:run
-
Navigate to the Frontend Directory:
cd inventory-management-system/frontend
-
Open the Project in Your IDE:
- Open your favorite IDE (like IntelliJ IDEA, Eclipse, or NetBeans).
- Import the project as a Maven project if applicable.
-
Run the Frontend Application:
- Locate the
Main
class and run it.
- Locate the
- Start the Backend:
- Ensure the backend application is running (see Backend Setup).
- Start the Frontend:
- Run the JavaFX application (see Frontend Setup).
Use tools like Postman or curl to test the backend API endpoints.
- GET /api/items: Retrieve all inventory items
- POST /api/items: Add a new inventory item
- PUT /api/items/{id}: Update an existing inventory item
- DELETE /api/items/{id}: Delete an inventory item
-
Retrieve All Items:
curl -X GET http://localhost:8080/api/items
-
Add a New Item:
curl -X POST http://localhost:8080/api/items -H "Content-Type: application/json" -d '{"name":"ItemName","quantity":10,"price":100.0}'
-
Update an Item:
curl -X PUT http://localhost:8080/api/items/1 -H "Content-Type: application/json" -d '{"name":"UpdatedItemName","quantity":20,"price":200.0}'
-
Delete an Item:
curl -X DELETE http://localhost:8080/api/items/1
Contributions are welcome! Please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the Spring Boot and JavaFX communities for their resources and support.