Skip to content

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.

License

Notifications You must be signed in to change notification settings

janvi100104/Inventory-Billing-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ Inventory & Billing Management System

License: MIT Node.js Next.js MongoDB TypeScript PRs Welcome

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.

✨ Features

Core Functionality

  • πŸ” 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

Technical Features

  • ⚑ 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

πŸ› οΈ Tech Stack

Backend

  • 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

Frontend

  • 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

πŸ“‹ Prerequisites

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)

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/yourusername/Inventory-Billing-Management-System.git
cd Inventory-Billing-Management-System

2. Backend Setup

# 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

3. Frontend Setup

# 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

4. Access the Application

🐳 Docker Deployment

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 down

πŸ“ Project Structure

Inventory-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

πŸ”§ Configuration

Backend Environment Variables

# 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

Frontend Environment Variables

# 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.0

πŸ“š API Documentation

The API follows RESTful principles with the following main endpoints:

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - User login
  • GET /api/auth/profile - Get user profile
  • PUT /api/auth/profile - Update profile
  • PUT /api/auth/change-password - Change password

Products

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

Contacts

  • GET /api/contacts - List all contacts
  • GET /api/contacts/:id - Get contact details
  • POST /api/contacts - Create new contact
  • PUT /api/contacts/:id - Update contact
  • DELETE /api/contacts/:id - Delete contact

Transactions

  • GET /api/transactions - List all transactions
  • GET /api/transactions/:id - Get transaction details
  • POST /api/transactions - Create new transaction
  • PUT /api/transactions/:id - Update transaction
  • DELETE /api/transactions/:id - Delete transaction

Reports

  • GET /api/reports/dashboard - Dashboard statistics
  • GET /api/reports/sales - Sales reports
  • GET /api/reports/inventory - Inventory reports
  • GET /api/reports/financial - Financial summaries

For detailed API documentation, import the Postman collection located at backend/Inventory_Billing_API.postman_collection.json.

πŸ§ͺ Testing

Backend Testing

cd backend
npm test

Frontend Testing

cd frontend
npm test

End-to-End Testing

# Run both frontend and backend
# Then run E2E tests
npm run test:e2e

🀝 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines to get started.

How to Contribute

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

Development Guidelines

  • 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

πŸ› Bug Reports & Feature Requests

Found a bug or have a feature request? Please check the existing issues first, then feel free to open a new issue.

Issue Templates

We provide templates for:

  • πŸ› Bug Reports
  • ✨ Feature Requests
  • πŸ“š Documentation Improvements
  • πŸ’¬ Questions

πŸ“ˆ Roadmap

Version 1.1 (Q2 2025)

  • Multi-language support
  • Advanced reporting with PDF export
  • Barcode/QR code scanning
  • Email notifications
  • Backup and restore functionality

Version 1.2 (Q3 2025)

  • Mobile applications (iOS/Android)
  • Multi-warehouse support
  • Advanced user roles and permissions
  • Integration with accounting software
  • Real-time collaboration features

Version 2.0 (Q4 2025)

  • AI-powered demand forecasting
  • Automated reordering system
  • Customer portal
  • Advanced analytics dashboard
  • Plugin system for extensions

πŸ‘₯ Team

πŸ“„ License

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

πŸ™ Acknowledgments

  • 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

πŸ’¬ Support

For support, please:

  1. Check the Documentation
  2. Search existing issues
  3. Join our Discord community
  4. Email us at [email protected]

Made with ❀️ by the community

About

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.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published