| Crates.io | r2-data2 |
| lib.rs | r2-data2 |
| version | 0.2.0 |
| created_at | 2025-05-03 05:27:11.076756+00 |
| updated_at | 2025-05-03 05:27:11.076756+00 |
| description | A web-based SQL query tool and data browser with visualization capabilities, built with Rust (Axum) and React (TypeScript/Vite). 95% of the code is written by AI agent. |
| homepage | https://github.com/tyr-chen/r2-data-2 |
| repository | https://github.com/tyr-chen/r2-data-2 |
| max_upload_size | |
| id | 1658567 |
| size | 4,250,986 |
r2-data2 is a web-based SQL query tool, data browser, and visualization platform built with a Rust (Axum) backend and a React (TypeScript/Vite) frontend. The whole code (95%) is built by AI agent. As a human, I only generate the initial design and the instructions for the AI agent. There are several issues AI agent (using gemini-2.5-pro) keep failing:
import { TableColumn, DataTable } from '@sqlrooms/duckdb';. It kept using the wrong package, and I have to manually fix it.This is still imperfect, but it's working and it just spent me 2-3 nights to build it (about 10 hours which I'm still doing several more projects/explorations while waiting for the AI agent to finish). So it is pretty amazing, especially for someone like me who knows only a little bit about react frontend development.

sqlx)./api/schema) to fetch detailed database, table, and column information (including constraints like PK/FK), with caching (moka)./api/execute-query) to run SQL queries against the selected database.config crate for managing database connection strings and other settings (config/default.toml).rust-embed.tracing for request and application logging.resizable-panels.@sqlrooms/sql-editor for a rich editing experience.sql-formatter.SELECT query results in a sortable, paginated data table (@tanstack/react-table).Recharts library for rendering.config/default.toml to add your database connection strings under the [[databases]] array.Build & Run Backend (Serves UI):
# Navigate to the project root directory
make build
make run
This will compile the Rust backend and the embedded frontend UI. The application will typically be available at http://localhost:3111 (or as configured).
Frontend Development (Optional): If you want to work on the frontend with hot-reloading:
cd ui
yarn install # or npm install
yarn dev # or npm run dev
This will start the Vite development server (usually on port 5173). You will still need the backend running (cargo run) for the API calls to work.
Note: To create a new production build of the UI for embedding, run yarn build inside the ui directory before running cargo run.
This project is distributed under the terms of MIT.
See LICENSE.md for details.
Copyright 2025 Tyr Chen