Skip to content

Architecture ​

browser ──► cubebi-web  (Node/Express, :18450)
              ├─ React app: Explore · Charts · Dashboards · Data model
              ├─ /api/*                        charts & dashboards ──► Postgres db "bi_app"
              └─ /cubejs-api/v1/{load,meta,sql,dry-run}
                   proxied with a server-signed JWT ──► cubebi-cube (Cube Core, :4000)
                                                          ├─ Postgres db "warehouse" (read-only role)
                                                          └─ cubebi-cubestore (pre-aggregations)

Components ​

ServiceImageRole
cubebi-dbpostgres:16-alpineTwo databases. warehouse holds the business data; Cube reads it as cube_reader, a read-only role. bi_app holds the app's metadata: charts, dashboards, dashboard_items.
cubebi-cubecubejs/cube:v1.8.35Semantic layer in production mode. Compiles cube/model/, plans SQL, serves REST, runs the refresh worker.
cubebi-cubestorecubejs/cubestore:v1.8.35Stores and serves pre-aggregation rollups.
cubebi-webbuilt from web/Express server plus the React app.

Request flow ​

  1. The browser builds a Cube query: measures, dimensions, time dimension, filters.
  2. cubebi-web forwards it to Cube with a JWT it signs itself. The API secret never reaches the browser, and the proxy only allows load, meta, sql and dry-run.
  3. Cube compiles the query against the model. It answers from a Cube Store rollup when one matches, and otherwise generates SQL for Postgres.
  4. The web app renders the result with ECharts. Every chart also has a table view.

Web app ​

  • Server (web/server/index.js): Express 5, pg, jsonwebtoken. Provides the REST API for charts and dashboards, the Cube proxy, and static hosting. index.html is never cached; hashed assets are cached permanently.
  • Client (web/client/src): React 19 with Vite, and @cubejs-client/core, which retries Cube's "Continue wait" responses for you. Pages use hash routing.
  • Charts: a palette checked for colour-blindness and contrast, in light and dark modes. Each series keeps the same colour wherever it appears, and long series lists are capped at 8.