SmartShelf is a secure, role-based platform designed to optimize retail inventory management.
It uses an AI-powered forecasting module to predict demand, automates the purchase order workflow, and provides real-time sales reporting and critical stock alerts.
- Secure authentication and authorization using JWT (JSON Web Tokens).
- Roles: ADMIN, STORE_MANAGER, and USER.
- Full CRUD (Create, Read, Update, Delete) functionality for inventory items.
- Dynamic, date-filtered sales data visualization (Revenue Trend Graph).
- Accurate Total Revenue calculation.
- Export detailed sales reports to Excel (.xlsx).
- Predicts future stock needs using historical sales data.
- Provides intelligent restock suggestions.
- Manages Purchase Orders (PO) through status transitions:
PENDING → APPROVED → RECEIVED - Automatically updates inventory levels upon receipt.
- Real-time dashboard alerts for items below critical thresholds.
| Component | Technology | Description |
|---|---|---|
| Backend | Java 17, Spring Boot 3 | Handles business logic, security (JWT), and REST API endpoints. |
| Frontend | React, JavaScript | Built with React Router, Material-UI (MUI) for UI/UX, and Recharts for visualization. |
| Database | MySQL / MariaDB | Persistent storage for all entities (Users, Products, Sales, POs, etc.). |
| Security | JSON Web Tokens (JWT) | Stateless authentication and token-based authorization. |
To run SmartShelf locally, you’ll need to set up the Backend, Database, and Frontend separately.
- Ensure you have MySQL or MariaDB running.
- Create a new database named:
CREATE DATABASE smartshelf_db;
- The Spring Boot application will automatically create all necessary tables (
users,products,sales,purchase_orders, etc.) via Hibernate/JPA.
-
Navigate to the backend directory:
cd smartshelf-backend/ -
Configure application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/smartshelf_db spring.datasource.username=your_db_username spring.datasource.password=your_db_password spring.jpa.hibernate.ddl-auto=update
(Optional) Configure JWT secrets if necessary.
-
Run the application:
./mvnw spring-boot:run
The backend should start on:
👉 http://localhost:8080
-
Navigate to the frontend directory:
cd smartshelf-frontend/ -
Install dependencies:
npm install
If you face dependency issues (e.g., with
jspdf-autotable), try:npm install --force
-
Run the frontend:
npm start
The application will open in your browser at:
👉 http://localhost:3000
For initial testing, use the following default users (ensure they are seeded manually or via API):
| Role | Username | Password | Access Level |
|---|---|---|---|
| ADMIN | admin | password | Full Control, User Management |
| MANAGER | manager | password | Product CRUD, AI, Reports, Restock |
| USER | user | password | Shopping / Viewing |