mirror of https://github.com/buster-so/buster.git
gateway model fix |
||
---|---|---|
.claude | ||
.cursor/rules | ||
.github | ||
.vscode | ||
actions | ||
apps | ||
assets | ||
ee | ||
packages | ||
scripts | ||
.DS_Store | ||
.dockerignore | ||
.env.example | ||
.gitignore | ||
.pnpmrc | ||
.release-please-config.json | ||
AGENTS.md | ||
CLAUDE.md | ||
LICENSE | ||
Makefile | ||
README.md | ||
SECURITY.md | ||
biome.json | ||
biome2.json | ||
bunfig.toml | ||
docker-compose.yml | ||
package.json | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
tsconfig.json | ||
turbo.json | ||
vitest.config.ts |
README.md
Buster
A modern data analytics platform that enables teams to interact with their data through AI-powered conversations, beautiful dashboards, and automated insights.
Quick Start
Prerequisites
- Node.js 20+
- pnpm 9+
- PostgreSQL (via Supabase local or cloud)
Setup
- Clone the repository
git clone https://github.com/buster-so/buster.git
cd buster
- Install dependencies
pnpm install
- Set up environment variables
cp .env.example .env
# Edit .env with your configuration
- Start development servers
turbo dev
The application will be available at:
- Web app: http://localhost:3000
- API server: http://localhost:8080
Architecture Overview
Buster follows a modular monorepo architecture where:
- Packages are standalone building blocks containing reusable logic and types
- Apps assemble packages to create user-facing applications
Apps
App | Description | Stack |
---|---|---|
@buster-app/web |
Main web application | TanStack Start, React |
@buster-app/server |
API server | Node.js, Hono |
@buster-app/trigger |
Background job processor | Trigger.dev v3 |
@buster-app/cli |
Command-line interface | TypeScript, Bun |
@buster-app/electric-server |
Real-time sync server | Electric SQL |
@buster-app/api |
Legacy API (being migrated) | Rust (deprecated) |
Core Packages
Package | Purpose |
---|---|
@buster/database |
Database schema, migrations, and ALL query logic (Drizzle ORM) |
@buster/server-shared |
API contracts, request/response types |
@buster/data-source |
Customer database connectors (PostgreSQL, MySQL, BigQuery, Snowflake) |
@buster/ai |
AI agents and workflows (AI SDK v5) |
@buster/access-controls |
Permission and security logic |
Development
Commands
All development commands use Turbo for optimal caching and parallelization:
# Building
turbo build # Build entire monorepo
turbo build --filter=@buster/ai # Build specific package
# Linting
turbo lint # Lint entire monorepo
turbo lint --filter=@buster-app/web # Lint specific app
# Testing
turbo test:unit # Run all unit tests
turbo test:unit --filter=@buster/database # Test specific package
# Development
turbo dev # Start all dev servers
turbo dev --filter=@buster-app/web # Start specific app
Development Workflow
- Write tests first - Follow test-driven development
- Check types - Run
turbo build
to ensure type safety - Lint code - Run
turbo lint
to maintain code quality - Run tests - Run
turbo test:unit
before committing
Testing
Tests are colocated with source files:
file.test.ts
- Unit testsfile.int.test.ts
- Integration tests
turbo test:unit # Fast, isolated unit tests
turbo test:integration # Tests with external dependencies
Database
For local development with Supabase:
# Start Supabase locally
npx supabase start
# Run migrations
turbo db:migrate
# Access database
psql "postgresql://postgres:postgres@127.0.0.1:54322/postgres"
Contributing
Code Style
We follow functional programming principles:
- Pure functions over classes
- Immutable data structures
- Type-safe with Zod schemas
- Modular, composable code
Pull Request Process
- Create a feature branch
- Write tests for new functionality
- Ensure
turbo build lint test:unit
passes - Submit PR with clear description
- Address review feedback
Documentation
- Each package/app has its own README.md
- CLAUDE.md files provide AI assistant guidance
- Keep documentation close to code
Project Structure
buster/
├── apps/ # User-facing applications
│ ├── web/ # Main web application
│ ├── server/ # API server
│ ├── trigger/ # Background jobs
│ └── cli/ # Command-line tools
├── packages/ # Reusable modules
│ ├── database/ # Database layer
│ ├── server-shared/ # API contracts
│ ├── data-source/ # Data connectors
│ └── ai/ # AI capabilities
├── turbo.json # Turbo configuration
├── package.json # Root package.json
└── .env.example # Environment template
Tech Stack
- Frontend: React, TanStack Start, TailwindCSS
- Backend: Node.js, Hono, TypeScript
- Database: PostgreSQL (Supabase), Drizzle ORM
- AI: OpenAI, Anthropic, AI SDK v5
- Background Jobs: Trigger.dev v3
- Testing: Vitest
- Build: Turborepo, pnpm
Migration Notice
Note: The Rust API (apps/api
) is legacy code being migrated to TypeScript. All new development should use the TypeScript stack in apps/server
.
License
[License information]
Support
[Support channels and documentation links]