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.
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.
Experience the application here:
**π https://insightai-project-delta.vercel.app **
- User Registration
- Secure Login
- JWT Authentication
- Protected Routes
- Logout Functionality
- Business KPI Cards
- Revenue Overview
- Sales Analytics
- Customer Statistics
- Expense Summary
- Business Health Metrics
- Add Products
- Update Products
- Delete Products
- Product Search
- Product Statistics
- Customer Registration
- Customer Information Management
- Edit & Delete Customers
- Customer Analytics
- Stock Monitoring
- Inventory Updates
- Quantity Tracking
- Low Stock Status
- Add Expenses
- Edit Expenses
- Delete Expenses
- Expense Categorization
- Expense Summary
- Revenue Trends
- Sales Reports
- Customer Growth
- Expense Distribution
- Interactive Charts
- Business Recommendations
- AI Business Assistant
- Smart Analytics
- Decision Support
- React.js
- Vite
- Tailwind CSS
- React Router
- Axios
- Recharts
- Framer Motion
- Node.js
- Express.js
- JWT Authentication
- REST API
- MongoDB
- Mongoose
- OpenRouter API
- Multiple LLM Support
- Git
- GitHub
- VS Code
- Postman
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
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)
git clone https://github.com/YOUR_USERNAME/InsightAI.gitcd InsightAINavigate to the backend folder:
cd backendInstall dependencies:
npm installCreate 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 devBackend will start at:
http://localhost:5000
Open another terminal.
Navigate to frontend:
cd frontendInstall dependencies:
npm installRun the frontend:
npm run devFrontend runs at:
http://localhost:5173
cd backend
npm run devcd frontend
npm run devOpen your browser:
http://localhost:5173
| Variable | Description |
|---|---|
| PORT | Backend server port |
| MONGODB_URI | MongoDB connection string |
| JWT_SECRET | Secret key for JWT authentication |
Frontend communicates with the backend using:
http://localhost:5000/api
| 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 |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/dashboard |
Fetch dashboard KPIs and charts |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ai/chat |
Ask business-related questions |
| POST | /api/ai/insights |
Generate AI business insights |
User
β
βΌ
Register / Login
β
βΌ
Express API
β
βΌ
JWT Token Generated
β
βΌ
Token Stored in Browser
β
βΌ
Protected Routes
β
βΌ
Business Dashboard
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 |
+----------------------+
| React Frontend |
+----------+-----------+
|
|
REST API Requests
|
βΌ
+----------------------+
| Express.js Server |
+----------+-----------+
|
+--------------------+--------------------+
| | |
βΌ βΌ βΌ
Authentication Business Logic AI Services
(JWT) (CRUD Modules) (OpenRouter API)
| | |
+--------------------+--------------------+
|
βΌ
MongoDB Database
- JWT Authentication
- Protected Routes
- Password Hashing
- Secure API Communication
- Environment Variables
- MongoDB Data Validation
Monitor your business performance through real-time KPI cards, revenue summaries, sales reports, customer statistics, inventory updates, and expense tracking.
Analyze business performance using interactive charts that display revenue trends, customer growth, sales distribution, and expense breakdowns.
Manage products efficiently with complete CRUD operations including product creation, editing, searching, updating, and deletion.
Store and manage customer records, maintain contact details, and monitor customer-related business activities.
Keep track of inventory levels, monitor available stock, and update product quantities with ease.
Record, categorize, update, and analyze business expenses to better understand operational costs.
Generate AI-powered business insights and recommendations using OpenRouter-supported Large Language Models (LLMs).
Protect user accounts using JWT-based authentication and authorization with secure login and registration workflows.
The application is fully responsive and optimized for desktop, tablet, and mobile devices.
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
Contributions are welcome!
To contribute:
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name- Commit your changes
git commit -m "feat: add your feature"- Push to your branch
git push origin feature/your-feature-name- Open a Pull Request
This project is licensed under the MIT License.
Feel free to use, modify, and distribute this project for educational and personal purposes.
Vikas Chenna
Final Year MCA Student
Specialization: Full Stack Developer
GitHub: https://github.com/vikas-chenna
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 for visiting the InsightAI repository.
Your support and feedback are greatly appreciated.
Happy Coding! π