[Open-source] An AI reporting platform, connect to database and converse with data, let AI build dashboard for you
![[Open-source] An AI reporting platform, connect to database and converse with data, let AI build dashboard for you](https://yy123.ink/api/img/1796370467115-ax2efd.png)
1. Project Overview
LingxiBI · LingxiBI
Accessing the database, conversing with data, and letting AI build dashboards for you
Mind-reading BI —— The tacit understanding between you and data
2. Open Source License
Licensed under MIT
3. Screenshots
4. Feature Overview
LingxiBI (LingxiBI)A self-learning BI platform that can turn raw databases into shareable and interactive data dashboards —— without writing SQL or setting up traditional BI tools
Access MySQL, PostgreSQL, or Oracle, then:
- Ask questions in natural language
—— AI automatically writes and executes read-only SQL - Deposit indicator library
—— Let AI always match your business definitions - Getting smarter and smarter
—— Each conversation will teach the system business rules - Generate HTML dashboards
—— Continuously optimize through conversations, with complete version history and rollback - Get timely updates
—— Threshold warnings through email (with Excel attachments) and/or Feishu card push
5. Tech Stack
Self-learning mechanism
Most text-to-SQL tools are stateless —— ask and forget. LingxiBI, however,Will continuously deposit business knowledge isolated by data sourceAnd feed it back into each answer. The more the team uses it, the more accurate it becomes
Core mechanism:
- Automatic extraction
—— After each round of conversation, LLM only extracts new knowledge (with duplicates removed and confidence level) - Human feedback loop
—— Good answers are stored as few-shot examples for the next model to follow - Selected Indicators
—— Verified Named SQL as a High-Trust Reusable Definition - Smart Recall
—— Sorted by Keyword Relevance × Confidence, within Token Budget
Technical Stack
| Not the 'scaffolding self-bundled': |
Technology |
|
Backend |
Rust · Axum · SQLx · Tokio |
| ️
Meta Database |
MySQL / MariaDB |
|
Data Source |
MySQL · PostgreSQL · Oracle |
|
Large Model |
Any OpenAI Compatible API (DeepSeek, GPT-4o, Qwen, etc.) |
|
Delivery |
SMTP (lettre) · Excel (rust_xlsxwriter) · Feishu Webhook (HMAC-SHA256) |
| ⚛️
Frontend |
React 19 · Vite · TypeScript · Tailwind CSS · Zustand · React Router |
Architecture
Design Principles:
- Stateless API
—— Only the Meta Database Holds State, Friendly to Horizontal Expansion - Atomic Scheduling
—— Background Tasks are Atoms, Multiple Instances are Secure - Multi-Channel Delivery
—— Each Rule Can Choose Email, Feishu, or Both; Channel Results are Independently Recorded - Security First
—— SQL Whitelist Verification, Webhook SSRF Protection, bcrypt-12, Secure Response Headers
Quick Start with Docker (Recommended)
docker compose up -d --build
Openhttp://localhost:9528→ Create the First Administrator Account and You're Ready to Go.
| Service |
Roles |
| db |
MySQL Metadata Storage (Internal Access Only) |
| server |
Rust API
:3001 (JWT_SECRET is Automatically Generated on First Startup) |
| web |
Nginx
:9528
—— SPA + API Proxy (Including WebSocket) |
docker compose logs -f server # Track API Logs
docker compose down # Stop (Preserve Data)
docker compose down -v # Stop and Clear All Data
Local development
Pre-Dependencies
-
Rust(stable) -
Node.js ≥ 18 -
MySQL or MariaDB
# 1. Create the Meta Databasemysql -e "CREATE DATABASE ai_report CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"# 2. Start backendcd servercp .env.example .env # Edit DATABASE_URL + JWT_SECRETcargo run # Automatically Execute Migrations, Listen on :3001# 3. Start frontendcd clientnpm install && npm run dev # Vite proxy /api → :3001
Open terminal output address, create administrator, add data source, in Settingsconfigure large model.
Configuration
| Variables |
Description |
| DATABASE_URL |
Meta database connection string |
| JWT_SECRET |
Token signature key (≥ 16 characters) |
| CORS_ALLOWED_ORIGIN |
Allowed sources (development use *) |
Production environment deployment
# Server one-time initialization (Rust, MySQL, Nginx, TLS):bash scripts/setup-server.sh [domain]# Publish from local:./scripts/deploy.sh user@host [domain]
Rust binary compiled on target host (avoid glibc mismatch). SPA built locally and deployed as static files.
Project structure
lingxibi/├── client/ React + Vite SPA│ └── src/│ ├── pages/ Route-level pages│ ├── components/ Common UI components│ ├── stores/ Zustand state management│ ├── lib/ API client and types│ └── i18n/ English and Chinese translations├── server/ Rust (Axum) API│ ├── src/│ │ ├── routes/ HTTP + WebSocket Processor│ │ ├── llm/ Large Model Client + Prompt Engine│ │ ├── alert_engine.rsWarning Evaluation + Multi-channel Delivery│ │ ├── feishu.rsFeishu Webhook + HMAC Signature│ │ ├── email.rsSMTP Email Sending│ │ └── ...│ └── migrations/ SQL Migration (Auto-execution)├── scripts/ Deployment Automation├── docker-compose.ymlOne Command to Launch Full Stack└── .env.exampleEnvironment Variable Template
Security
| Layer |
Mechanism |
| Authentication |
JWT Session, bcrypt-12, Login Throttling (5 Failed Attempts / 5 Minutes Lockout) |
| Authorization |
Admin/Member Two Roles; Reports, Metrics, Sessions, Warnings Isolated by User; Data Source Level Access Control (Each Read/Query Forced Validation on Server) |
| SQL Security |
Lexical Whitelist Verification (Only Allow |
| SSRF Protection |
Feishu Webhook URL Restricted to Official Domain |
| Response Header |
X-Content-Type-Options、Referrer-Policy、Permissions-Policy |
| Credential Protection |
API never returns keys/passwords; keys/passwords are always masked in the response |
6. Source Code Repository
Open-source project address:
https://github.com/bonfirer/LingxiBI
Next steps