Files
DataClaw/README.md
T

87 lines
3.4 KiB
Markdown
Raw Normal View History

2026-03-21 22:44:41 +08:00
[🇨🇳 简体中文](./README_zh.md) | [🇬🇧 English](./README.md)
2026-03-14 15:44:48 +08:00
2026-03-21 22:44:41 +08:00
# 🦞 DataClaw (LobsterDataQA)
2026-03-14 15:44:48 +08:00
2026-03-21 22:44:41 +08:00
> **Unleash the claws on your data, making analysis as easy and refreshing as raising lobsters!** 🌊📊
> DataClaw is your intelligent, AI-powered Data Analysis Platform. Chat with your data, visualize insights instantly, and build dashboards—all through natural language. No SQL degree required!
2026-03-14 15:44:48 +08:00
2026-03-21 22:44:41 +08:00
***
2026-03-14 15:44:48 +08:00
2026-03-21 22:44:41 +08:00
## ✨ Why DataClaw?
2026-03-14 15:44:48 +08:00
2026-03-21 22:44:41 +08:00
Tired of writing complex SQL queries just to get a simple bar chart? DataClaw acts as your personal data scientist. Powered by advanced LLMs and an intelligent agentic workflow, it translates your questions into database queries, fetches the data, and renders beautiful visualizations on the fly.
Whether you're querying a massive Supabase/PostgreSQL database or just tossing in a CSV file, DataClaw's got you covered! 🚀
## 🌟 Key Features
- **🗣️ Chat to SQL**: Ask questions in plain English (or Chinese!). DataClaw understands your schema, generates accurate SQL, and self-corrects if things go sideways.
- **📈 Instant Visualizations**: Returns not just raw tables, but auto-generated interactive charts tailored to your data's shape.
- **🗂️ Multi-Source Ready**: Connects seamlessly to PostgreSQL, Supabase, and local CSV/Excel uploads.
- **🧠 Bring Your Own LLM**: Native integration with LiteLLM. Plug in OpenAI, DeepSeek, Zhipu, DashScope, Volcengine, or any compatible provider.
- **🛠️ Extensible Agent Skills**: Built on top of the powerful `nanobot` framework (a lightweight version of `OpenClaw`). Add custom tools and slash commands (`/`) to tailor the agent to your specific business logic.
- **📊 Customizable Dashboards**: Pin your favorite chat-generated charts to a drag-and-drop dashboard for quick access.
<br />
<div align="center">
<img src="./examples/index.png" width="48%" />
<img src="./examples/dashboard.png" width="48%" />
</div>
<br />
## 🏗️ Architecture
DataClaw is divided into three main claws (components):
1. **`frontend/`** 🎨: The shiny shell. Built with **React 19**, **Vite**, **TailwindCSS**, and **Zustand**. It features a chat-like interface, streaming AI responses, and interactive Vega charts.
2. **`backend/`** ⚙️: The muscle. A **FastAPI** application managing projects, data source connections, user sessions, and API gateways.
3. **`nanobot/`** 🧠: The brain. The core AI agent framework handling NL2SQL, schema caching, prompt injection, and LLM routing.
***
## 🚀 Quick Start
Ready to dive in? Let's get DataClaw running on your local machine!
### 1. Backend Setup 🐍
Ensure you have Python 3.10+ installed.
2026-03-14 15:44:48 +08:00
```bash
cd backend
2026-03-21 22:44:41 +08:00
# Create a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate
# Install dependencies
2026-03-14 15:44:48 +08:00
pip install -r requirements.txt
2026-03-21 22:44:41 +08:00
# Start the FastAPI server
uvicorn app.main:app --reload --port 8000
2026-03-14 15:44:48 +08:00
```
2026-03-21 22:44:41 +08:00
*Note: Ensure your* *`nanobot`* *is properly linked or installed in editable mode as per the project workspace.*
### 2. Frontend Setup ⚛️
Ensure you have Node.js 18+ installed.
2026-03-14 15:44:48 +08:00
```bash
cd frontend
2026-03-21 22:44:41 +08:00
# Install dependencies
2026-03-14 15:44:48 +08:00
npm install
2026-03-21 22:44:41 +08:00
# Start the Vite development server
2026-03-14 15:44:48 +08:00
npm run dev
```
2026-03-21 22:44:41 +08:00
Open your browser and navigate to `http://localhost:5173`. Boom! 🎉 You're ready to chat with your data.
***
## 🤝 Contributing
Got a cool idea? Found a bug? We'd love your help! Feel free to open an issue or submit a pull request. Let's make data analysis fun again!