Skip to content

Commit 9121a96

Browse files
keydunovArtem Keydunov
andauthored
examples: ksqlDB and Cube demo (cube-js#5306)
* examples: ksqlDB and Cube demo * Add architecture image * Updated readme * Misc * Clean up Co-authored-by: Artem Keydunov <artemkeydunov@Artems-MacBook-Pro-2.local>
1 parent 363b42d commit 9121a96

25 files changed

+17511
-0
lines changed

examples/ksql/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.env

examples/ksql/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Real-Time Dashboard
2+
3+
A real-time demo dashboard with Kafka, ksqlDB and Cube.

examples/ksql/cube.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Cube.js configuration options: https://cube.dev/docs/config
2+
3+
// NOTE: third-party dependencies and the use of require(...) are disabled for
4+
// CubeCloud users by default. Please contact support if you need them
5+
// enabled for your account. You are still allowed to require
6+
// @cubejs-backend/*-driver packages.
7+
8+
module.exports = {
9+
processSubscriptionsInterval: 1000,
10+
orchestratorOptions: {
11+
queryCacheOptions: {
12+
refreshKeyRenewalThreshold: 1,
13+
}
14+
}
15+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
REACT_APP_CUBEJS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NjMyMTI3MTR9.BkZYRriafmMYFArCqREHmARFq6Aq8A8NKqtn9zmSViY
2+
REACT_APP_API_URL=wss://rubber-goldrun.aws-us-west-2.cubecloudapp.dev/cubejs-api/v1
3+
REACT_APP_COLLECT_URL=https://real-time-dashboard.gcp-us-central1.cubecloudapp.dev/collect
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
/build
3+
4+
# dependencies
5+
/node_modules
6+
/.pnp
7+
.pnp.js
8+
9+
# testing
10+
/coverage
11+
12+
# misc
13+
.DS_Store
14+
.env
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"siteId": "a8eadf81-20fa-4481-873f-e4044293ab15"
3+
}

examples/ksql/dashboard-app/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Real-Time Dashboard
2+
3+
A real-time demo dashboard with Kafka, ksqlDB and Cube.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "dashboard-app",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@segment/analytics-next": "^1.43.0",
7+
"@cube-dev/example-wrapper": "^1.1.9",
8+
"@cubejs-client/core": "^0.30.64",
9+
"@cubejs-client/react": "^0.30.69",
10+
"@cubejs-client/ws-transport": "^0.30.64",
11+
"antd": "^3.24.3",
12+
"chart.js": "^2.9.1",
13+
"component-cookie": "^1.1.4",
14+
"fetch": "^1.1.0",
15+
"moment": "^2.24.0",
16+
"prop-types": "^15.7.2",
17+
"rc-animate": "^2.10.1",
18+
"react-chartjs-2": "^2.8.0",
19+
"react-scripts": "5.0.1",
20+
"uuid": "^3.3.3",
21+
"yarn": "^1.22.19",
22+
"react": "^18.2.0",
23+
"react-dom": "^18.2.0"
24+
},
25+
"scripts": {
26+
"start": "cross-env NODE_ENV=development SKIP_PREFLIGHT_CHECK=true react-scripts start",
27+
"build": "cross-env SKIP_PREFLIGHT_CHECK=true react-scripts build",
28+
"test": "react-scripts test",
29+
"eject": "react-scripts eject",
30+
"preview": "cross-env NODE_ENV=production npm run build && netlify deploy",
31+
"deploy": "npm run preview -- --prod"
32+
},
33+
"eslintConfig": {
34+
"extends": "react-app"
35+
},
36+
"browserslist": {
37+
"production": [
38+
">0.2%",
39+
"not dead",
40+
"not op_mini all"
41+
],
42+
"development": [
43+
"last 1 chrome version",
44+
"last 1 firefox version",
45+
"last 1 safari version"
46+
]
47+
},
48+
"devDependencies": {
49+
"cross-env": "^7.0.3"
50+
}
51+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="The example of a real-time dashboard created with Cube, MongoDB, and React."
11+
/>
12+
<title>React App</title>
13+
</head>
14+
<body>
15+
<noscript>You need to enable JavaScript to run this app.</noscript>
16+
<div id="root"></div>
17+
</body>
18+
</html>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *

0 commit comments

Comments
 (0)