Insight-Flow 🌊 Talk to your data — no SQL, no code, no friction.
Insight-Flow is an AI-powered data analytics platform that enables business users to extract meaningful insights from CSV datasets using natural language. By combining the analytical power of DuckDB with the reasoning capabilities of Google Gemini, Insight-Flow transforms complex raw data into clear explanations and interactive visualizations.
🌟 Key Features Natural Language Querying: Ask questions like "What was the total revenue in Q1?" or "Show me the top 5 products by sales." Instant Visualizations: Automatic detection and generation of Bar, Line, and Pie charts via Recharts. Privacy-First: DuckDB runs in-memory; data is processed per session and never stored permanently in a database. Smart Citations: Every answer includes full transparency on the SQL executed and the source columns used. Robust Parsing: Handles complex CSV formats, missing values, and type detection automatically. 🏗️ Architecture The system follows a classic Client-Server architecture with a focus on speed and security:
Frontend: React-based SPA that handles file uploads, chat interface, and interactive chart rendering. Backend: Node.js/Express server orchestrating DuckDB for local SQL execution and Gemini for SQL/Explanation generation. Storage: In-memory DuckDB instances assigned to unique session IDs, ensuring data isolation and ephemeral processing. 💻 Tech Stack Frontend: React 19, Vite, TailwindCSS, Recharts, Lucide React. Backend: Node.js, Express, DuckDB (duckdb-async), Google Gemini API (@google/generative-ai). Testing: Jest (Backend), Vitest (Frontend). Deployment: Docker-ready with docker-compose. 🚀 Quick Start Prerequisites Node.js v18+ Google Gemini API Key Installation Clone the repository:
git clone https://github.com/AryanM65/Insight-Flow.git cd Insight-Flow Setup Backend:
cd Backend npm install cp .env.example .env # Add your GEMINI_API_KEY npm start Setup Frontend:
cd ../Frontend npm install npm run dev ⚙️ Environment Variables Backend (.env) GEMINI_API_KEY: Your Google AI Studio key. PORT: Server port (default: 8000). ALLOWED_ORIGINS: Comma-separated list of allowed frontend origins. Frontend (.env) VITE_API_URL: Backend API endpoint (default: http://localhost:8000/api/v1). 🧠 Technical Depth Why DuckDB + Gemini? Most AI-to-Data solutions rely on LLMs to write code (like Python) and execute it in a sandbox. Insight-Flow takes a more efficient approach:
DuckDB: Provides professional-grade SQL performance on local CSV files without the overhead of a full database server. It is extremely fast for analytical queries.
Gemini 1.5 Flash: We use Gemini to translate natural language into optimized DuckDB SQL. By providing Gemini with the exact schema and domain-specific definitions, we achieve high accuracy even for complex join-less aggregations.
Hybrid Reasoning: Gemini doesn't just write SQL; it also explains the resulting dataset, identifying trends and outliers that a raw table might miss.
Created for the NatWest Hackathon — Empowering users through data transparency.