About A comprehensive inventory management system built with Java Spring Boot backend, MySQL database, and HTML CSS JAVASCRIPT frontend
- User Accounts & Roles: Admin, Staff, Manager with role-based access control
- Product Database: SKU management, categories, descriptions, pricing
- Supplier Database: Vendor details, contact information, transaction history
- Add/Edit/Remove Products: Complete CRUD operations for product management
- Stock In/Stock Out: Purchase, sales, returns tracking
- Batch/Lot Tracking: Expiry dates, manufacturing dates, batch numbers
- Multi-Warehouse Support: Scalable architecture for multiple locations
- RESTful API with Spring Boot
- JWT-based authentication
- MySQL database with proper relationships
- Interactive Java Swing GUI
- Real-time stock updates
- Transaction history tracking
- Search and filtering capabilities
- Java 17 or higher
- Maven 3.6 or higher
- MySQL 8.0 or higher
- Git
git clone <repository-url>
cd Arya- Install MySQL and start the service
- Create a database user (optional, can use root):
CREATE USER 'inventory_user'@'localhost' IDENTIFIED BY 'inventory_password'; GRANT ALL PRIVILEGES ON inventory_db.* TO 'inventory_user'@'localhost'; FLUSH PRIVILEGES;
- Run the initialization script:
mysql -u root -p < database/init.sql
Update src/main/resources/application.properties with your database credentials:
spring.datasource.username=your_username
spring.datasource.password=your_passwordmvn clean install
mvn spring-boot:runThe backend will start on http://localhost:8080
# Run the main application
java -cp target/classes com.arya.inventory.frontend.InventoryManagementApp- Username: admin
- Password: admin123
- Role: ADMIN
POST /api/auth/login- User loginPOST /api/auth/register- User registration
GET /api/products- Get all productsGET /api/products/{id}- Get product by IDGET /api/products/sku/{sku}- Get product by SKUGET /api/products/category/{category}- Get products by categoryGET /api/products/search?name={name}- Search productsGET /api/products/low-stock?threshold={threshold}- Get low stock productsPOST /api/products- Create productPUT /api/products/{id}- Update productPUT /api/products/{id}/stock?quantityChange={change}- Update stockDELETE /api/products/{id}- Delete product
GET /api/suppliers- Get all suppliersGET /api/suppliers/{id}- Get supplier by IDGET /api/suppliers/search?name={name}- Search suppliersPOST /api/suppliers- Create supplierPUT /api/suppliers/{id}- Update supplierDELETE /api/suppliers/{id}- Delete supplier
GET /api/transactions- Get all transactionsGET /api/transactions/{id}- Get transaction by IDGET /api/transactions/product/{productId}- Get transactions by productGET /api/transactions/type/{type}- Get transactions by typeGET /api/transactions/date-range?startDate={start}&endDate={end}- Get transactions by date rangeGET /api/transactions/batch/{batchNumber}- Get transactions by batch numberPOST /api/transactions- Create transactionDELETE /api/transactions/{id}- Delete transaction
GET /api/users- Get all usersGET /api/users/{id}- Get user by IDPOST /api/users- Create userPUT /api/users/{id}- Update userDELETE /api/users/{id}- Delete user
- Launch the application
- Use the default admin credentials or register a new user
- The interface will show different tabs based on your role
- Add Products: Click "Add Product" to create new inventory items
- Edit Products: Select a product and click "Edit Product"
- Stock Management: Use "Stock In" and "Stock Out" buttons for inventory adjustments
- Search & Filter: Use the search field and category dropdown to find products
- Add Suppliers: Click "Add Supplier" to add new vendors
- Edit Suppliers: Select a supplier and click "Edit Supplier"
- Search: Use the search field to find suppliers by name
- Add Transactions: Fill in the transaction form to record stock movements
- View History: The transaction table shows all inventory movements
- Batch Tracking: Use batch and lot numbers for detailed tracking
- Add Users: Create new user accounts with appropriate roles
- Edit Users: Modify user information and roles
- Delete Users: Remove user accounts (use with caution)
id- Primary keyusername- Unique usernamepassword- Encrypted passwordrole- User role (ADMIN, STAFF, MANAGER)
id- Primary keyname- Product namesku- Unique SKU codecategory- Product categoryprice- Product priceqty- Current quantitydescription- Product descriptionsupplier_id- Foreign key to suppliers
id- Primary keyname- Supplier namecontact- Contact informationhistory- Transaction historyaddress- Physical addressemail- Email addressphone- Phone number
id- Primary keyproduct_id- Foreign key to productsqty- Transaction quantitytype- Transaction type (STOCK_IN, STOCK_OUT, etc.)date- Transaction dateuser_id- Foreign key to usersnotes- Additional notesbatch_number- Batch trackinglot_number- Lot trackingexpiry_date- Product expiry datemanufacturing_date- Manufacturing date
- JWT token-based authentication
- Password encryption using BCrypt
- Role-based access control
- CORS configuration for web clients
- Input validation and sanitization
-
Database Connection Error
- Verify MySQL is running
- Check database credentials in application.properties
- Ensure database exists and user has proper permissions
-
Frontend Connection Error
- Ensure backend is running on port 8080
- Check firewall settings
- Verify network connectivity
-
Authentication Issues
- Use correct username/password
- Check if user account is active
- Verify JWT token expiration
- Backend logs: Check console output or log files
- Database logs: Check MySQL error logs
- Frontend logs: Check console output for Java Swing application
src/
├── main/
│ ├── java/com/arya/inventory/
│ │ ├── config/ # Security and configuration
│ │ ├── controller/ # REST API controllers
│ │ ├── dto/ # Data transfer objects
│ │ ├── entity/ # JPA entities
│ │ ├── frontend/ # Java Swing GUI
│ │ ├── repository/ # Data access layer
│ │ ├── service/ # Business logic
│ │ └── util/ # Utility classes
│ └── resources/
│ └── application.properties
├── database/
│ └── init.sql # Database initialization
└── pom.xml # Maven configuration
- Create entity classes in
entity/package - Add repository interfaces in
repository/package - Implement business logic in
service/package - Create REST endpoints in
controller/package - Add frontend components in
frontend/package
This project is licensed under the MIT License.
For support and questions, please contact the development team or create an issue in the project repository.