Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AnalystGPT

AnalystGPT Enterprise ๐Ÿค–

AI-Powered Data Analysis SaaS โ€” Upload. Ask. Visualize. Predict. Export.

Next.js FastAPI Python TypeScript Streamlit License

Stars Last Commit Repo Size

View Demo ยท Report Bug ยท Request Feature


๐Ÿ“Œ What is AnalystGPT?

AnalystGPT Enterprise is a production-ready, full-stack AI SaaS platform that turns raw tabular data into actionable insights โ€” no SQL, no code required.

Upload any dataset โ†’ ask questions in plain English (or by voice) โ†’ get charts, predictions, cleaning reports, and PDF exports instantly.

Built with a Next.js frontend + FastAPI backend, with a lightweight Streamlit demo also included.


โœจ Features

Feature Description
๐ŸŽ™๏ธ Voice-to-Query Ask questions about your data using your voice via Web Speech API
๐Ÿ“Š Smart Charts Auto-generates histograms, boxplots, bar charts, heatmaps from prompts
๐Ÿค– AI Q&A Natural language answers powered by OpenAI-compatible endpoints
๐Ÿงน Dataset Cleaning Remove duplicates, fill/drop missing values, export cleaned CSV
๐Ÿ”ฎ ML Predictions Baseline ML model predictions on uploaded datasets
๐Ÿ“‹ Dataset Comparison Side-by-side comparison of two datasets
๐Ÿ“„ PDF Export Download full analysis reports as PDF
๐Ÿ“Œ Pinned Dashboard Save and revisit your favourite charts and insights
๐Ÿ” Full Auth System Google OAuth + GitHub + Email login via NextAuth + JWT sessions
๐ŸŒ— Dark / Light Theme Persistent theme engine with smooth toggle

๐Ÿ–ผ๏ธ Screenshots

Login Screen

AnalystGPT Login

FastAPI Backend Docs

FastAPI Backend

๐Ÿ’ก More screenshots coming soon โ€” dashboard, chart generation, voice input


๐Ÿ—๏ธ Architecture

AnalystGPT/
โ”œโ”€โ”€ streamlit_app.py          # Streamlit demo entrypoint (quick cloud deploy)
โ”œโ”€โ”€ requirements.txt          # Streamlit Cloud requirements
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py           # FastAPI routes & API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ analysis.py       # File parsing, profiling, charts, ML helpers
โ”‚   โ”‚   โ”œโ”€โ”€ config.py         # Environment-driven production config
โ”‚   โ”‚   โ””โ”€โ”€ reports.py        # PDF report generation
โ”‚   โ””โ”€โ”€ tests/                # Backend test suite
โ””โ”€โ”€ frontend/
    โ”œโ”€โ”€ app/                  # Next.js App Router pages
    โ””โ”€โ”€ app/components/       # UI components (charts, dashboard, auth)

๐Ÿ› ๏ธ Tech Stack

Layer Technologies
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS, NextAuth
Backend FastAPI, SQLAlchemy, Pandas, Scikit-learn, Matplotlib, Seaborn
Auth NextAuth (Google OAuth + GitHub + Email), JWT sessions
AI / Voice OpenAI-compatible API, Web Speech API
Reports jsPDF, ReportLab
Demo App Streamlit
Storage SQLite (default) ยท configurable via DATABASE_URL

๐Ÿš€ Local Setup

1. Clone the repo

git clone https://github.com/Shrishti1701/AnalystGPT.git
cd AnalystGPT

2. Backend (FastAPI)

cd backend
cp .env.example .env        # Fill in your environment variables
pip install -r requirements.txt
uvicorn app.main:app --reload

Backend runs at โ†’ http://127.0.0.1:8000 API docs at โ†’ http://127.0.0.1:8000/docs

3. Frontend (Next.js)

cd frontend
cp .env.local.example .env.local    # Fill in your environment variables
npm install
npm run dev

Frontend runs at โ†’ http://localhost:3000

4. Streamlit Demo (Quick Start)

pip install -r requirements.txt
streamlit run streamlit_app.py

โš™๏ธ Environment Variables

Backend .env

Variable Purpose
DATABASE_URL Database connection string
FRONTEND_ORIGINS Comma-separated allowed frontend origins
PUBLIC_API_BASE_URL Public backend URL for generated assets
UPLOAD_DIR Uploaded dataset folder
CHART_DIR Generated chart folder
REPORT_DIR Generated report folder
MAX_SIZE_MB Upload size limit
JWT_SECRET Backend auth secret
OPENAI_API_KEY / OPENROUTER_API_KEY Optional โ€” AI-powered Q&A
ANALYSTGPT_MODEL Model name for dataset Q&A

Frontend .env.local

Variable Purpose
NEXT_PUBLIC_API_BASE_URL Browser-visible backend URL
NEXTAUTH_URL Frontend URL
NEXTAUTH_SECRET NextAuth secret
GOOGLE_CLIENT_ID / GITHUB_ID etc. OAuth provider credentials

โ˜๏ธ Deployment

Streamlit Cloud (Quick Demo)

  1. Go to streamlit.io/cloud โ†’ New app
  2. Set these:
    • Repository: Shrishti1701/AnalystGPT
    • Branch: main
    • Main file path: streamlit_app.py
  3. Deploy โœ…

Full-Stack (Production)

Part Recommended Hosts
Frontend (/frontend) Vercel, Netlify
Backend (/backend) Render, Railway, Fly.io
Database PostgreSQL (Supabase / Neon)

Set NEXT_PUBLIC_API_BASE_URL, PUBLIC_API_BASE_URL, and FRONTEND_ORIGINS to your deployed URLs.


โœ… Production Checklist

  • Use strong JWT_SECRET and NEXTAUTH_SECRET
  • Set FRONTEND_ORIGINS to exact deployed frontend URL
  • Use managed Postgres for multi-user production
  • Keep .env, uploaded files, charts, reports out of Git
  • Run npm run build and pytest before deploying

๐Ÿงช Running Tests

# Backend tests
cd backend
pytest

# Frontend lint + build check
cd frontend
npm run lint
npm run build

๐Ÿ“Š Supported File Formats

CSV ยท TSV ยท Excel (.xlsx) ยท JSON ยท JSONL ยท Parquet


๐Ÿ—บ๏ธ Roadmap

  • Deploy live demo on Streamlit Cloud
  • Add LangChain / RAG for deeper dataset Q&A
  • Multi-user workspace support
  • Real-time collaboration on dashboards
  • Export to Google Sheets

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Shrishti Banshiar AI Tools Developer ยท GSoC 2025 Contributor @ IIT Madras

LinkedIn GitHub Gmail


โญ If you find this project useful, please star the repo โ€” it helps a lot! โญ

Built with โค๏ธ by Shrishti Banshiar

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages