A Spring Boot web application for managing stock items, users, orders, suppliers, expiry tracking, alerts, and operational reports. The system uses JSP pages for the user interface and simple text-file storage for project data.
- Java 17
- Spring Boot 3.4.4
- Spring MVC
- Apache Maven
- JSP
- JSTL / Jakarta Servlet JSP JSTL
- Embedded Apache Tomcat
- Lombok
- HTML, CSS, and JSP views
- Text-file based persistence
- IntelliJ IDEA compatible project structure
Handles inventory item creation, listing, updating, and deletion.
- Add perishable and non-perishable stock items
- Store item ID, name, quantity, supplier, and expiry date where applicable
- Update stock details
- Delete stock records
- View all available stock
- Uses stack-based item storage in
StockService
Main routes:
/stock/add/stock/list/stock/update/{id}
Tracks and displays stock items by expiry date.
- Sorts perishable items by expiry date
- Places non-perishable items after items with expiry dates
- Uses merge sort logic through
MergeSortUtil
Main route:
/expiry/view
Manages users who can be associated with orders.
- Add users
- List users
- Update user details
- Delete users
- Validates user ID, name, and email
- Sorts users by ID
Main routes:
/user/add/user/list/user/update/{id}
Handles customer/user orders for stock items.
- Place orders
- Validate user ID and stock item ID
- Check available stock quantity
- Reduce stock quantity after order placement
- Cancel orders and restore stock quantity
- List all orders sorted by order date
Main routes:
/order/add/order/list/order/cancel
Provides a dashboard summary of important system data.
- Total stock items
- Low-stock items
- Total stock quantity
- Total orders
- Most ordered item
- Recent orders
- Total users
- Most active user
- Total suppliers
- Most active supplier
Main route:
/report/dashboard
Manages stock and expiry alerts.
- Generate low-stock alerts
- Generate expiry alerts
- View active alerts
- View alert details
- Mark alerts as resolved
- Delete alerts
- Sort alerts by created date
Main routes:
/alert/dashboard/alert/details/{id}/alert/resolve/{id}/alert/delete/{id}
Manages supplier information used by stock items.
- Add suppliers
- List suppliers
- Update supplier details
- Delete suppliers
- Link suppliers with stock items
Main routes:
/supplier/add/supplier/list/supplier/edit/{id}/supplier/delete/{id}
src/main/java/com/ismysystem/inventorystocksystem
├── Controller
├── Model
├── Service
├── HomeController.java
├── TestController.java
└── InventoryStockSystemApplication.java
src/main/webapp/WEB-INF/views
├── Component01
├── Component02
├── Component03
├── Component04
├── Component05
├── Component06
├── Component07
└── index.jsp
The application stores data in text files in the project root:
items.txt- stock item recordsorders.txt- order recordsusers.txt- user recordsalerts.txt- alert records
- Java 17 or newer
- Maven, or use the included Maven wrapper
- IntelliJ IDEA or another Java IDE
- Open IntelliJ IDEA.
- Open the project folder.
- Wait for Maven dependencies to load.
- Set the Project SDK to Java 17.
- Open
InventoryStockSystemApplication.java. - Run the
mainmethod. - Open the application in a browser:
http://localhost:8083
./mvnw spring-boot:runThen visit:
http://localhost:8083
Run the test suite:
./mvnw testBuild the project:
./mvnw clean packageThe main configuration is in src/main/resources/application.properties.
spring.application.name=inventory-stock-system
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
server.port=8083- The application uses JSP files under
WEB-INF/views. - The server runs on port
8083. - Data is stored locally in text files, so no external database setup is required.
- The project is designed as an educational inventory and stock management system.