{"owner":"cube-js","repo":"cube","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Repository Overview\n\nCube is a semantic layer for building data applications. This is a monorepo containing the complete Cube ecosystem including:\n- Cube backend server and core components\n- Client libraries for JavaScript/React/Vue/Angular\n- Database drivers for various data sources\n- Documentation site\n- Rust components (CubeSQL, CubeStore)\n\n## Development Commands\n\n**Note: This project uses Yarn as the package manager.**\n\n### Core Build Commands\n```bash\n# Build all packages\nyarn build\n\n# Run TypeScript compilation across all packages\nyarn tsc\n\n# Watch mode for TypeScript compilation\nyarn tsc:watch\n\n# Clean build artifacts\nyarn clean\n\n# Run linting across all packages\nyarn lint\n\n# Fix linting issues\nyarn lint:fix\n\n# Lint package.json files\nyarn lint:npm\n```\n\n### Testing Commands\n```bash\n# Run tests (most packages have individual test commands)\nyarn test\n\n# Test individual packages\ncd packages/cubejs-[package-name]\nyarn test\n```\n\n### Documentation Development\n\n**IMPORTANT: `/docs-mintlify` is the active documentation site. `/docs` is the legacy\ndocs site and is deprecated — do NOT add or edit content there.** When asked to write or\nupdate documentation, work in `/docs-mintlify` unless the user explicitly says otherwise.\n\n```bash\ncd docs-mintlify\nyarn dev    # Start the Mintlify dev server\n```\n\n- Content is authored as `.mdx` under topic directories (e.g. `admin/ai/`, `docs/explore-analyze/`).\n- Frontmatter uses `title` and `description` keys.\n- Navigation is registered in `docs-mintlify/docs.json` (pages must be added to the\n  relevant `group` to appear in the sidebar).\n- Use Mintlify components: `<Note>`, `<Warning>`, `<Info>`, `<Tip>`, `<Steps>`/`<Step>`,\n  `<CardGroup>`/`<Card>`. Internal links are root-relative (e.g. `/admin/ai/rules`).\n- Keep docs concise — most changes are small, surgical edits to existing pages, not new\n  pages or walls of text. Prefer editing an existing page over creating a new one.\n- See `docs-mintlify/CLAUDE.md` for full conventions.\n\n## Architecture Overview\n\n### Monorepo Structure\n- **`/packages`**: All JavaScript/TypeScript packages managed by Lerna\n  - Core packages: `cubejs-server-core`, `cubejs-schema-compiler`, `cubejs-query-orchestrator` \n  - Client libraries: `cubejs-client-core`, `cubejs-client-react`, etc.\n  - Database drivers: `cubejs-postgres-driver`, `cubejs-bigquery-driver`, etc.\n  - API layer: `cubejs-api-gateway`\n- **`/rust`**: Rust components including CubeSQL (SQL interface) and CubeStore (distributed storage)\n- **`/docs-mintlify`**: Mintlify documentation site — **the active docs site** (author docs here)\n- **`/docs`**: Legacy Next.js/Nextra documentation site — **deprecated**, do not edit\n- **`/examples`**: Example implementations and recipes\n\n### Key Components\n1. **Schema Compiler**: Compiles data models into executable queries\n2. **Query Orchestrator**: Manages query execution, caching, and pre-aggregations\n3. **API Gateway**: Provides REST, GraphQL, and SQL APIs\n4. **CubeSQL**: Postgres-compatible SQL interface (Rust)\n5. **CubeStore**: Distributed OLAP storage engine (Rust)\n6. **Tesseract**: Native SQL planner (Rust) located in `/rust/cube/cubesqlplanner` - the default planner; set `CUBEJS_TESSERACT_SQL_PLANNER=false` to fall back to the deprecated legacy planner. Tesseract pre-aggregation planning follows this flag and cannot be toggled independently\n\n### Package Management\n- Uses Yarn workspaces with Lerna for package management\n- TypeScript compilation is coordinated across packages\n- Jest for unit testing with package-specific configurations\n\n## Testing Approach\n\n### Unit Tests\n- Most packages have Jest-based unit tests in `/test` directories\n- TypeScript packages use `jest.config.js` with TypeScript compilation\n- Snapshot testing for SQL compilation and query planning\n\n### Integration Tests\n- Driver-specific integration tests in `/packages/cubejs-testing-drivers`\n- End-to-end tests in `/packages/cubejs-testing`\n- Docker-based testing environments for database drivers\n\n### Test Commands\n```bash\n# Individual package testing\ncd packages/[package-name]\nyarn test\n\n# Driver integration tests (requires Docker)\ncd packages/cubejs-testing-drivers\nyarn test\n```\n\n## Development Workflow\n\n1. **Making Changes**: Work in individual packages, changes are coordinated via Lerna\n2. **Building**: Use `yarn tsc` to compile TypeScript across all packages\n3. **Testing**: Run relevant tests for modified packages\n4. **Linting**: Ensure code passes `yarn lint` before committing\n\n## Git\n\nUse conventional commits with these prefixes:\n- `feat:` — new features\n- `fix:` — bug fixes\n- `docs:` — documentation changes\n- `refactor:` — code refactoring\n\nInclude scope in parentheses when applicable, e.g., `fix(tesseract):` or `feat(databricks-jdbc-driver):`.\n\n## Common File Patterns\n\n- `*.test.ts/js`: Jest unit tests\n- `jest.config.js`: Jest configuration per package\n- `tsconfig.json`: TypeScript configuration (inherits from root)\n- `CHANGELOG.md`: Per-package changelogs maintained by Lerna\n- `src/`: Source code directory\n- `dist/`: Compiled output (not committed)\n\n## Important Notes\n\n- Documentation lives in `/docs-mintlify` (active, Mintlify). `/docs` is the legacy docs\n  site and is deprecated — do not add or edit content there. See `docs-mintlify/CLAUDE.md`.\n- The main Cube application development happens in `/packages`\n- For data model changes, focus on `cubejs-schema-compiler` package\n- For query execution changes, focus on `cubejs-query-orchestrator` package\n- Database connectivity is handled by individual driver packages\n\n## Key Dependencies\n\n- **Lerna**: Monorepo management and publishing\n- **TypeScript**: Primary language for most packages\n- **Jest**: Testing framework\n- **Rollup**: Bundling for client libraries\n- **Docker**: Testing environments for database drivers"}}