CLAUDE.md in cube-js/cube runs 781 words across 30 headings.
📊 Cube Core is open-source semantic layer for AI, BI and embedded analytics
Covers
11 of the 20 section tags
In the order a file is read inHeadings
30 headings, in the order the file writes them
01CLAUDE.md
02Repository Overview
03Development Commands
04Core Build Commands
05Build all packages
06Run TypeScript compilation across all packages
07Watch mode for TypeScript compilation
08Clean build artifacts
09Run linting across all packages
10Fix linting issues
11Lint package.json files
12Testing Commands
13Run tests (most packages have individual test commands)
14Test individual packages
15Documentation Development
16Architecture Overview
17Monorepo Structure
18Key Components
19Package Management
20Testing Approach
21Unit Tests
22Integration Tests
23Test Commands
24Individual package testing
25Driver integration tests (requires Docker)
26Development Workflow
27Git
28Common File Patterns
29Important Notes
30Key Dependencies
Commands
10 commands this file writes down
Extracted from the file, verbatimyarn build
yarn tsc
yarn tsc:watch
yarn clean
yarn lint
yarn lint:fix
yarn lint:npm
yarn test
yarn dev
jest.config.js
The file
CLAUDE.md
First 160 of 163 lines1# CLAUDE.md
2
3This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
5## Repository Overview
6
7Cube is a semantic layer for building data applications. This is a monorepo containing the complete Cube ecosystem including:
8- Cube backend server and core components
9- Client libraries for JavaScript/React/Vue/Angular
10- Database drivers for various data sources
11- Documentation site
12- Rust components (CubeSQL, CubeStore)
13
14## Development Commands
15
16**Note: This project uses Yarn as the package manager.**
17
18### Core Build Commands
19```bash
20# Build all packages
21yarn build
22
23# Run TypeScript compilation across all packages
24yarn tsc
25
26# Watch mode for TypeScript compilation
27yarn tsc:watch
28
29# Clean build artifacts
30yarn clean
31
32# Run linting across all packages
33yarn lint
34
35# Fix linting issues
36yarn lint:fix
37
38# Lint package.json files
39yarn lint:npm
40```
41
42### Testing Commands
43```bash
44# Run tests (most packages have individual test commands)
45yarn test
46
47# Test individual packages
48cd packages/cubejs-[package-name]
49yarn test
50```
51
52### Documentation Development
53
54**IMPORTANT: `/docs-mintlify` is the active documentation site. `/docs` is the legacy
55docs site and is deprecated — do NOT add or edit content there.** When asked to write or
56update documentation, work in `/docs-mintlify` unless the user explicitly says otherwise.
57
58```bash
59cd docs-mintlify
60yarn dev # Start the Mintlify dev server
61```
62
63- Content is authored as `.mdx` under topic directories (e.g. `admin/ai/`, `docs/explore-analyze/`).
64- Frontmatter uses `title` and `description` keys.
65- Navigation is registered in `docs-mintlify/docs.json` (pages must be added to the
66 relevant `group` to appear in the sidebar).
67- Use Mintlify components: `<Note>`, `<Warning>`, `<Info>`, `<Tip>`, `<Steps>`/`<Step>`,
68 `<CardGroup>`/`<Card>`. Internal links are root-relative (e.g. `/admin/ai/rules`).
69- Keep docs concise — most changes are small, surgical edits to existing pages, not new
70 pages or walls of text. Prefer editing an existing page over creating a new one.
71- See `docs-mintlify/CLAUDE.md` for full conventions.
72
73## Architecture Overview
74
75### Monorepo Structure
76- **`/packages`**: All JavaScript/TypeScript packages managed by Lerna
77 - Core packages: `cubejs-server-core`, `cubejs-schema-compiler`, `cubejs-query-orchestrator`
78 - Client libraries: `cubejs-client-core`, `cubejs-client-react`, etc.
79 - Database drivers: `cubejs-postgres-driver`, `cubejs-bigquery-driver`, etc.
80 - API layer: `cubejs-api-gateway`
81- **`/rust`**: Rust components including CubeSQL (SQL interface) and CubeStore (distributed storage)
82- **`/docs-mintlify`**: Mintlify documentation site — **the active docs site** (author docs here)
83- **`/docs`**: Legacy Next.js/Nextra documentation site — **deprecated**, do not edit
84- **`/examples`**: Example implementations and recipes
85
86### Key Components
871. **Schema Compiler**: Compiles data models into executable queries
882. **Query Orchestrator**: Manages query execution, caching, and pre-aggregations
893. **API Gateway**: Provides REST, GraphQL, and SQL APIs
904. **CubeSQL**: Postgres-compatible SQL interface (Rust)
915. **CubeStore**: Distributed OLAP storage engine (Rust)
926. **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
93
94### Package Management
95- Uses Yarn workspaces with Lerna for package management
96- TypeScript compilation is coordinated across packages
97- Jest for unit testing with package-specific configurations
98
99## Testing Approach
100
101### Unit Tests
102- Most packages have Jest-based unit tests in `/test` directories
103- TypeScript packages use `jest.config.js` with TypeScript compilation
104- Snapshot testing for SQL compilation and query planning
105
106### Integration Tests
107- Driver-specific integration tests in `/packages/cubejs-testing-drivers`
108- End-to-end tests in `/packages/cubejs-testing`
109- Docker-based testing environments for database drivers
110
111### Test Commands
112```bash
113# Individual package testing
114cd packages/[package-name]
115yarn test
116
117# Driver integration tests (requires Docker)
118cd packages/cubejs-testing-drivers
119yarn test
120```
121
122## Development Workflow
123
1241. **Making Changes**: Work in individual packages, changes are coordinated via Lerna
1252. **Building**: Use `yarn tsc` to compile TypeScript across all packages
1263. **Testing**: Run relevant tests for modified packages
1274. **Linting**: Ensure code passes `yarn lint` before committing
128
129## Git
130
131Use conventional commits with these prefixes:
132- `feat:` — new features
133- `fix:` — bug fixes
134- `docs:` — documentation changes
135- `refactor:` — code refactoring
136
137Include scope in parentheses when applicable, e.g., `fix(tesseract):` or `feat(databricks-jdbc-driver):`.
138
139## Common File Patterns
140
141- `*.test.ts/js`: Jest unit tests
142- `jest.config.js`: Jest configuration per package
143- `tsconfig.json`: TypeScript configuration (inherits from root)
144- `CHANGELOG.md`: Per-package changelogs maintained by Lerna
145- `src/`: Source code directory
146- `dist/`: Compiled output (not committed)
147
148## Important Notes
149
150- Documentation lives in `/docs-mintlify` (active, Mintlify). `/docs` is the legacy docs
151 site and is deprecated — do not add or edit content there. See `docs-mintlify/CLAUDE.md`.
152- The main Cube application development happens in `/packages`
153- For data model changes, focus on `cubejs-schema-compiler` package
154- For query execution changes, focus on `cubejs-query-orchestrator` package
155- Database connectivity is handled by individual driver packages
156
157## Key Dependencies
158
159- **Lerna**: Monorepo management and publishing
160- **TypeScript**: Primary language for most packages
3 more lines are in the file. Read the raw file.
The rest of the repository
cube-js/cube ships 9 other instruction files
.cursor/rules/docs-example-data-model.mdc.cursor/rules/mintlify-mdx-gotchas.mdc.cursor/rules/static-assets.mdc.cursor/rules/writing-documentation.mdcdocs-mintlify/CLAUDE.mdpackages/cubejs-backend-shared/CLAUDE.mdpackages/cubejs-query-orchestrator/CLAUDE.mdrust/cubesql/CLAUDE.mdrust/cubestore/CLAUDE.md
A row that is not a link is a file this repository ships that this app did not freeze a sheet for. It is listed because the corpus knows it exists, and it is not linked because there is nothing here to open.
This listing
Whoever runs cube-js/cube can claim it
This is yours? Claim this config and we will write to you when the measurement moves. The check is one token placed where only you can place it, and there is no account and no password.