Skip to content

narender-rk10/OpenBI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenBI - AI-Native Business Intelligence Platform

Self-hosted Β· Open Source Β· No SQL Required

Connect 90+ data sources, chat with AI agents, build interactive dashboards, and automate report delivery β€” powered by MindsDB, FastAPI, and React.

Python FastAPI React TypeScript MindsDB MongoDB Docker License: CC BY-NC-ND 4.0


Demo Video

OpenBI Demo

Full walkthrough: connecting a data source, building an AI dashboard, chatting with agents, exporting to PDF/PPTX, and scheduling a Telegram report.


Screenshots

Landing Page

Landing Page

Projects

Projects

Data Sources β€” Add Source

Add Data Source

Data Sources β€” Connected Sources

Connected Sources

Data Sources β€” Table Preview

Table Preview

Knowledge Bases

Knowledge Bases

Knowledge Base β€” Chunk Viewer

KB Chunks

AI Agents

AI Agents

AI Agents β€” Create Agent

Create Agent

Chat β€” Table Result

Chat Table

Chat β€” Auto-Generated Chart

Chat Chart

Chat β€” SQL Query View

SQL Query

Chat β€” Add to Dashboard

Add to Dashboard

Dashboards

Dashboards

Dashboard View

Dashboard

PDF Export

PDF Export

PPTX Export (Presenton AI)

PPTX Export

Scheduled Reports

Schedule Builder

Schedule Run History

Run History

Chat Analytics

Chat Analytics

Langfuse Query Log

Langfuse

Settings β€” LLM Configuration

LLM Config

Settings β€” User Management

User Management

Settings β€” Telegram Integration

Telegram

Telegram Bot (Mobile)

Help & Commands Connect & Setup
TG Help TG Connect
Projects & Agents Dashboards
TG Agents TG Dashboards
Reports
TG Reports

✨ Features

πŸ€– AI Agents & Smart Chat

  • Plain-English querying β€” type any question; MindsDB translates it to SQL and executes it against your live database
  • @-mention routing β€” type @SalesAgent to target a specific agent directly
  • Multi-agent queries β€” mention multiple agents (@Sales @Marketing show Q1 revenue) to fire parallel queries and get a consolidated LLM-synthesized report
  • Auto-routing β€” when no @ is used, an LLM picks the best-fit agent automatically; if ambiguous, a picker modal appears
  • Greeting detection β€” conversational messages ("hi", "hello") are handled instantly without agent routing overhead
  • Streaming SSE answers β€” answers appear token-by-token with intermediate status ("Executing SQL…", "Processing results…")
  • Extracted SQL display β€” every answer shows the exact SQL query that was run (copyable)
  • Auto-generated charts β€” data results automatically trigger chart generation via AntV G2
  • AI data summary β€” each result gets a brief natural-language insight ("Revenue grew 12% YoY, driven by the APAC region")
  • Conversation memory β€” last 20 messages are included as context for every follow-up question
  • Multi-LLM support β€” Gemini, OpenAI, and Anthropic are pluggable; configured per-org in the UI (encrypted at rest)
  • Session history β€” all conversations are saved; resume any previous chat from the sidebar

πŸ“Š AI-Powered Dashboards

  • Drag-and-drop grid (Gridstack.js) β€” freely resize and reposition any widget
  • Four widget types:
    • Chart β€” AntV G2 v5 (bar, column, line, area, pie, donut, scatter, heatmap, treemap, gauge, funnel, radar)
    • Table β€” AntV S2 v2 pivot table with conditional formatting, sorting, column hiding, number/currency/percent formatting
    • KPI Card β€” metric + trend indicator + comparison period
    • AI Summary Card β€” LLM-generated narrative for the latest widget result
  • Dashboard Chat β€” modify any widget in plain English:
    • Charts: change type, recolor, retitle, change the underlying SQL, switch between chart variants
    • Tables: pivot rows Γ— columns Γ— values, add conditional formatting, sort, hide columns
    • Graceful rejection of unsupported ops (3D, geo-map, Gantt) with redirect guidance
  • Global Filters β€” text, dropdown, date-range, and number-range filters applied across all widgets at once
    • AI-suggested filters based on your data schema
    • Drag-and-drop reorder, inline edit, one-click clear
  • AI Narrative β€” on-demand brief or detailed natural-language summary of any widget result
  • Real-time updates over WebSocket (Redis pub/sub broadcast)
  • Version History β€” every significant save creates a restorable named snapshot; browse and restore via the Version History drawer
  • Public Sharing β€” one-click share link, fully readable without login

🧠 Knowledge Bases (RAG)

  • File upload β€” ingest documents into a vector store; agents query KBs alongside live database tables in the same question
  • Web crawl β€” index a URL (and its linked pages) as a KB source using MindsDB's built-in web handler
  • Hybrid queries β€” combine SQL (structured data) and RAG (unstructured documents) in a single agent response
  • 9 vector store backends β€” choose at KB creation time
  • Embed batch control β€” KB_EMBED_BATCH_SIZE env var tunes batch size for your embedding provider's rate limits

Supported File Formats

Format Extension(s) How it's processed
PDF .pdf Text extracted via pypdf, page-by-page
CSV .csv Loaded with pandas, converted to plain text
TSV .tsv Loaded with pandas (tab separator), converted to plain text
Excel .xlsx, .xls Loaded with pandas read_excel, converted to plain text
JSON .json Parsed and pretty-formatted as text
Parquet .parquet Loaded with pandas + pyarrow, converted to plain text
Markdown .md, .markdown, .mdown, .mkd Remapped to .txt (MindsDB rejects .md extension directly)
reStructuredText .rst Remapped to .txt
Plain Text .txt, .text, .log, .rtf Decoded as UTF-8 and uploaded directly
Any other * Decoded as UTF-8 text; binary files will error gracefully

Vector Store Backends

Vector Store Engine ID Notes
ChromaDB (built-in) default Managed by MindsDB β€” zero config
ChromaDB (external) chromadb host, port
Qdrant qdrant url, api_key
Milvus milvus host, port, user, password
PGVector pgvector host, port, database, user, password
LanceDB lancedb uri
Weaviate weaviate weaviate_url, weaviate_api_key
Pinecone pinecone api_key
Couchbase couchbase connection_string, bucket, user, password

πŸ“„ PDF Export (Versioned)

  • Client-side full-dashboard capture (html2canvas + jsPDF, landscape)
  • Every export is version-numbered and stored in MongoDB GridFS
  • PDF History modal β€” browse, preview info, and re-download any previous version
  • Delivered via Telegram bot (/report pdf) or email attachment

πŸ“‘ PPTX Export (AI-Assisted via Presenton)

  • Click Export β†’ PPTX on any dashboard
  • Dashboard context is summarised and sent to Presenton (self-hosted AI presentation generator)
  • Slides generated asynchronously; editable in an in-browser iframe before download
  • Delivered via Telegram bot (/report pptx) as a .pptx document

πŸ“… Scheduled Reports

  • Cron expressions β€” powered by APScheduler (AsyncIOScheduler, in-process β€” no Celery or extra Redis queue needed)
  • Three delivery channels per schedule:
    • Email β€” HTML report + PDF attachment via SMTP (STARTTLS port 587)
    • Telegram β€” PDF document sent to any chat ID
    • Webhook β€” HTTP POST with dashboard snapshot JSON payload
  • Run history and last-delivery status visible on the Schedules page

πŸ“± Telegram Bot

Full-featured mobile interface. All commands work in private chat only.

Command Description
/connect <api_key> Link your OpenBI account
/disconnect Clear session
/status Show connected user, project, and active agent
/projects List projects with tap-to-select keyboard
/use <name> Switch active project
/agents List agents with tap-to-select keyboard
/dashboards Browse dashboards; tap to receive chart image album
/report pdf|pptx Pick a dashboard and receive as a file
/kbs List knowledge bases
/newchat Start a fresh conversation (clears context)
/help Show all commands

πŸ“ˆ Observability (Langfuse)

  • Optional Langfuse integration for LLM request tracing
  • Track token usage, latency, cost estimation, and agent reasoning per call
  • Enable via LANGFUSE_* env vars β€” zero overhead when disabled

πŸ—οΈ System Architecture & Data Flow

High-Level System Architecture

High-Level System Architecture

Low-Level Data Flows

Low-Level Data Flows

For a detailed walkthrough of each architectural layer, database collections, credentials encryption, and background job runner subsystems, refer to the full OpenBI Architectural Reference.


Step-by-Step Data Flows

1. Authentication Flow

User submits credentials
  β†’ POST /api/auth/login (FastAPI)
  β†’ bcrypt password verify against MongoDB
  β†’ JWT (HS256) issued with user_id + org_id
  β†’ stored in localStorage as openbi_token
  β†’ all subsequent API calls send Bearer <token>

2. Connecting a Data Source

User fills connection form (UI)
  β†’ POST /api/projects/{pid}/connections
  β†’ FastAPI encrypts credentials with Fernet key
  β†’ Stores encrypted creds in MongoDB (connections collection)
  β†’ Calls MindsDB: CREATE DATABASE handler_name WITH ENGINE='postgres', PARAMETERS={...}
  β†’ MindsDB validates connectivity (raises error on failure)
  β†’ Connection record marked active in MongoDB

3. Creating an Agent

User defines agent (name, LLM, data sources, KB, prompt template)
  β†’ POST /api/projects/{pid}/agents
  β†’ FastAPI calls MindsDB REST: POST /api/projects/{project}/agents
  β†’ MindsDB creates agent with skills: [{type:'text2sql', tables:[...]}, {type:'knowledge_base', ...}]
  β†’ Agent record stored in MongoDB with mindsdb_agent_name reference

4. Chat Query Flow (most critical path)

User types question in Chat UI
  ↓
Frontend routing logic:
  β”œβ”€ Multiple @agents mentioned? β†’ POST /chat/multi (parallel agents + LLM consolidation)
  β”œβ”€ Single @agent? β†’ route directly
  β”œβ”€ Greeting ("hi", "hello")? β†’ route to first agent (backend handles locally, no MindsDB call)
  β”œβ”€ Active session agent? β†’ reuse (continuation)
  β”œβ”€ Single agent exists? β†’ auto-route
  └─ Multiple agents? β†’ POST /api/llm/route-agent (LLM picks best fit)
                          β”œβ”€ Confident? β†’ auto-route silently
                          └─ Ambiguous? β†’ Agent Picker modal
  ↓
POST /api/projects/{pid}/chat  (body: agent_id, message, session_id, stream=true)
  ↓
FastAPI backend:
  1. Load session from MongoDB (last 20 messages as history)
  2. Check for greeting pattern β†’ stream local response, skip MindsDB
  3. Ensure MindsDB project exists (survive container restarts)
  4. Open SSE stream β†’ yield "thinking" events
  ↓
MindsDB agent completions/stream:
  β†’ Agent receives question + history
  β†’ LLM selects relevant data source skill
  β†’ Generates SQL query β†’ executes against live DB
  β†’ Streams back: context events (SQL shown) + data event (answer text)
  ↓
FastAPI parses stream:
  β†’ Extracts SQL from context events (regex: "Executing final SQL query:")
  β†’ Re-executes SQL via MindsDB SQL API for clean structured data
  β†’ Yields SSE events: thinking β†’ sql β†’ data β†’ answer β†’ done
  ↓
Frontend (useChat hook):
  β†’ Renders streaming answer live
  β†’ Displays extracted SQL in collapsible block
  β†’ On "done": triggers auto chart generation (AntV G2 spec via LLM)
  β†’ Triggers AI summary generation for data results
  β†’ Persists message to session (MongoDB update)
  β†’ Records analytics (tokens, latency, cost, routing_source)

5. Dashboard Widget Flow

User adds widget β†’ SQL query entered or AI-generated
  β†’ POST /api/projects/{pid}/dashboards/{did}/widgets
  β†’ Widget stored in MongoDB with sql_query + display_type + config
  ↓
Widget loads:
  β†’ Runs SQL via MindsDB β†’ columns + rows returned
  β†’ cached_data stored on widget document
  β†’ AntV G2 chart spec generated via LLM (chart_config JSONB)
  β†’ AntV S2 table config stored (sort, pivot, formatting)
  ↓
Dashboard Chat ("@ChartAgent make it a line chart"):
  β†’ Modifies chart_config via LLM β†’ stored back to widget
  β†’ WebSocket broadcast β†’ all viewers see update in real-time

6. Knowledge Base RAG Flow

User uploads file (PDF, CSV, XLSX, JSON, Parquet, MD, TXT…)
  β†’ FastAPI extracts text (pypdf / pandas / plain decode)
  β†’ Writes text to temp file β†’ uploads to MindsDB via multipart
  β†’ MindsDB chunks text server-side β†’ embeds β†’ stores in vector store
  ↓
Agent query that involves KB:
  β†’ MindsDB agent retrieves relevant chunks (semantic search)
  β†’ Combines with SQL results from data source skill
  β†’ LLM synthesizes final answer from both sources

7. Scheduled Report Flow

User creates schedule (cron expression + dashboard_id + delivery channels)
  β†’ Stored in MongoDB (schedules collection)
  β†’ APScheduler (AsyncIOScheduler) registers job at startup
  ↓
At scheduled time:
  β†’ report_runner.py fires
  β†’ Refreshes all widgets (re-executes SQL queries)
  β†’ Captures PDF (html2canvas β†’ jsPDF) OR triggers PPTX (Presenton)
  β†’ For each delivery channel:
      Email  β†’ aiosmtplib STARTTLS β†’ HTML body + PDF attachment
      Telegram β†’ python-telegram-bot β†’ send_document (PDF) or text summary
      Webhook β†’ httpx POST β†’ JSON payload with widget cached_data
  β†’ Run history recorded in MongoDB

πŸ”Œ Data Sources (90+)

Powered by MindsDB handlers. Credentials entered in the UI β€” no config files required.

πŸ—„οΈ Databases (35 sources)

Logo Source Handler ID
🐘 PostgreSQL postgres
🐬 MySQL mysql
🦭 MariaDB mariadb
πŸͺŸ Microsoft SQL Server mssql
πŸ”Ά Oracle oracle
πŸ“ SQLite sqlite
πŸ¦† DuckDB duckdb
πŸƒ MongoDB mongodb
⚑ ClickHouse clickhouse
πŸͺ³ CockroachDB cockroachdb
πŸ”· TiDB tidb
🟒 Vitess vitess
βš™οΈ SingleStore singlestore
πŸ‘οΈ Cassandra cassandra
🦈 ScyllaDB scylladb
🟠 Amazon DynamoDB dynamodb
πŸ›‹οΈ Couchbase couchbase
⚑ Supabase supabase
πŸ”₯ Google Firestore firestore
πŸŒ… Amazon Aurora aurora
☁️ Google Cloud SQL google_cloud_sql
🌐 Google Cloud Spanner spanner
πŸ‰ Apache Druid druid
🦌 Apache Impala impala
πŸ”· Vertica vertica
πŸ”΅ Teradata teradata
πŸ”΅ IBM Db2 db2
🌸 SAP HANA sap_hana
πŸŒ€ SurrealDB surrealdb
πŸͺ PlanetScale planet_scale
⚑ YugabyteDB yugabyte
🧲 Materialize materialize
πŸ“¦ CrateDB crate
πŸš€ Dremio dremio
πŸ¦‹ FaunaDB fauna

☁️ Cloud Data Warehouses (7 sources)

Logo Source Handler ID
❄️ Snowflake snowflake
πŸ“Š Google BigQuery bigquery
πŸ”΄ Amazon Redshift redshift
🧱 Databricks databricks
πŸ”Ί Trino trino
⭐ StarRocks starrocks
🐝 Apache Hive hive

πŸ”— SaaS & APIs (40+ sources)

Logo Source Handler ID
πŸ“‘ Google Sheets sheets
πŸ’³ Stripe stripe
🧑 HubSpot hubspot
πŸ›’ Shopify shopify
☁️ Salesforce salesforce
πŸ’¬ Slack slack
πŸ™ GitHub github
🦊 GitLab gitlab
πŸ“§ Gmail gmail
🐦 Twitter / X twitter
πŸ“ Notion notion
πŸ“‹ Airtable airtable
🎫 Zendesk zendesk
πŸ’™ Intercom intercom
πŸ”΅ Jira jira
πŸ“– Confluence confluence
πŸ’° PayPal paypal
πŸͺ™ Binance binance
πŸ”΅ Coinbase coinbase
🏦 Plaid plaid
πŸ“± Twilio twilio
🚴 Strava strava
πŸ’¬ WhatsApp whatsapp
πŸ‘Ύ Discord discord
πŸ“Ί YouTube youtube
🏦 QuickBooks quickbooks
πŸ“… Google Calendar google_calendar
πŸ“ˆ Google Analytics google_analytics
πŸ” Google Search google_search
πŸ€– Reddit reddit
πŸ’Ό Microsoft Teams teams
πŸ“° NewsAPI newsapi
🎟️ Eventbrite eventbrite
πŸ“¨ Sendinblue / Brevo sendinblue
🐳 Docker Hub dockerhub
πŸ“Š OpenBB openbb
πŸ“– Wikipedia mediawiki
πŸš€ Rocket.Chat rocket_chat
πŸ—οΈ Strapi strapi
πŸ”Ά HackerNews hackernews

πŸ—‚οΈ File Storage (9 sources)

Logo Source Handler ID
πŸͺ£ Amazon S3 s3
πŸ—„οΈ Google Cloud Storage gcs
πŸ”· Azure Blob Storage azure_blob
🐘 HDFS hdfs
🟑 MinIO minio
πŸ“‚ FTP ftp
πŸ“¦ Dropbox dropbox
☁️ OneDrive one_drive
🏒 SharePoint sharepoint

⏱️ Time-Series (4 sources)

Logo Source Handler ID
πŸ“ˆ InfluxDB influxdb
⏱️ TimescaleDB timescaledb
πŸ›οΈ QuestDB questdb
πŸ• TDengine tdengine

πŸ” Search (2 sources)

Logo Source Handler ID
πŸ” Elasticsearch elasticsearch
β˜€οΈ Apache Solr solr

🌐 API (1 source)

Logo Source Handler ID
🌐 REST API / Web Crawler web

πŸ› οΈ Tech Stack

Layer Technology
Backend Python 3.11, FastAPI 0.115, Motor (async MongoDB driver), Pydantic v2
Frontend React 19, TypeScript 5.x, Vite 8, Tailwind CSS v4, Radix UI
Charts AntV G2 v5 (CDN β€” bar, line, area, scatter, pie, heatmap, treemap, gauge, funnel, radar)
Tables AntV S2 v2 (CDN β€” pivot table, conditional formatting, sorting, multi-level headers)
Dashboard Grid Gridstack.js 12 (drag-resize, multi-column layout, responsive breakpoints)
AI Engine MindsDB 26.x (text-to-SQL, multi-skill agents, vector knowledge bases)
LLM Providers Google Gemini Β· OpenAI GPT-4o Β· Anthropic Claude (pluggable per-org)
Database MongoDB (external β€” Atlas or self-hosted; Motor async driver)
Scheduler APScheduler 3.10 (AsyncIOScheduler, in-process β€” no Celery/Redis queue)
Real-time Redis 7 + WebSocket (pub/sub broadcast for live dashboard updates)
PDF Export html2canvas 1.4 + jsPDF 4.2 (client-side, landscape, versioned in GridFS)
PPTX Export Presenton (self-hosted AI presentation generator, async generate + poll)
Telegram python-telegram-bot v21 (private-chat commands, PDF/PPTX delivery)
Email aiosmtplib 3 (async SMTP, STARTTLS port 587, HTML + PDF attachment)
Auth JWT HS256, bcrypt password hashing, stored in localStorage
Observability Langfuse (optional LLM tracing, token usage, latency)
Containerisation Docker Compose (6 services)

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose
  • External MongoDB instance (Atlas free tier works β€” no Mongo container included)
  • At least one LLM API key (Gemini, OpenAI, or Anthropic) β€” configured in the UI after login

1. Clone

git clone https://github.com/narender-rk10/openbi.git
cd openbi

2. Configure environment

cp .env.example .env

Edit .env β€” the only required changes before first boot:

MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/openbi
JWT_SECRET_KEY=your-random-secret-here

3. Start

docker compose up -d

Open http://localhost:3000

Default login: admin@openbi.dev / changeme123 β€” change this immediately in Settings.

4. Connect a data source

  1. Connections β†’ Add Connection β†’ pick a source β†’ enter credentials β†’ Test β†’ Save
  2. Agents β†’ Create Agent β†’ link the connection β†’ set LLM model and prompt
  3. Chat β†’ start asking questions in plain English

5. (Optional) Enable Telegram bot

  1. Create a bot via @BotFather and copy the token
  2. Set TELEGRAM_BOT_TOKEN=your-token in .env
  3. docker compose up -d telegram_bot
  4. In the bot: /connect <your-openbi-api-key>

πŸ”§ Environment Variables

Variable Default Description
MONGODB_URI β€” Required. External MongoDB connection string
MONGODB_DB_NAME openbi Database name
JWT_SECRET_KEY β€” Required. Random string for JWT signing
JWT_ACCESS_TOKEN_EXPIRE_MINUTES 1440 Token lifetime (24 h)
MINDSDB_URL http://mindsdb:47334 MindsDB internal URL
REDIS_URL redis://redis:6379/0 Redis (WebSocket pub/sub)
FERNET_KEY auto-generated API key encryption key β€” set explicitly to survive container restarts
SUPER_ADMIN_EMAIL admin@openbi.dev First superuser email
SUPER_ADMIN_PASSWORD changeme123 First superuser password β€” change this
KB_EMBED_BATCH_SIZE 100 Embedding batch size (tune for Vertex AI / Gemini limits)
TELEGRAM_BOT_TOKEN β€” Optional. Telegram bot token from @BotFather
SMTP_HOST β€” SMTP server hostname
SMTP_PORT 587 SMTP port (587 = STARTTLS)
SMTP_USER β€” SMTP username
SMTP_PASSWORD β€” SMTP password
SMTP_FROM β€” Sender address for report emails
APP_URL http://localhost:3000 Used in email links
PRESENTON_LLM_PROVIDER google LLM for PPTX generation (google / openai / anthropic)
OPENAI_API_KEY β€” Passed to Presenton container
GOOGLE_API_KEY β€” Passed to Presenton container
ANTHROPIC_API_KEY β€” Passed to Presenton container
LANGFUSE_SECRET_KEY β€” Optional. Langfuse observability
LANGFUSE_PUBLIC_KEY β€” Optional. Langfuse observability
LANGFUSE_HOST β€” Optional. Langfuse server URL

LLM provider, model, and API key for the main OpenBI app are configured in the UI under Settings β†’ LLM and stored encrypted in MongoDB β€” not in .env.


🐳 Docker Services

Service Dockerfile Port Description
backend Dockerfile 8000 FastAPI application server
frontend Dockerfile.frontend 3000 React / Vite SPA (Vite dev server)
mindsdb Dockerfile.mindsdb 47334 (internal) MindsDB β€” SQL engine + agents + knowledge bases
redis redis:7-alpine 6379 (internal) WebSocket pub/sub broadcast
presenton Dockerfile.presenton 127.0.0.1:7771 Self-hosted AI presentation (PPTX) generator
telegram_bot telegram_bot/Dockerfile.telegram β€” Telegram bot process

Useful commands

# Start full stack
docker compose up -d

# Rebuild a single service after code changes
docker compose up -d --build backend
docker compose up -d --build frontend

# Follow logs
docker compose logs -f backend
docker compose logs -f mindsdb

# Full rebuild (wipes volumes β€” resets MindsDB)
docker compose down -v && docker compose up -d --build

# Lightweight mode (low RAM / testing β€” skips Presenton + Telegram)
docker compose up -d backend frontend mindsdb redis

πŸ“ Project Structure

openbi/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ api/                   # FastAPI routers (one file per domain)
β”‚   β”‚   β”œβ”€β”€ auth.py            # JWT login / signup / refresh
β”‚   β”‚   β”œβ”€β”€ projects.py        # Project CRUD
β”‚   β”‚   β”œβ”€β”€ connections.py     # Data source connections (encrypted creds)
β”‚   β”‚   β”œβ”€β”€ knowledge_bases.py # KB create / upload / crawl / delete
β”‚   β”‚   β”œβ”€β”€ agents.py          # MindsDB agent management
β”‚   β”‚   β”œβ”€β”€ chat.py            # SSE streaming chat + multi-agent
β”‚   β”‚   β”œβ”€β”€ dashboards.py      # Dashboard + widget CRUD
β”‚   β”‚   β”œβ”€β”€ schedules.py       # APScheduler cron jobs
β”‚   β”‚   β”œβ”€β”€ settings.py        # Org LLM config, branding, SMTP
β”‚   β”‚   β”œβ”€β”€ analytics.py       # Chat analytics + observability
β”‚   β”‚   β”œβ”€β”€ llm.py             # LLM complete / summarize / route-agent
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ database.py        # Motor async client, org settings cache
β”‚   β”‚   β”œβ”€β”€ security.py        # JWT + bcrypt + Fernet encryption
β”‚   β”‚   └── exceptions.py
β”‚   └── services/
β”‚       β”œβ”€β”€ mindsdb_client.py  # MindsDB REST wrapper (SQL + agents + KBs)
β”‚       β”œβ”€β”€ llm_client.py      # Unified LLM (Gemini / OpenAI / Anthropic)
β”‚       β”œβ”€β”€ chart_agent.py     # LLM β†’ AntV G2 chart spec
β”‚       β”œβ”€β”€ table_agent.py     # LLM β†’ AntV S2 pivot spec
β”‚       β”œβ”€β”€ delivery_service.py # Email + Telegram + webhook delivery
β”‚       β”œβ”€β”€ report_runner.py   # APScheduler job β€” refresh + deliver
β”‚       β”œβ”€β”€ narrative.py       # AI natural-language data summaries
β”‚       └── langfuse_client.py # Optional LLM observability
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ dashboard/     # AntVG2Chart, AntVS2Table, KPICard,
β”‚       β”‚   β”‚                  # PPTXExportModal, DashboardFilters, …
β”‚       β”‚   β”œβ”€β”€ layout/        # Sidebar, Topbar
β”‚       β”‚   └── shared/        # ConfirmDialog, EmptyState, ScheduleBuilder
β”‚       β”œβ”€β”€ pages/             # ChatPage, DashboardViewPage, AgentsPage,
β”‚       β”‚                      # KnowledgeBasesPage, ConnectionsPage,
β”‚       β”‚                      # SchedulesPage, SettingsPage, ObservabilityPage
β”‚       β”œβ”€β”€ hooks/             # useChat (SSE), useAuth, useWebSocket
β”‚       └── lib/
β”‚           β”œβ”€β”€ api.ts         # Axios instance with JWT injection
β”‚           β”œβ”€β”€ sources.ts     # 90+ data source catalog
β”‚           β”œβ”€β”€ auth.tsx       # Auth context + token management
β”‚           └── types.ts       # Shared TypeScript types
β”œβ”€β”€ telegram_bot/
β”‚   β”œβ”€β”€ bot.py                 # All Telegram commands + session management
β”‚   └── Dockerfile.telegram
β”œβ”€β”€ report_templates/          # Jinja2 HTML email report templates
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ screenshots/           # UI screenshots
β”‚   β”œβ”€β”€ architecture.png       # Architecture diagram
β”‚   └── test-scenario/         # Seed SQL + docker-compose for test DBs
β”œβ”€β”€ scripts/                   # setup_finance_demo.py + maintenance tools
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile                 # Backend image
β”œβ”€β”€ Dockerfile.frontend        # Frontend (Node 20 + Vite dev)
β”œβ”€β”€ Dockerfile.mindsdb         # MindsDB + handler packages
β”œβ”€β”€ Dockerfile.presenton       # Presenton AI slide generator
└── pyproject.toml             # Backend Python dependencies

πŸ”¬ Testing with Limited Resources

The full stack requires ~12–16 GB RAM. On constrained machines:

# Start only core services (no Presenton / Telegram)
docker compose up -d backend frontend mindsdb redis

# Spin up a test PostgreSQL with finance seed data
docker compose -f docs/test-scenario/finance/docker-compose.yml up -d

# Run the finance demo setup script (creates connection + agent + 16-widget dashboard)
python scripts/setup_finance_demo.py

# Tear down the test DB when done
docker compose -f docs/test-scenario/finance/docker-compose.yml down

πŸ“„ License

Copyright Β© 2026 Narender Keswani

Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International.

  • βœ… Share β€” copy and redistribute in any medium or format
  • βœ… Attribution β€” credit Narender Keswani and link to this repository
  • ❌ NonCommercial β€” no commercial use
  • ❌ NoDerivatives β€” no modified distributions

For commercial licensing: narender.rk10@gmail.com

About

OpenBI- AI-native BI platform - chat with 90+ data sources, build dashboards, and automate reports. Self-hosted with Docker.

Topics

Resources

License

Stars

9 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors