Skip to content

btkhaled/FastData

Repository files navigation

FAST DATA — AI-Native Data Analysis Platform

Version React 19 TypeScript License

FastData is an AI-native data analysis platform with a ChatGPT-style conversational interface. Upload a CSV or Excel file and chat with your data — get instant profiling, visualizations, ML-powered predictions, domain-specific analytics, and comprehensive export packages, all within a single conversation.


Features

Category Highlights
🤖 Chat Interface Conversational UX with rich messages (text, charts, insight cards). History saved to localStorage.
📊 Data Profiling Auto column typing, descriptive stats, quality scoring, outlier & duplicate detection.
🔗 Correlation Engine Pairwise Pearson correlations, matrix views, human-readable interpretations.
💡 Insight Engine 7 insight categories scored by importance — overview, quality, risk, trends, and more.
📈 Chart Recommender Automatic chart selection (bar, line, scatter, pie, histogram, box plot) with relevance scoring.
🧠 Client-Side ML Pure TypeScript models (Ridge, kNN, Naive Bayes, Decision Stump) for regression & classification. Train, predict, and export Python loaders — no server required.
🏢 Domain Analytics Auto-detect domain, then unlock specialized analysis for Finance, Crypto, Ecommerce, Medical, and Marketing.
🤝 AI Copilot Ask natural-language questions. Uses OpenRouter (free models) via the backend, with a full rule-based fallback when offline.
🌙 Executive Narratives Generate summaries in McKinsey, Bloomberg, or Consulting style through the AI Copilot.
📦 Export Suite ZIP with reports, slides, charts (PNG), CSVs, JSON, Python ML loader, and PPTX presentations (night/day themes).
📋 Reports & Slides Structured multi-section reports (Markdown + HTML) and auto-generated slide decks.
🔌 Offline Mode All core analysis runs client-side. The backend is optional and used only for AI features.

Quick Start

# Install frontend dependencies
npm install

# (Optional) Install server dependencies
cd server && npm install && cd ..

# Start development (frontend + server)
npm run dev

# Frontend only
npm run dev:client

# Server only
npm run dev:server

Environment Variables (Server)

Copy server/.env and set:

Variable Description Default
PORT Server port 3001
OPENROUTER_API_KEY API key for AI Copilot
CORS_ORIGIN Allowed origin http://localhost:5173
MAX_FILE_SIZE Upload limit 52428800 (50 MB)

No API key? No problem. The client-side analysis engine works fully offline. The AI Copilot fallback uses rule-based answers when no key is configured.


Usage

  1. Start a new analysis — Click "New Analysis" in the sidebar.
  2. Upload your data — Drop a .csv or .xlsx file, or use the built-in sample dataset.
  3. Chat with your data — Ask questions like:
    • "Summarize this dataset"
    • "What's the data quality?"
    • "Show me correlations"
    • "Detect anomalies"
    • "What are the key insights?"
    • "Predict the target variable"
    • "Export everything"
  4. Explore results — Charts, insights, and tables appear directly in the conversation.
  5. Export — Download a comprehensive ZIP package with everything.

Domain-Specific Analytics

When you upload a file, FastData automatically detects the domain and unlocks specialized analytics:

Domain Capabilities
💰 Financial RSI, MACD, Bollinger Bands, drawdowns, Sharpe/Sortino/Calmar ratios, trend pattern detection
Crypto Wallet profiling, gas optimization, token metrics, staking rewards, portfolio P&L, rug-pull risk scoring
🛒 Ecommerce RFM segmentation (7 customer segments), cohort retention, market basket analysis (association rules), CLV prediction
🏥 Medical Kaplan-Meier survival curves, clinical distribution analysis, trial efficacy/safety metrics, diagnostic accuracy (sensitivity, specificity, PPV, NPV), patient clustering, biomarker analysis
📢 Marketing Funnel analysis, attribution models, customer journey mapping, channel performance (ROAS, CPA, CTR), marketing mix modeling, CLV calculations

Client-Side Machine Learning

FastData includes a full ML pipeline implemented in pure TypeScript — no external ML libraries or server required.

  • Regression models: MeanBaseline, Ridge Linear (gradient descent), kNN Regressor, Decision Stump
  • Classification models: Majority Baseline, kNN Classifier, Gaussian Naive Bayes, Decision Stump
  • Auto feature engineering: Z-score normalization, one-hot encoding, date features
  • Auto feature selection: Drops text, high-null, and high-cardinality columns
  • Train/test split with deterministic sampling
  • Ensemble comparison — best model is selected automatically
  • Prediction interface — input values and get predictions
  • Export: Python .pkl-compatible model artifact, standalone Python loader script, performance reports

Architecture

FastData/
├── src/                        # Frontend (React + TypeScript)
│   ├── components/             # 38 UI components (Chat, Charts, Dashboard, etc.)
│   ├── engine/                 # Core analysis engine
│   │   ├── parser.ts           # CSV / XLSX parsing
│   │   ├── profiler.ts         # Column profiling & data quality
│   │   ├── correlations.ts     # Pearson correlation engine
│   │   ├── insightGenerator.ts # Automatic insight generation
│   │   ├── chartRecommender.ts # Chart type & config recommender
│   │   ├── mlEngine.ts         # Client-side ML (no deps)
│   │   ├── copilot.ts          # Rule-based AI fallback
│   │   ├── aiEngine.ts         # OpenRouter API integration
│   │   ├── reportGenerator.ts  # Markdown & HTML reports
│   │   ├── slideGenerator.ts   # Slide deck generation
│   │   ├── exportEngine.ts     # ZIP export with all artifacts
│   │   ├── chartCapture.ts     # ECharts PNG capture (DOM + offscreen)
│   │   ├── clientPptx.ts       # Client-side PPTX generation
│   │   ├── premiumExport.ts    # Premium HTML/JSON reports
│   │   ├── domainDetector.ts   # Automatic domain detection
│   │   └── domains/            # Domain-specific analytics
│   │       ├── financial.ts
│   │       ├── crypto.ts
│   │       ├── ecommerce.ts
│   │       ├── medical.ts
│   │       └── marketing.ts
│   ├── services/               # API client & server adapter
│   ├── stores/                 # Zustand state (app, conversations, interactions, theme)
│   ├── types/                  # TypeScript type definitions
│   └── utils/                  # Utility functions
├── server/                     # Backend (Express + TypeScript)
│   ├── src/
│   │   ├── routes/             # upload, copilot, reports, ai
│   │   ├── services/           # analyzer, insight engine, AI orchestrator, etc.
│   │   └── config/             # Server configuration
│   └── package.json
└── scripts/                    # Dev server launcher

Tech Stack

Layer Technology
Framework React 19 + TypeScript 6
Build Vite 8
Styling Tailwind CSS v4
Charts Apache ECharts 6
Animation Framer Motion 12
State Zustand 5
Icons Lucide React
Data Parsing PapaParse, SheetJS (xlsx)
Export JSZip, FileSaver, PptxGenJS
Server Express 4, Multer, Bull (Redis)
AI OpenRouter (multi-model)

API Endpoints

Base URL: http://localhost:3001/api

Upload

Method Path Description
POST /upload Upload CSV/XLSX
POST /upload/:id/analyze Run full analysis
GET /upload/:id/insights Get insights
GET /upload/:id/anomalies Get anomalies
GET /upload/:id/correlations Get correlations
GET /upload/:id/charts Get chart configs
GET /upload/:id/report Generate report
POST /upload/:id/export Export package
DELETE /upload/:id Delete dataset

AI Copilot

Method Path Description
POST /copilot/query Ask a question
POST /copilot/explain/:insightId Explain an insight
GET /copilot/intents List available intents

Reports

Method Path Description
GET /reports/styles List report styles
POST /reports/generate Generate report
POST /reports/generate-pptx Generate PowerPoint

Health

Method Path Description
GET /health Server status & AI config

License

MIT License. Built for the future of data analytics.

About

AI-native data analysis platform with AI-style conversational interface. Upload CSV/Excel files for instant profiling, visualizations, client-side ML, domain-specific analytics, and comprehensive export packages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages