Skip to content

Preveen369/Mini-Store-ERP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Mini-Store-ERP - MERN Store Management System

Platform Frontend Backend Backend Database Language AI

The Mini-Store-ERP is a comprehensive full-stack MERN (MongoDB, Express.js, React, Node.js) Enterprise Resource Planning system designed for small retail stores. It features modern inventory management, real-time sales tracking, AI-powered business insights via Groq LLM, and automated PDF invoice generation. Built with TypeScript for type safety, it offers a responsive dashboard with charts, secure JWT authentication with role-based access control, and natural language query processing.

πŸ”— Related Documentations: Client README | Server README

πŸ”— Live Project: https://mini-store-erp-app.onrender.com/


πŸš€ Core Features

  • πŸ” Authentication & Authorization: Secure JWT-based authentication with role-based access control (Admin/Cashier)
  • πŸ“¦ Product Management: Complete CRUD operations, real-time stock tracking, reorder alerts, and vendor management
  • πŸ›’ Purchase Management: Track supplier purchases with automatic stock updates and transaction history
  • πŸ’° Sales & POS: Fast POS interface with automatic stock deduction, PDF invoices, and multiple payment methods
  • πŸ“Š Reports & Analytics: Real-time revenue tracking, COGS calculation, top products analysis, and visual charts
  • πŸ€– AI-Powered Insights: Natural language queries, automated business insights, and smart reorder suggestions via Groq LLM
  • πŸ“„ PDF Generation: Server-side invoice generation and client-side report export
  • 🎨 Modern UI: Responsive TailwindCSS design with interactive dashboard and real-time data visualization

πŸ“· Screenshots

Below are some screenshots showcasing the Mini-Store-ERP interface:

Screenshots coming soon


πŸ“½οΈ Project Demo

Below is the project demo video of the Mini-Store-ERP interface:

Demo video coming soon


πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js + TypeScript
  • Framework: Express.js
  • Database: MongoDB (Mongoose ODM)
  • Authentication: JWT + bcrypt
  • LLM Integration: Groq API (LLaMA models)
  • PDF Generation: jsPDF
  • Security: Helmet, CORS, Rate Limiting, express-validator
  • Dev Tools: nodemon, ts-node

Frontend

  • Framework: React 18 + TypeScript
  • Build Tool: Vite
  • Routing: React Router v6
  • State Management: Zustand
  • UI Framework: TailwindCSS
  • Charts: Recharts
  • Icons: Lucide React
  • HTTP Client: Axios
  • PDF Export: jsPDF, jsPDF-AutoTable
  • Notifications: React Hot Toast

πŸ“ Project Structure

mini-store-erp/
β”œβ”€β”€ client/                # Frontend React application (see Client README)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/         # Application pages/routes
β”‚   β”‚   β”œβ”€β”€ store/         # Zustand state management
β”‚   β”‚   β”œβ”€β”€ lib/           # API client and utilities
β”‚   β”‚   └── types/         # TypeScript type definitions
β”‚   β”œβ”€β”€ public/            # Static assets
β”‚   └── package.json       # Frontend dependencies
β”œβ”€β”€ server/                # Backend Node.js/Express application (see Server README)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/        # Configuration files
β”‚   β”‚   β”œβ”€β”€ controllers/   # Route controllers
β”‚   β”‚   β”œβ”€β”€ middleware/    # Custom middleware
β”‚   β”‚   β”œβ”€β”€ models/        # Mongoose data models
β”‚   β”‚   β”œβ”€β”€ routes/        # API route definitions
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic services
β”‚   β”‚   └── utils/         # Utility functions
β”‚   └── package.json       # Backend dependencies
β”œβ”€β”€ diagram.txt            # Database relationship diagram
β”œβ”€β”€ LICENSE                # MIT License file
└── README.md              # Main project documentation

πŸ§ͺ Installation & Setup

πŸ“‹ Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB (local installation or MongoDB Atlas)
  • A Groq API Account (for AI features) - Get your free API key at Groq Console
  • Postman or similar API testing tool (optional, for testing)

πŸ§‘β€πŸ’» Steps to Run

  1. Clone the repository

    git clone https://github.com/your-username/mini-store-erp.git
    cd mini-store-erp
  2. Set up the backend

    • Follow the instructions in the Server README to configure and run the backend.
  3. Set up the frontend

    • Follow the instructions in the Client README to configure and run the frontend.
  4. Access the Application


➑️ Connecting Frontend, Backend, and MongoDB

For detailed instructions on connecting the frontend, backend, and MongoDB, refer to the Server README and Client README for specific configurations.

Quick Configuration Overview

  1. MongoDB Connection: Configure MONGODB_URI in server .env file
  2. API Communication: Set VITE_API_URL in client .env file
  3. CORS Setup: Configure CORS_ORIGIN in server .env to match frontend URL
  4. Groq API: Add GROQ_API_KEY in server .env for AI features

πŸš€ Deployment

Deployment on Render (Recommended)

Backend Deployment

  1. Create a new Web Service on Render
  2. Connect your GitHub repository
  3. Configure build settings:
    • Build Command: cd server; npm install; tsc
    • Start Command: cd server; npm start
  4. Add environment variables from server .env file
  5. Deploy and note the backend URL

Frontend Deployment

  1. Create a new Static Site on Render
  2. Configure build settings:
    • Build Command: cd client; npm run build
    • Publish Directory: client/dist
  3. Add environment variable:
    • VITE_API_URL: Your deployed backend URL
  4. Deploy the frontend

For detailed deployment instructions, see:


🀝 Contributing

Pull requests are welcome! Feel free to fork the repository and suggest improvements.

Steps to contribute:

# 1. Fork the repository
# 2. Create a feature branch
git checkout -b feature-name
# 3. Commit your changes
git commit -m "Add feature description"
# 4. Push to GitHub
git push origin feature-name
# 5. Open a Pull Request

πŸ“„ License

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


πŸ“§ Contact

For queries or suggestions:


🌟 Show Your Support

If you like this project, please consider giving it a ⭐ on GitHub!


Built with ❀️ using MERN Stack + AI

About

A comprehensive full-stack MERN based Enterprise Resource Planning system designed for small retail stores. It features modern inventory management, real-time sales tracking, AI-powered business insights via Groq LLM, and automated PDF invoice generation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages