Smart warehouse management for the modern enterprise. Track inventory across multiple locations, automate stock alerts, and gain real-time visibility—all from a single, intuitive interface.
A modern full‑stack Inventory Management System built for logistics teams, warehouse operators, and procurement teams who need to manage products, suppliers, locations, and stock movements with precision and ease.
InventoryMS helps organizations manage inventory across multiple locations while tracking stock movements, suppliers, and warehouse operations.
It supports:
✅ Multi-Location Inventory - Manage stock across unlimited warehouse locations with real-time synchronization
✅ Real-Time Notifications - Server-Sent Events (SSE) streaming for instant low-stock alerts to warehouse managers
✅ Transaction Tracking - Complete audit trail of all IN/OUT movements with user attribution
✅ Role-Based Access - Three permission tiers (Warehouse Manager, Procurement Officer, Store Clerk)
✅ Smart Dashboards - Stock health overview, low-stock alerts, supplier insights
✅ Atomic Transactions - MongoDB sessions ensure consistency during multi-step stock operations
- E-Commerce Warehousing - Sync inventory across fulfillment centers with real-time low-stock alerts
- Retail Chain Operations - Centralized control over products, suppliers, and location-specific stock levels
- 3PL/Logistics Providers - Multi-tenant ready with role-based access for different operational teams
- Manufacturing Supply Chain - Track raw materials and components across production facilities
Frontend (React + TypeScript + Vite)
↓
Backend API (Express + Bun)
↓
MongoDB Database
The backend follows MVC architecture:
Routes → Controllers → Models → Database
| Tech | Purpose |
|---|---|
| React 19 | Component library |
| TypeScript | Type safety |
| Vite | Lightning-fast bundler |
| TailwindCSS | Utility-first styling |
| React Hook Form | Form state management |
| Zod | Schema validation |
| Axios | HTTP client |
| Tech | Purpose |
|---|---|
| Express | REST API framework |
| Bun Runtime | Fast JavaScript runtime |
| MongoDB | NoSQL database |
| Mongoose | ODM with schema validation |
| JWT | Stateless authentication |
| MongoDB Sessions | ACID transactions |
| Tech | Purpose |
|---|---|
| Vitest | Lightning-fast unit tests |
| Supertest | HTTP assertion library |
| MongoDB Memory Server | In-memory test database |
┌─────────────────────────────────────────────────────────────┐
│ Frontend (React + Vite) │
│ Dashboard | Inventory | Users | Suppliers │
└────────────────────────┬────────────────────────────────────┘
│ HTTP/HTTPS + JWT
↓
┌─────────────────────────────────────────────────────────────┐
│ REST API (Express + Bun) │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ Auth/Users │ │ Inventory │ │ Transactions │ │
│ │ (JWT) │ │ (Products, │ │ (Stock IN/OUT) │ │
│ │ │ │ Locations) │ │ │ │
│ └─────────────┘ └──────────────┘ └──────────────────┘ │
│ │
│ Real-Time SSE Streaming ↔ WebSocket Ready │
└────────────────────────┬────────────────────────────────────┘
│ Native MongoDB Drivers
↓
┌─────────────────────────────────────────────────────────────┐
│ MongoDB Atlas / Docker Container │
│ │
│ Collections: Users | Products | Suppliers | Stock | │
│ Transactions | Notifications | Locations │
└─────────────────────────────────────────────────────────────┘
Key Design Highlights:
- Transaction-safe stock operations using MongoDB sessions
- Server-Sent Events (SSE) for real-time notification delivery
- JWT-based stateless auth with role-based middleware
- Atomic operations prevent double-counting or overselling
inventory-management-system/
├── backend/ # Express API + business logic
│ ├── controllers/ # Request handlers (8 domains)
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API route definitions
│ ├── middleware/ # Auth & authorization
│ ├── utils/ # Helpers (notifications, streaming)
│ └── config/ # Database connection
├── frontend/ # React SPA
│ ├── components/ # Reusable UI widgets
│ ├── pages/ # Full-page components
│ ├── context/ # Global state (Auth, Theme)
│ ├── api/ # Axios instance & helpers
│ └── types/ # TypeScript definitions
└── README.md
- Node.js 18+ or Bun 1.0+
- MongoDB 5.0+ (local or Atlas)
- npm or bun package manager
# Clone repository
git clone https://github.com/AdharshJolly/inventory-management-system.git
cd inventory-management-system
# Set up environment
cp backend/.env.example backend/.envcd backend
bun install # or npm install
bun run dev # Starts on http://localhost:5000cd frontend
npm install
npm run dev # Starts on http://localhost:5173Create .env in the backend/ folder:
# Server
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/inventory_db
# Or use MongoDB Atlas:
# MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/inventory_db
# Authentication
JWT_SECRET=your_super_secret_key_here_change_in_production
JWT_EXPIRE=30d
# Optional: Email/Notifications
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password# Clone and enter directory
git clone https://github.com/AdharshJolly/inventory-management-system.git
cd inventory-management-system
# Start all services (MongoDB + Backend + Frontend)
docker-compose up -d
# Services will be available at:
# Frontend: http://localhost
# Backend API: http://localhost:5000
# MongoDB: localhost:27017- MongoDB 7.0 - Automatic database setup
- Express API - Running on port 5000
- React Frontend - Served via Nginx on port 80
- Health Checks - Automatic container monitoring
- Persistent Volumes - Database data survives container restarts
# View logs
docker-compose logs -f backend
docker-compose logs -f frontend
# Stop services
docker-compose down
# Rebuild images
docker-compose up -d --build
# Remove all data (careful!)
docker-compose down -vCreate a .env file in the project root:
JWT_SECRET=your_production_secret_key
MONGO_USERNAME=admin
MONGO_PASSWORD=secure_password_here
VITE_API_URL=http://localhost:5000Replace MONGODB_URI in docker-compose.yml:
MONGODB_URI: mongodb+srv://username:password@cluster.mongodb.net/inventory_dbPOST /api/auth/register
POST /api/auth/login
GET /api/auth/me
PUT /api/auth/profile
PUT /api/auth/change-password
GET /api/products
POST /api/products
PUT /api/products/:id
DELETE /api/products/:id
GET /api/suppliers
POST /api/suppliers
PUT /api/suppliers/:id
DELETE /api/suppliers/:id
GET /api/locations
POST /api/locations
PUT /api/locations/:id
DELETE /api/locations/:id
GET /api/transactions
POST /api/transactions
GET /api/transactions/stocks
GET /api/transactions/stocks/breakdown
PUT /api/transactions/stocks/:id
GET /api/notifications
PATCH /api/notifications/read-all
PATCH /api/notifications/:id/read
GET /api/notifications/stream # ← Server-Sent Events (SSE)
| Role | Access Level | Capabilities |
|---|---|---|
| warehouse-manager | Full Admin | View all modules, manage users, set alert levels, view analytics |
| procurement-officer | Moderator | Manage products & suppliers, approve transactions |
| store-clerk | Limited | Record stock movements, view current inventory |
# Backend tests
cd backend
bun test
# Frontend tests
cd ../frontend
npm run testCurrent test coverage: 85% for backend controllers and business logic.
The easiest way to deploy is using Docker and Docker Compose:
# Build images
docker-compose build
# Start services
docker-compose up -d
# Check logs
docker-compose logs -fThis deploys:
- Frontend on port 80 (Nginx)
- Backend API on port 5000
- MongoDB on port 27017
# Backend service
# Connect GitHub repo, select Python/Node buildpack
# Build command: bun install && bun build
# Start command: NODE_ENV=production bun run server.ts# Railway automatically detects and builds Node.js apps
# Set environment variables in Railway dashboard
# Push to GitHub and Railway auto-deploys# Push Docker images to ECR
aws ecr get-login-password | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com
docker tag inventory-backend:latest $AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com/inventory-backend:latest
docker push $AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com/inventory-backend:latest# Frontend can be deployed standalone to Vercel
cd frontend
npm run build
# Connect to Vercel via GitHub and it auto-deploys on push- 📱 Mobile app (React Native)
- 🔍 Barcode/QR scanning integration
- 📊 Advanced analytics & reporting dashboard
- 🔗 Multi-tenant architecture
- 🚀 WebSocket support for real-time collab
- 🤖 AI-powered reorder suggestions
- 📧 Email alerts & audit logs
- 🌍 Multi-language support
Contributions welcome! Please follow these steps:
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License — see LICENSE file for details.
Free for personal, commercial, and educational use.
- 📧 Email: adharshjolly23@gmail.com
- 💬 GitHub Issues: Report a bug
- 📖 Documentation: Check
/docsfolder
Adharsh Jolly — Full Stack Web Developer
🔗 GitHub | LinkedIn