Skip to content

Vishal45718/IMS_Full-Stack-Inventory-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

IMS - Full-Stack Inventory Management System

License: MIT Go Next.js MySQL

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.

Table of Contents

Features

Core Functionality

  • 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

Technical Features

  • 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

Tech Stack

Backend

  • Language: Go (Golang)
  • Framework: Gin Web Framework
  • Database: MySQL
  • Authentication: JWT tokens with middleware

Frontend

  • Framework: Next.js 14 with TypeScript
  • Styling: Tailwind CSS
  • Authentication: NextAuth.js
  • State Management: React hooks and context

Database

  • MySQL: Relational database with custom triggers and stored procedures
  • Schema: Normalized design with foreign key relationships

Prerequisites

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

Installation

1. Clone the Repository

git clone https://github.com/Vishal45718/IMS---Full-Stack-Inventory-Management-System.git
cd IMS---Full-Stack-Inventory-Management-System

2. Backend Setup

cd 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.go

The backend will start on http://localhost:8080

3. Frontend Setup

cd services/frontend

# Install dependencies
npm install

# Start the development server
npm run dev

The frontend will be available at http://localhost:3000

Usage

For Users

  1. Sign Up/Login: Create an account or log in with existing credentials
  2. Dashboard: View system overview and key metrics
  3. Products: Browse, add, update, and sell products
  4. Orders: Create new orders and track existing ones
  5. Suppliers: Manage supplier information
  6. Branches: View and manage branch-specific data
  7. History: Review entry and order history

For Developers

  • 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

Database Schema

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)

API Documentation

Authentication Endpoints

  • POST /api/auth/login - User login
  • POST /api/auth/signup - User registration
  • POST /api/auth/logout - User logout

Product Endpoints

  • GET /api/products - List all products
  • POST /api/products - Create new product
  • PUT /api/products/:id - Update product
  • DELETE /api/products/:id - Delete product

Order Endpoints

  • GET /api/orders - List orders
  • POST /api/orders - Create order
  • GET /api/orders/:id - Get order details

Supplier Endpoints

  • GET /api/suppliers - List suppliers
  • POST /api/suppliers - Add supplier
  • PUT /api/suppliers/:id - Update supplier

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Make your changes and commit: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature-name
  5. Open a Pull Request

Development Guidelines

  • Follow Go and TypeScript best practices
  • Write clear commit messages
  • Test your changes thoroughly
  • Update documentation as needed

Credits

Contributors:

Project Supervisor: DBMS-II Course Faculty

License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-Party Licenses

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.

About

Full-stack Inventory Management System built with Go, Next.js, and MySQL, featuring RESTful APIs, JWT authentication, and real-time multi-branch inventory tracking.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors