A comprehensive, full-stack inventory management solution built with Next.js, Mongoose, and modern web technologies for efficient product tracking and business operations.
- Complete Product Management: Full CRUD operations with advanced filtering and search
- Real-time Analytics Dashboard: Comprehensive statistics and reporting with interactive charts
- Multi-format Export: CSV and Excel export capabilities with applied filters
- Smart Inventory Tracking: Automatic status calculation (Available, Stock Low, Stock Out)
- QR Code Integration: Instant QR code generation for product identification
- Category Management: Organize products by customizable categories
- Supplier Tracking: Complete vendor management with contact information
- Advanced Filtering: Filter by category, supplier, status, and custom search terms
- User-specific Data: Isolated data per user with secure access controls
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Dark/Light Mode: Seamless theme switching with persistent preferences
- Modern UI Components: Clean, professional interface with consistent design system
- Real-time Updates: Live data synchronization and instant feedback
- Secure Authentication: JWT-based login system with session management
- API Documentation: Interactive API reference with testing capabilities
- System Monitoring: Real-time API health status and performance metrics
- Database Seeding: Automated sample data generation for testing and demos
Use these credentials to explore the application:
📧 Email: [email protected]
🔑 Password: user@123
Quick Access: Visit http://localhost:3000 and use the credentials above to login.
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Mongoose ODM
- Database: MongoDB with connection pooling
- UI Components: Radix UI, Lucide Icons
- State Management: Zustand for client state
- Authentication: Custom JWT implementation
- Charts & Analytics: Recharts for data visualization
- Export Libraries: PapaParse (CSV), XLSX (Excel)
- Node.js 18+ and npm
- MongoDB database (local or cloud instance)
-
Clone the repository
git clone https://github.com/sirajahmedx/inventory.git cd inventory
-
Install dependencies
npm install
-
Environment Setup Create a
.env.local
file in the root directory:DATABASE_URL=mongodb://localhost:27017/inventory JWT_SECRET=your_super_secret_jwt_key_here NEXTAUTH_SECRET=your_nextauth_secret_here NEXTAUTH_URL=http://localhost:3000
-
Database Setup
# Ensure MongoDB is running mongod
-
Seed Database (Optional) Populate with sample data:
npm run seed
This creates 10 categories, 5 suppliers, and 100+ products.
-
Start Development Server
npm run dev
-
Access Application Open http://localhost:3000 and login with demo credentials.
inventory/
├── app/ # Next.js App Router
│ ├── api/ # API Routes
│ │ ├── auth/ # Authentication endpoints
│ │ ├── products/ # Product CRUD operations
│ │ ├── categories/ # Category management
│ │ └── suppliers/ # Supplier management
│ ├── analytics/ # Analytics dashboard
│ ├── api-docs/ # API documentation
│ ├── api-status/ # System monitoring
│ └── components/ # Reusable UI components
├── models/ # Mongoose schemas
├── lib/ # Utility functions
└── public/ # Static assets
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run seed # Populate database with sample data
POST /api/auth/register
- User registrationPOST /api/auth/login
- User authenticationPOST /api/auth/logout
- User logoutGET /api/auth/session
- Session validation
GET /api/products
- List products with filteringPOST /api/products
- Create new productPUT /api/products/[id]
- Update productDELETE /api/products/[id]
- Delete product
GET /api/categories
- List categoriesPOST /api/categories
- Create categoryPUT /api/categories/[id]
- Update categoryDELETE /api/categories/[id]
- Delete category
GET /api/suppliers
- List suppliersPOST /api/suppliers
- Create supplierPUT /api/suppliers/[id]
- Update supplierDELETE /api/suppliers/[id]
- Delete supplier
- Interactive charts and graphs
- Real-time inventory statistics
- Forecasting and trend analysis
- Category-wise distribution
- Supplier performance metrics
- CSV export with custom formatting
- Excel export with multiple sheets
- Filtered data export
- Bulk operations support
- Multi-select category filtering
- Status-based filtering
- Supplier-based filtering
- Real-time search across all fields
- Combined filter application
- JWT token-based authentication
- Secure API endpoints
- User session management
- Data isolation per user
- Input validation and sanitization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Siraj Ahmed
- GitHub: @sirajahmedx
Built with modern web technologies for scalable inventory management solutions.
-
Clone the repository
git clone https://github.com/sirajahmedx/inventory.git cd inventory
-
Install dependencies
npm install
-
Environment Setup Create a
.env.local
file in the root directory:DATABASE_URL=mongodb://localhost:27017/inventory JWT_SECRET=your_super_secret_jwt_key_here NEXTAUTH_SECRET=your_nextauth_secret_here NEXTAUTH_URL=http://localhost:3000
-
Database Setup
# Make sure MongoDB is running mongod
-
Seed the Database (Optional) Populate your database with sample data:
npm run seed
This will create:
- 10 categories (Electronics, Clothing, Home & Garden, etc.)
- 5 suppliers with contact information
- 100+ products with complete details across all categories
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
inventory/
├── app/ # Next.js App Router
│ ├── api/ # API Routes
│ │ ├── auth/ # Authentication endpoints
│ │ ├── products/ # Product CRUD operations
│ │ ├── categories/ # Category management
│ │ └── suppliers/ # Supplier management
│ ├── analytics/ # Analytics dashboard
│ ├── api-docs/ # API documentation
│ ├── api-status/ # System monitoring
│ └── components/ # Reusable UI components
├── models/ # Mongoose schemas
├── lib/ # Utility functions
└── public/ # Static assets
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run seed # Populate database with sample data
POST /api/auth/register
- User registrationPOST /api/auth/login
- User authenticationPOST /api/auth/logout
- User logoutGET /api/auth/session
- Session validation
GET /api/products
- List products with filteringPOST /api/products
- Create new productPUT /api/products/[id]
- Update productDELETE /api/products/[id]
- Delete product
GET /api/categories
- List categoriesPOST /api/categories
- Create categoryPUT /api/categories/[id]
- Update categoryDELETE /api/categories/[id]
- Delete category
GET /api/suppliers
- List suppliersPOST /api/suppliers
- Create supplierPUT /api/suppliers/[id]
- Update supplierDELETE /api/suppliers/[id]
- Delete supplier
- Interactive charts and graphs
- Real-time inventory statistics
- Forecasting and trend analysis
- Category-wise distribution
- Supplier performance metrics
- CSV export with custom formatting
- Excel export with multiple sheets
- Filtered data export
- Bulk operations support
- Multi-select category filtering
- Status-based filtering
- Supplier-based filtering
- Real-time search across all fields
- Combined filter application
- JWT token-based authentication
- Secure API endpoints
- User session management
- Data isolation per user
- Input validation and sanitization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Siraj Ahmed
- GitHub: @sirajahmedx
Built with modern web technologies for scalable inventory management solutions.