This Inventory Management System is a comprehensive web application built with Next.js, React, and MongoDB. It provides businesses with a robust solution for managing their inventory, sales, and purchases. The system features a user-friendly interface, real-time data updates, and secure authentication powered by Clerk.
- Dashboard: Get an overview of key metrics including total sales, purchases, current stock value, and low stock items.
- Product Management: Add, edit, and delete products with details such as name, description, price, and stock quantity.
- Sales Management: Record and track sales transactions, including multiple products per sale.
- Purchase Management: Manage purchase orders and update stock levels automatically.
- Inventory Tracking: Real-time updates of stock levels based on sales and purchases.
- User Authentication: Secure user authentication and authorization using Clerk.
- Responsive Design: Fully responsive interface that works on desktop and mobile devices.
- Frontend: Next.js 13 (App Router), React, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB with Mongoose ORM
- State Management: Redux Toolkit
- Authentication: Clerk
- UI Components: shadcn/ui
- Charts: Recharts
Before you begin, ensure you have met the following requirements:
- Node.js (v14 or later)
- npm or yarn
- MongoDB instance (local or cloud-based)
- Clerk account for authentication
-
Clone the repository:
git clone https://github.com/ajeetkumarrauniyar/StockTrack.git cd StockTrack
-
Install the dependencies:
npm install
or
yarn install
-
Set up environment variables: Create a
.env.local
file in the root directory and add the following variables:MONGODB_URI=your_mongodb_connection_string NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key
-
Run the development server:
npm run dev
or
yarn dev
-
Open http://localhost:3000 with your browser to see the result.
- Sign Up/Sign In: Use the authentication system powered by Clerk to create an account or sign in.
- Dashboard: View key metrics and navigate to different sections of the application.
- Products: Add new products, update existing ones, and manage stock levels.
- Sales: Record new sales transactions, which will automatically update stock levels.
- Purchases: Create purchase orders to restock inventory.
- Inventory: View and manage your current inventory levels.
The application uses Next.js API routes for backend functionality. Here are the main API endpoints:
/api/products
: Manage products (GET, POST, PUT, DELETE)/api/sales
: Manage sales transactions (GET, POST)/api/purchases
: Manage purchase orders (GET, POST)/api/inventory
: Get inventory status (GET)
Contributions to the Inventory Management System are welcome! Please follow the Contribution Guidelines to get started.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Ajeet Kumar - [email protected]
Project Link: https://github.com/ajeetkumarrauniyar/inventory-management-system