DataSense is a high-performance, AI-driven data analysis and visualization dashboard. It allows users to upload raw datasets (CSV, JSON, Excel), fetch data from public URLs, and instantly generates meaningful visual representations and deep analytical insights using Google's Gemini models via Genkit. The platform now features a persistence layer for saving and loading previous analyses.
DataSense transforms the traditional data analysis workflow. Instead of manually cleaning data and selecting chart types, the AI engine analyzes column metadata and row distributions to recommend the most effective visualizations and provide automated reasoning behind the data patterns.
A walkthrough recording is not checked into the repo (kept out of git to avoid bloating clone size — see .gitignore). Ask a maintainer for the latest demo recording, or run the app locally with npm run dev.
- Framework: Next.js 15 (App Router)
- AI Engine: Genkit 1.x with Google AI (Gemini 2.5 Flash)
- Visualization: Recharts (Responsive, multi-chart support)
- Styling: Tailwind CSS & Shadcn UI
- Data Handling:
xlsxfor Excel parsing, custom CSV/JSON processors - Theme:
next-themes(Dark/Light mode support)
For detailed technical documentation designed for AI agents and developers, see docs/overview.md.
This project is licensed under the MIT License. See CONTRIBUTING.md for contribution guidelines.
The application leverages 7 specialized Genkit AI flows:
- Visualization Recommender: Recommends up to 9 optimal chart types based on metadata.
- Data Insights Engine: Generates narrative insights, key findings, and predictions.
- Natural Language Query: Converts user questions into dynamic visualizations.
- Per-Chart Analysis: Deep-dives into a specific chart's data patterns.
- Executive Report Generation: Creates comprehensive summaries and action items.
- Anomaly Detection: Explains statistical outliers with business context.
- Batch Analysis: Correlates patterns across multiple charts.
graph TD
A["User Uploads File or URL"] --> B{"Source?"}
B -- "Local File" --> C["DataUploader"]
B -- "Public URL" --> C
C --> D{"File Type?"}
D -- "CSV/JSON" --> E["parseCSV / JSON.parse"]
D -- "Excel" --> F["parseExcel with Auto-Sheet"]
E --> G["Data Cleaning & Validation"]
F --> G
G --> H["Extract Column Metadata"]
H --> I["Client Memory & State"]
subgraph Persistence["Data Persistence"]
I --> J["Save Analysis to DB"]
K["Previous Analyses"] --> I
end
subgraph AIFlows["AI Flows (Server Actions)"]
I --> L["recommendVisualizations"]
I --> M["aiGeneratedDataInsights"]
I --> N["naturalLanguageQuery"]
end
L --> O["Dashboard Grid"]
M --> P["Insights Panel"]
N --> Q["Dynamic Chart"]
src/ai/flows/: Genkit server actions for AI logic.src/app/lib/: Data processing, statistics, and validation utilities.src/components/dashboard/: UI for charts, insights, and query bar.src/lib/: Shared utilities (AI cache, prompt formatting, state).
- Instant Dashboard: Zero-config visualization upon upload.
- Natural Language: Query your data in plain English.
- Persistence & History: Save your analyses and restore them later with one click.
- URL Importing: Fetch datasets directly from public URLs (GitHub, raw CSV/JSON hosts, etc.), with automatic link rewriting for Google Drive share links and Google Sheets share links (converted to CSV export). Note: large Google Drive files (roughly >100MB, or anything Drive can't virus-scan) sit behind a confirmation interstitial that a direct fetch can't get past, so only small/typical Drive files work.
- Robust Parsing: Advanced sheet detection for Excel and robust quoting for CSV.
- Theme Intelligence: Fully responsive dark and light modes.
- Raw Data Explorer: Virtualized table for inspecting large datasets.
- Executive Reports: One-click professional analysis export.
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)