A comprehensive Inventory Management System (IMS) built as a full-stack web application for the DBMS-II course project. This system enables businesses to efficiently manage their inventory, track products, handle orders, manage suppliers, and monitor branch operations with real-time data insights.
- Features
- Tech Stack
- Prerequisites
- Installation
- Usage
- Database Schema
- API Documentation
- Contributing
- Credits
- License
- Third-Party Licenses
- User Authentication & Authorization: Secure login/signup with role-based access control
- Product Management: Add, update, view, and sell products with quantity tracking
- Order Management: Create and track orders with detailed history
- Supplier Management: Manage supplier information and relationships
- Branch Management: Multi-branch support with location-based inventory
- Inventory Tracking: Real-time stock monitoring and low-stock alerts
- History & Analytics: Comprehensive entry and order history with profit tracking
- Announcements: System-wide announcements for users
- RESTful API: Well-structured backend API with CRUD operations
- Database Triggers & Functions: Automated database operations for data integrity
- Responsive UI: Modern, mobile-friendly interface built with Next.js
- Real-time Updates: Dynamic data synchronization between frontend and backend
- Secure Authentication: JWT-based authentication with session management
- Language: Go (Golang)
- Framework: Gin Web Framework
- Database: MySQL
- Authentication: JWT tokens with middleware
- Framework: Next.js 14 with TypeScript
- Styling: Tailwind CSS
- Authentication: NextAuth.js
- State Management: React hooks and context
- MySQL: Relational database with custom triggers and stored procedures
- Schema: Normalized design with foreign key relationships
Before running this application, ensure you have the following installed:
- Go: Version 1.21 or higher
- Node.js: Version 18 or higher
- npm: Latest version
- MySQL: Version 8.0 or higher
- Git: For version control
git clone https://github.com/Vishal45718/IMS---Full-Stack-Inventory-Management-System.git
cd IMS---Full-Stack-Inventory-Management-Systemcd services/backend
# Install Go dependencies
go mod tidy
# Create .env file with database configuration
# Format: DB_URL = "username:password@tcp(host:port)/database_name"
echo 'DB_URL = "root:root@tcp(127.0.0.1:3306)/ims_db"' > .env
# Initialize database (run SQL scripts)
# Note: Execute the SQL files in order: tables.sql, triggers.sql, functions.sql, load_tables.sql
# Start the backend server
go run main.goThe backend will start on http://localhost:8080
cd services/frontend
# Install dependencies
npm install
# Start the development server
npm run devThe frontend will be available at http://localhost:3000
- Sign Up/Login: Create an account or log in with existing credentials
- Dashboard: View system overview and key metrics
- Products: Browse, add, update, and sell products
- Orders: Create new orders and track existing ones
- Suppliers: Manage supplier information
- Branches: View and manage branch-specific data
- History: Review entry and order history
- API Testing: Use tools like Postman to test endpoints
- Database Management: Use MySQL Workbench for database operations
- Development: Make changes and test locally before committing
The system uses a normalized MySQL database with the following main entities:
- Users: User accounts with authentication details
- Products: Product catalog with pricing and quantity
- Orders: Customer orders with line items
- Suppliers: Supplier information and relationships
- Branches: Multi-branch support
- History Tables: Audit trails for entries and orders
- Announcements: System-wide notifications
Key relationships include:
- Products ↔ Suppliers (many-to-many)
- Orders ↔ Products (many-to-many via order items)
- Users ↔ Branches (many-to-one)
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationPOST /api/auth/logout- User logout
GET /api/products- List all productsPOST /api/products- Create new productPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/orders- List ordersPOST /api/orders- Create orderGET /api/orders/:id- Get order details
GET /api/suppliers- List suppliersPOST /api/suppliers- Add supplierPUT /api/suppliers/:id- Update supplier
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and commit:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature-name - Open a Pull Request
- Follow Go and TypeScript best practices
- Write clear commit messages
- Test your changes thoroughly
- Update documentation as needed
Contributors:
Project Supervisor: DBMS-II Course Faculty
This project is licensed under the MIT License - see the LICENSE file for details.
This project uses the following third-party libraries:
- Gin Web Framework: MIT License
- Next.js: MIT License
- Tailwind CSS: MIT License
- NextAuth.js: ISC License
- MySQL Driver: Mozilla Public License 2.0
For detailed license information, please refer to the respective project repositories.