Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ InsightAI – AI-Powered Business Intelligence Dashboard

A modern AI-powered Business Intelligence Dashboard built with the MERN Stack that helps businesses monitor revenue, sales, customers, products, inventory, and expenses through interactive analytics and intelligent insights.


πŸ“– Overview

InsightAI is a full-stack Business Intelligence Dashboard designed to simplify business management and decision-making. It provides a centralized platform where users can securely manage products, customers, inventory, expenses, and sales data while visualizing business performance using interactive charts and analytics.

The application features secure JWT authentication, responsive dashboards, modern UI components, and AI-powered business insights to help users make data-driven decisions.


πŸš€ Live Demo

Experience the application here:

**πŸ‘‰ https://insightai-project-delta.vercel.app **

✨ Features

πŸ” Authentication

  • User Registration
  • Secure Login
  • JWT Authentication
  • Protected Routes
  • Logout Functionality

πŸ“Š Dashboard

  • Business KPI Cards
  • Revenue Overview
  • Sales Analytics
  • Customer Statistics
  • Expense Summary
  • Business Health Metrics

πŸ“¦ Product Management

  • Add Products
  • Update Products
  • Delete Products
  • Product Search
  • Product Statistics

πŸ‘₯ Customer Management

  • Customer Registration
  • Customer Information Management
  • Edit & Delete Customers
  • Customer Analytics

πŸ“¦ Inventory Management

  • Stock Monitoring
  • Inventory Updates
  • Quantity Tracking
  • Low Stock Status

πŸ’° Expense Management

  • Add Expenses
  • Edit Expenses
  • Delete Expenses
  • Expense Categorization
  • Expense Summary

πŸ“ˆ Analytics

  • Revenue Trends
  • Sales Reports
  • Customer Growth
  • Expense Distribution
  • Interactive Charts

πŸ€– AI Insights

  • Business Recommendations
  • AI Business Assistant
  • Smart Analytics
  • Decision Support

πŸ›  Tech Stack

Frontend

  • React.js
  • Vite
  • Tailwind CSS
  • React Router
  • Axios
  • Recharts
  • Framer Motion

Backend

  • Node.js
  • Express.js
  • JWT Authentication
  • REST API

Database

  • MongoDB
  • Mongoose

AI

  • OpenRouter API
  • Multiple LLM Support

Tools

  • Git
  • GitHub
  • VS Code
  • Postman

πŸ“‚ Project Structure

InsightAI/
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ server.js
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ .gitignore
└── LICENSE

πŸš€ Getting Started

Prerequisites

Before running the project, make sure you have installed:

  • Node.js (v18 or later)
  • npm
  • MongoDB Community Server or MongoDB Atlas
  • Git
  • VS Code (Recommended)

πŸ“₯ Clone Repository

git clone https://github.com/YOUR_USERNAME/InsightAI.git
cd InsightAI

βš™ Backend Setup

Navigate to the backend folder:

cd backend

Install dependencies:

npm install

Create a .env file inside the backend directory.

Example:

PORT=5000

MONGODB_URI=your_mongodb_connection_string

JWT_SECRET=your_secret_key

Start the backend server:

npm run dev

Backend will start at:

http://localhost:5000

πŸ’» Frontend Setup

Open another terminal.

Navigate to frontend:

cd frontend

Install dependencies:

npm install

Run the frontend:

npm run dev

Frontend runs at:

http://localhost:5173

πŸ”„ Running the Complete Application

Terminal 1

cd backend
npm run dev

Terminal 2

cd frontend
npm run dev

Open your browser:

http://localhost:5173

πŸ”‘ Environment Variables

Variable Description
PORT Backend server port
MONGODB_URI MongoDB connection string
JWT_SECRET Secret key for JWT authentication

πŸ“‘ API Base URL

Frontend communicates with the backend using:

http://localhost:5000/api

πŸ“‘ REST API Endpoints

πŸ” Authentication

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Login user
GET /api/auth/me Get logged-in user details

πŸ“Š Dashboard

Method Endpoint Description
GET /api/dashboard Fetch dashboard KPIs and charts

πŸ“ˆ Analytics

Method Endpoint Description
GET /api/analytics Fetch analytics data
GET /api/analytics/revenue Revenue analytics
GET /api/analytics/sales Sales analytics
GET /api/analytics/customers Customer analytics
GET /api/analytics/expenses Expense analytics

πŸ“¦ Products

Method Endpoint Description
GET /api/products Get all products
GET /api/products/:id Get product by ID
POST /api/products Create product
PUT /api/products/:id Update product
DELETE /api/products/:id Delete product

πŸ‘₯ Customers

Method Endpoint Description
GET /api/customers Get all customers
GET /api/customers/:id Get customer by ID
POST /api/customers Create customer
PUT /api/customers/:id Update customer
DELETE /api/customers/:id Delete customer

πŸ“¦ Inventory

Method Endpoint Description
GET /api/inventory Get inventory
POST /api/inventory Add inventory
PUT /api/inventory/:id Update inventory
DELETE /api/inventory/:id Delete inventory

πŸ’° Expenses

Method Endpoint Description
GET /api/expenses Get expenses
POST /api/expenses Add expense
PUT /api/expenses/:id Update expense
DELETE /api/expenses/:id Delete expense

πŸ€– AI Assistant

Method Endpoint Description
POST /api/ai/chat Ask business-related questions
POST /api/ai/insights Generate AI business insights

πŸ” Authentication Flow

User
   β”‚
   β–Ό
Register / Login
   β”‚
   β–Ό
Express API
   β”‚
   β–Ό
JWT Token Generated
   β”‚
   β–Ό
Token Stored in Browser
   β”‚
   β–Ό
Protected Routes
   β”‚
   β–Ό
Business Dashboard

πŸ—„οΈ Database Collections

The application stores business information in MongoDB using the following collections:

Collection Purpose
users User authentication and profile
products Product records
customers Customer information
inventory Stock management
expenses Expense records

πŸ—οΈ System Architecture

                    +----------------------+
                    |      React Frontend  |
                    +----------+-----------+
                               |
                               |
                      REST API Requests
                               |
                               β–Ό
                    +----------------------+
                    |   Express.js Server  |
                    +----------+-----------+
                               |
          +--------------------+--------------------+
          |                    |                    |
          β–Ό                    β–Ό                    β–Ό
 Authentication          Business Logic        AI Services
 (JWT)                  (CRUD Modules)      (OpenRouter API)
          |                    |                    |
          +--------------------+--------------------+
                               |
                               β–Ό
                      MongoDB Database

πŸ”’ Security Features

  • JWT Authentication
  • Protected Routes
  • Password Hashing
  • Secure API Communication
  • Environment Variables
  • MongoDB Data Validation

🌟 Key Features

πŸ“Š Interactive Business Dashboard

Monitor your business performance through real-time KPI cards, revenue summaries, sales reports, customer statistics, inventory updates, and expense tracking.


πŸ“ˆ Advanced Analytics

Analyze business performance using interactive charts that display revenue trends, customer growth, sales distribution, and expense breakdowns.


πŸ“¦ Product Management

Manage products efficiently with complete CRUD operations including product creation, editing, searching, updating, and deletion.


πŸ‘₯ Customer Management

Store and manage customer records, maintain contact details, and monitor customer-related business activities.


πŸ“¦ Inventory Tracking

Keep track of inventory levels, monitor available stock, and update product quantities with ease.


πŸ’° Expense Management

Record, categorize, update, and analyze business expenses to better understand operational costs.


πŸ€– AI Business Assistant

Generate AI-powered business insights and recommendations using OpenRouter-supported Large Language Models (LLMs).


πŸ” Secure Authentication

Protect user accounts using JWT-based authentication and authorization with secure login and registration workflows.


πŸ“± Responsive User Interface

The application is fully responsive and optimized for desktop, tablet, and mobile devices.


πŸš€ Future Enhancements

The following features are planned for future releases:

  • AI Sales Forecasting
  • Business Performance Prediction
  • PDF Report Generation
  • CSV Export
  • Email Notifications
  • Role-Based Access Control
  • Multi-Business Support
  • Business Settings Module
  • Cloud Deployment
  • Docker Support
  • Audit Logs
  • Advanced AI Recommendations

🀝 Contributing

Contributions are welcome!

To contribute:

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/your-feature-name
  1. Commit your changes
git commit -m "feat: add your feature"
  1. Push to your branch
git push origin feature/your-feature-name
  1. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.

Feel free to use, modify, and distribute this project for educational and personal purposes.


πŸ‘¨β€πŸ’» Author

Vikas Chenna

Final Year MCA Student

Specialization: Full Stack Developer

GitHub: https://github.com/vikas-chenna


⭐ Support

If you found this project helpful, please consider giving it a ⭐ on GitHub.

It helps others discover the project and motivates future development.


Thank You ❀️

Thank you for visiting the InsightAI repository.

Your support and feedback are greatly appreciated.

Happy Coding! πŸš€

About

InsightAI is a full-stack AI-powered Business Intelligence Dashboard that enables businesses to monitor revenue, sales, customers, inventory, expenses, and AI-driven insights through interactive analytics and real-time data visualization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages