A comprehensive offline-capable Inventory and Shipment Management System built for academic demonstration. This system tracks suppliers, products, customers with multiple phone numbers, warehouses, orders with line items, and shipments with real-time status tracking.
- Supplier Management: Track supplier information, contact persons, and email addresses
- Product Catalog: Manage products with categories, pricing, quantities, and supplier relationships
- Customer Management: Store customer details with multiple phone numbers and complete address information
- Warehouse Operations: Monitor warehouse capacity, locations, and contact information
- Order Processing: Create and manage orders with multiple line items and automatic total calculation
- Shipment Tracking: Track shipments with status updates (Scheduled, Dispatched, Delivered)
- Offline Operation: Fully functional without internet connectivity after initial setup
- Secure Authentication: HTTP Basic authentication for API endpoints
- Java: 17+
- Spring Boot: 3.3.4
- Spring Web
- Spring Security
- Spring JDBC
- Build Tool: Maven
- Database: MySQL 8.0
- HTML5: Structure
- CSS3: Styling
- JavaScript: Dynamic functionality with Fetch API
- HTTP Basic Authentication
- In-memory user credentials
- Protected API endpoints
Before running this project, ensure you have the following installed:
- Java Development Kit (JDK): Version 17 or higher
- Apache Maven: Version 3.6 or higher
- MySQL Server: Version 8.0 or higher (or XAMPP with MySQL)
- Web Browser: Modern browser with JavaScript enabled
git clone <repository-url>
cd "DBMS Mini Project"The project uses MySQL with the following default configuration:
- Database Name:
inventory_db - Database User:
inv_user - Database Password:
InvPass123! - Host:
localhost:3306
You can override these defaults using environment variables (see below).
For XAMPP users:
# Start XAMPP MySQL service from the XAMPP control panelFor standalone MySQL:
# macOS (Homebrew)
brew services start mysql
# Linux
sudo systemctl start mysql
# Windows
net start MySQL80The project includes a convenient startup script that automatically:
- Creates the database if it doesn't exist
- Sets up the database user with proper privileges
- Starts the Spring Boot application
chmod +x start_project.sh
./start_project.shYou can customize the database configuration by setting environment variables before running the script:
export MYSQL_ROOT_USER=root
export MYSQL_ROOT_PWD=your_root_password
export MYSQL_HOST=127.0.0.1
export MYSQL_PORT=3306
export DB_NAME=inventory_db
export DB_USER=inv_user
export DB_PASS=InvPass123!
./start_project.shOnce the application starts successfully, open your web browser and navigate to:
http://localhost:8080/static/welcome.html
The application uses HTTP Basic Authentication with the following default credentials:
- Username:
admin - Password:
admin123
All API endpoints under /api/** require authentication. Public pages include the welcome page, login page, and static assets.
DBMS Mini Project/
├── src/
│ └── main/
│ ├── java/com/example/inventory/
│ │ ├── InventoryApplication.java
│ │ ├── config/
│ │ │ └── SecurityConfig.java
│ │ ├── model/
│ │ │ ├── Customer.java
│ │ │ ├── Order.java
│ │ │ ├── OrderItem.java
│ │ │ ├── Product.java
│ │ │ ├── Shipment.java
│ │ │ ├── Supplier.java
│ │ │ └── Warehouse.java
│ │ ├── repo/
│ │ │ ├── CustomerRepository.java
│ │ │ ├── OrderRepository.java
│ │ │ ├── ProductRepository.java
│ │ │ ├── ShipmentRepository.java
│ │ │ ├── SupplierRepository.java
│ │ │ └── WarehouseRepository.java
│ │ └── web/
│ │ ├── CustomerController.java
│ │ ├── OrderController.java
│ │ ├── PingController.java
│ │ ├── ProductController.java
│ │ ├── ShipmentController.java
│ │ ├── SupplierController.java
│ │ └── WarehouseController.java
│ └── resources/
│ ├── application.properties
│ ├── schema.sql
│ └── static/
│ ├── css/style.css
│ ├── js/ui.js
│ ├── welcome.html
│ ├── login.html
│ ├── dashboard.html
│ ├── suppliers.html
│ ├── products.html
│ ├── customers.html
│ ├── warehouses.html
│ ├── orders.html
│ └── shipments.html
├── pom.xml
├── start_project.sh
├── load_sample_data.sh
└── README.md
GET /api/ping- Returns system status
GET /api/suppliers- List all suppliersGET /api/suppliers/{id}- Get supplier by IDPOST /api/suppliers- Create new supplierPUT /api/suppliers/{id}- Update supplierDELETE /api/suppliers/{id}- Delete supplier
GET /api/products- List all productsGET /api/products/{id}- Get product by IDPOST /api/products- Create new productPUT /api/products/{id}- Update productDELETE /api/products/{id}- Delete product
GET /api/customers- List all customersGET /api/customers/{id}- Get customer by IDPOST /api/customers- Create new customerPUT /api/customers/{id}- Update customerDELETE /api/customers/{id}- Delete customerGET /api/customers/{id}/phones- List customer phone numbersPOST /api/customers/{id}/phones- Add phone numberDELETE /api/customers/{id}/phones/{phone}- Remove phone number
GET /api/warehouses- List all warehousesGET /api/warehouses/{id}- Get warehouse by IDPOST /api/warehouses- Create new warehousePUT /api/warehouses/{id}- Update warehouseDELETE /api/warehouses/{id}- Delete warehouse
GET /api/orders- List all ordersGET /api/orders/{id}- Get order by IDPOST /api/orders- Create new orderPUT /api/orders/{id}- Update orderDELETE /api/orders/{id}- Delete orderGET /api/orders/{id}/items- List order itemsPOST /api/orders/{id}/items- Add order itemDELETE /api/orders/{id}/items/{itemId}- Remove order item
GET /api/shipments- List all shipmentsGET /api/shipments/{id}- Get shipment by IDPOST /api/shipments- Create new shipmentPATCH /api/shipments/{id}/status- Update shipment statusDELETE /api/shipments/{id}- Delete shipment
The system uses a normalized relational database schema with the following tables:
- supplier: Supplier information
- customer: Customer details with address
- customer_phone: Multiple phone numbers per customer (composite key)
- warehouse: Warehouse locations and capacity
- product: Product catalog with supplier relationships
- orders: Customer orders with dates and totals
- order_item: Individual line items for each order
- shipment: Shipment tracking with status
For detailed schema information, see Description.md and the ER diagram.
- Description.md: Comprehensive technical documentation including database schema, API details, and implementation notes
- FILTER_IMPLEMENTATION_GUIDE.md: Guide for implementing filtering features
- SAMPLE_DATA_REFERENCE.md: Reference for sample data and testing
- ER Diagram.jpg: Entity-Relationship diagram
- Relational_mapping.jpg: Database relational schema mapping
Navigate to the welcome page and click "Login". Use the credentials admin / admin123.
After login, you'll see the main dashboard with links to all modules.
Suppliers: Add, update, or delete supplier information Products: Manage product catalog with pricing and inventory Customers: Add customers with multiple phone numbers Warehouses: Track warehouse locations and capacity Orders: Create orders and add line items (totals calculate automatically) Shipments: Create shipments and update status through the workflow
mvn testmvn clean packageThe compiled JAR will be available in the target/ directory.
mvn spring-boot:runIf you encounter database connection errors:
- Verify MySQL is running
- Check credentials in
application.properties - Ensure the database user has proper privileges
- Verify the database exists
If port 8080 is already in use, you can change it in application.properties:
server.port=8081When deleting entities, be aware of foreign key relationships:
- Deleting a customer cascades to their phone numbers
- Deleting an order cascades to order items and shipments
- Deleting a supplier requires removing dependent products first
- Deleting a warehouse requires removing dependent shipments first
- Built as a DBMS Mini Project for academic demonstration
- Uses Spring Boot framework and MySQL database
- Implements offline-capable architecture for reliable operation