Transform raw datasets into actionable executive insights, automated predictive ML models, and boardroom-ready PDF reports in seconds.
🌐 Live Demo • ✨ Features • 🚀 Quickstart • 🛠️ Architecture • 📖 Documentation
InsightAI is an end-to-end, enterprise-grade AI analytics platform designed to automate the entire data science lifecycle:
- Automated Ingestion & Cleaning: Upload CSV or Excel files for instant schema detection, outlier removal, missing-value imputation, and statistical normalization.
- Interactive Visual Dashboard: Dynamic correlation heatmaps, numerical distribution bar charts, and category breakdowns powered by Plotly & Chart.js.
- Automated Machine Learning (AutoML): Train, evaluate, and compare Classification (Random Forest, Logistic Regression), Regression (Linear, Ridge, Lasso), and Clustering (K-Means) algorithms with 1-click artifact export (
.pkl). - Retrieval-Augmented Generation (RAG) AI Analyst: Chat with your structured data in natural language powered by local Ollama LLMs (
llama3,qwen,mistral). - Autonomous Report Generation: Compile statistical summaries, charts, and AI interpretations into downloadable executive PDF reports.
- 🛡️ Multi-Engine Authentication: MongoDB Atlas cloud database with automatic, transparent fallback to local SQLite.
- ⚡ Zero-Friction User Onboarding: Live animated OTP verification modal with instant Auto-Fill and email dispatcher.
- 🧹 Autonomous Data Cleaning Engine: Automatic deduplication, intelligent type coercion, skewness correction, and outlier filtering.
- 📊 360° Data Visualizer: Auto-generated interactive histograms, correlation matrices, box plots, and scatter charts.
- 🤖 Autonomous ML Workbench: Automatic train/test split, hyperparameter tuning, confusion matrix generation, feature importance ranking, and downloadable serialized models (
.pkl). - 💬 Conversational RAG Chat: Ask questions like "Which region had the highest margin drop in Q3?" and get instant data-backed answers with citations.
- 📄 Executive PDF Reporting: Automated report compilation with dynamic charts, key metric summaries, and executive bullet points.
insightai/
├── backend/
│ ├── app.py # FastAPI Application Root & Static Asset Mount
│ ├── config.py # Pydantic Settings & Environment Parsing
│ ├── database/
│ │ ├── mongo_users.py # MongoDB Atlas Engine & Fallback Logic
│ │ └── session.py # SQLite Fallback & Schema Migration
│ ├── models/ # Pydantic & SQLAlchemy Schemas
│ ├── routes/
│ │ ├── auth.py # JWT Authentication & OTP Handlers
│ │ ├── upload.py # Dataset Ingestion & Validation
│ │ ├── dashboard.py # Aggregations & Visualizations
│ │ ├── ml.py # AutoML Training & Model Export
│ │ ├── chat.py # RAG AI Analyst Engine
│ │ └── report.py # PDF Compilation Service
│ └── services/ # Data Processing, Cleaning & ML Utilities
├── frontend/
│ ├── src/
│ │ ├── AuthPage.tsx # Login, Signup & OTP Pop-Up Screen
│ │ ├── DashboardPage.tsx # Analytics Studio & AutoML Hub
│ │ ├── api.ts # Axios Client & Interceptors
│ │ └── styles.css # Glassmorphic Custom Design System
│ └── vite.config.ts # Vite Bundler & Reverse Proxy
├── Dockerfile # Production Multi-Stage Container
└── README.md
| Layer | Technologies |
|---|---|
| Frontend | React 18, TypeScript, Vite, Plotly.js, Lucide Icons, Vanilla CSS Design System |
| Backend | Python 3.10+, FastAPI, Uvicorn, Pydantic, Scikit-Learn, Pandas, NumPy, ReportLab |
| Databases | MongoDB Atlas (Production) / SQLite3 (Local Dev & Auto-Fallback) |
| AI / LLM | Ollama (Llama 3 / Qwen / Mistral), Nomic Embed Text, LangChain RAG |
| Deployment | Docker Multi-Stage Build, Render Cloud |
Follow these 3 simple steps to run InsightAI on your local machine:
Ensure you have the following installed:
- Node.js 18+ &
npm→ Download Node.js - Python 3.10+ → Download Python
- Ollama (Optional, for local AI chat) → Download Ollama
# Pull the default models ollama pull llama3 ollama pull nomic-embed-text
git clone https://github.com/codeCraft-Ritik/InsightAI.git
cd InsightAIOpen a terminal in the root directory:
# Navigate to backend directory
cd backend
# Create and activate Python virtual environment
python -m venv venv
# Windows (Command Prompt / PowerShell):
.\venv\Scripts\activate
# macOS / Linux:
# source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create your .env file
cp .env.example .env
# Start the FastAPI backend server
python -m uvicorn app:app --reload --port 8000The Backend API will be live at:
http://localhost:8000
Interactive Swagger API Docs:http://localhost:8000/docs
Open a second terminal window:
# Navigate to frontend directory
cd frontend
# Install Node dependencies
npm install
# Start Vite Development Server
npm run devOpen your browser and navigate to:
http://localhost:5173🎉
Create a .env file in the backend/ directory using the template below:
# ── Core App Settings ──
APP_NAME=InsightAI - AI-Powered Data Analyst
SECRET_KEY=generate-a-secure-random-64-character-secret-key
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=480
# ── Database Configuration ──
# (Leave MONGODB_URI empty to automatically use local SQLite)
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/insightai
MONGODB_DATABASE=insightai
ALLOW_MONGO_FALLBACK=true
# ── AI / Ollama Settings ──
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_CHAT_MODEL=llama3
OLLAMA_EMBEDDING_MODEL=nomic-embed-text
# ── Email / OTP Configuration ──
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-google-app-password
SMTP_USE_TLS=true
# ── File Limits ──
MAX_UPLOAD_MB=25
RAG_TOP_K=5You can run the entire full-stack application inside a single Docker container:
# Build Docker Image
docker build -t insightai .
# Run Container on Port 8000
docker run -p 8000:8000 --env-file backend/.env insightaiOpen
http://localhost:8000in your browser.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/signup |
Register new user & generate verification code |
POST |
/api/auth/verify-otp |
Verify 6-digit OTP & receive JWT token |
POST |
/api/auth/login |
Authenticate user & receive JWT token |
POST |
/api/upload |
Upload & ingest CSV / Excel datasets |
GET |
/api/dashboard/stats |
Retrieve real-time statistical distributions |
POST |
/api/ml/train |
Execute AutoML pipeline (Classification / Regression / Clustering) |
GET |
/api/ml/download/{id} |
Export trained serialized model (.pkl) |
POST |
/api/chat |
Query dataset using Conversational RAG |
POST |
/api/report/generate |
Compile and download executive PDF report |
Contributions, issues, and feature requests are welcome!
- Fork the Repository
- Create a 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
This project is licensed under the MIT License — see the LICENSE file for details.