A comprehensive, modern inventory and billing management system designed for small to medium-sized businesses. Built with a powerful tech stack including Next.js 15, Node.js, Express, and MongoDB, this system provides a complete solution for managing products, customers, vendors, transactions, and generating insightful reports.
- π Authentication & Authorization: Secure JWT-based authentication with role-based access control
- π¦ Product Management: Complete CRUD operations for inventory items with stock tracking
- π₯ Contact Management: Manage both customers and vendors in a unified system
- π° Transaction Processing: Handle purchases and sales with automatic inventory updates
- π Reporting & Analytics: Real-time dashboards with sales trends, inventory status, and financial summaries
- π Dark Mode Support: Modern UI with light/dark theme toggle
- π± Responsive Design: Fully responsive interface that works on all devices
- β‘ Real-time Updates: Instant inventory updates on transactions
- π Security First: Helmet.js, CORS, rate limiting, and input validation
- π³ Docker Support: Easy deployment with Docker and Docker Compose
- π API Documentation: Comprehensive Postman collection included
- π¨ Modern UI: Built with Shadcn/ui components and Tailwind CSS
- π Performance: Optimized with Next.js 15 Turbopack
- Runtime: Node.js (v18+)
- Framework: Express.js 5
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (jsonwebtoken)
- Security: Helmet.js, bcrypt, express-rate-limit
- Validation: express-validator
- Logging: Morgan
- Framework: Next.js 15 with TypeScript
- UI Components: Shadcn/ui
- Styling: Tailwind CSS
- Forms: React Hook Form with Zod validation
- State Management: React Context API
- HTTP Client: Axios
- Charts: Recharts
- Animations: Framer Motion
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm or yarn package manager
- MongoDB (v6.0 or higher) - Local or Atlas
- Git for version control
- Docker (optional, for containerized deployment)
git clone https://github.com/yourusername/Inventory-Billing-Management-System.git
cd Inventory-Billing-Management-System# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Configure your .env file with:
# - MongoDB connection string
# - JWT secret
# - Port configuration
# Edit .env with your preferred editor
# Start development server
npm run dev# In a new terminal, navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Create environment file
cp .env.example .env.local
# Configure your .env.local file with:
# - Backend API URL (default: http://localhost:5000)
# Edit .env.local with your preferred editor
# Start development server
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Documentation: Import the Postman collection from
backend/Inventory_Billing_API.postman_collection.json
For production deployment using Docker:
# Navigate to backend directory
cd backend
# Build and start containers
docker-compose up -d
# View logs
docker-compose logs -f
# Stop containers
docker-compose downInventory-Billing-Management-System/
βββ backend/
β βββ src/
β β βββ app.js # Express app entry point
β β βββ config/ # Configuration files
β β βββ controllers/ # Route controllers
β β βββ middleware/ # Custom middleware
β β βββ models/ # Mongoose models
β β βββ routes/ # API routes
β β βββ utils/ # Utility functions
β βββ .env.example # Environment variables template
β βββ docker-compose.yml # Docker compose configuration
β βββ Dockerfile # Docker image configuration
β βββ package.json # Backend dependencies
β
βββ frontend/
β βββ src/
β β βββ app/ # Next.js app directory
β β βββ components/ # React components
β β βββ contexts/ # React contexts
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β β βββ services/ # API service functions
β β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
β βββ .env.example # Frontend environment template
β βββ package.json # Frontend dependencies
β
βββ LICENSE # MIT License
βββ README.md # Project documentation
βββ CONTRIBUTING.md # Contribution guidelines
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/inventory_billing
# For MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:[email protected]/inventory_billing
# Authentication
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRE=7d
# CORS
FRONTEND_URL=http://localhost:3000# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:5000/api
# Application Settings
NEXT_PUBLIC_APP_NAME=Inventory & Billing System
NEXT_PUBLIC_APP_VERSION=1.0.0The API follows RESTful principles with the following main endpoints:
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update profilePUT /api/auth/change-password- Change password
GET /api/products- List all productsGET /api/products/:id- Get product detailsPOST /api/products- Create new productPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/contacts- List all contactsGET /api/contacts/:id- Get contact detailsPOST /api/contacts- Create new contactPUT /api/contacts/:id- Update contactDELETE /api/contacts/:id- Delete contact
GET /api/transactions- List all transactionsGET /api/transactions/:id- Get transaction detailsPOST /api/transactions- Create new transactionPUT /api/transactions/:id- Update transactionDELETE /api/transactions/:id- Delete transaction
GET /api/reports/dashboard- Dashboard statisticsGET /api/reports/sales- Sales reportsGET /api/reports/inventory- Inventory reportsGET /api/reports/financial- Financial summaries
For detailed API documentation, import the Postman collection located at backend/Inventory_Billing_API.postman_collection.json.
cd backend
npm testcd frontend
npm test# Run both frontend and backend
# Then run E2E tests
npm run test:e2eWe welcome contributions from the community! Please read our Contributing Guidelines to get started.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style and conventions
- Write clear, descriptive commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
Found a bug or have a feature request? Please check the existing issues first, then feel free to open a new issue.
We provide templates for:
- π Bug Reports
- β¨ Feature Requests
- π Documentation Improvements
- π¬ Questions
- Multi-language support
- Advanced reporting with PDF export
- Barcode/QR code scanning
- Email notifications
- Backup and restore functionality
- Mobile applications (iOS/Android)
- Multi-warehouse support
- Advanced user roles and permissions
- Integration with accounting software
- Real-time collaboration features
- AI-powered demand forecasting
- Automated reordering system
- Customer portal
- Advanced analytics dashboard
- Plugin system for extensions
- Janvi Singhal - Initial work - GitHub Profile
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors who have helped shape this project
- Special thanks to the open-source community for the amazing tools and libraries
- Inspired by modern inventory management best practices
For support, please:
- Check the Documentation
- Search existing issues
- Join our Discord community
- Email us at [email protected]
Made with β€οΈ by the community