-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.tsx
More file actions
267 lines (251 loc) · 9.95 KB
/
index.tsx
File metadata and controls
267 lines (251 loc) · 9.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
import { Button, Card } from "@databricks/appkit-ui/react";
import {
createFileRoute,
retainSearchParams,
useNavigate,
} from "@tanstack/react-router";
import { ThemeSelector } from "@/components/theme-selector";
export const Route = createFileRoute("/")({
component: IndexRoute,
search: {
middlewares: [retainSearchParams(true)],
},
});
function IndexRoute() {
const navigate = useNavigate();
return (
<div className="min-h-screen bg-background">
<div className="absolute top-4 right-4">
<ThemeSelector />
</div>
<div className="max-w-6xl mx-auto px-6 py-20">
<div className="text-center mb-16">
<h1 className="text-5xl font-bold text-foreground mb-4">
AppKit Playground
</h1>
<p className="text-xl text-muted-foreground max-w-2xl mx-auto">
Explore the capabilities of the AppKit with interactive examples and
demos
</p>
</div>
<div className="grid md:grid-cols-2 gap-6 max-w-4xl mx-auto mb-16">
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Analytics Dashboard
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Explore real-time analytics with query execution, data
visualization, and interactive components using the Design
System.
</p>
<Button
onClick={() => navigate({ to: "/analytics" })}
className="w-full"
>
Explore real-time analytics
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Arrow Analytics Dashboard
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Explore real-time analytics with query execution, data
visualization, and interactive components using Apache Arrow
streaming.
</p>
<Button
onClick={() => navigate({ to: "/arrow-analytics" })}
className="w-full"
>
Explore real-time analytics
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Stream Reconnection
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Explore Server-Sent Events (SSE) stream reconnection with
automatic Last-Event-ID tracking and resilient connection
handling.
</p>
<Button
onClick={() => navigate({ to: "/reconnect" })}
className="w-full"
>
View Reconnect Demo
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Data Visualization
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Explore powerful and customizable chart components from the Apps
SDK.
</p>
<Button
onClick={() => navigate({ to: "/data-visualization" })}
className="w-full"
>
Explore data visualization
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Telemetry
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Explore OpenTelemetry-compatible tracing and metrics examples
with interactive demos showcasing custom observability patterns.
</p>
<Button
onClick={() => navigate({ to: "/telemetry" })}
className="w-full"
>
Try Telemetry Examples
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
File Browser
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Browse, preview, and download files from Databricks Volumes
using the Files plugin and Unity Catalog Files API.
</p>
<Button
onClick={() => navigate({ to: "/files" })}
className="w-full"
>
Browse Files
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
SQL Helpers
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Type-safe parameter helpers for Databricks SQL queries. Test
each helper interactively and see the generated parameter
objects.
</p>
<Button
onClick={() => navigate({ to: "/sql-helpers" })}
className="w-full"
>
Try SQL Helpers
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Type-Safe SQL
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Generate TypeScript types from SQL files at build time. Full
IntelliSense for query names, parameters, and results.
</p>
<Button
onClick={() => navigate({ to: "/type-safety" })}
className="w-full"
>
Explore Type Safety
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Genie Chat
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Ask natural language questions about your data using AI/BI
Genie. Features SSE streaming, markdown rendering, and
conversation persistence.
</p>
<Button
onClick={() => navigate({ to: "/genie" })}
className="w-full"
>
Try Genie Chat
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Lakebase Examples
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Four approaches to PostgreSQL database integration with
Databricks Lakebase: Raw driver, Drizzle ORM, TypeORM, and
Sequelize with OAuth token refresh.
</p>
<Button
onClick={() => navigate({ to: "/lakebase" })}
className="w-full"
>
Explore Lakebase Integration
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Lakeflow Jobs
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Trigger and monitor Databricks Lakeflow Jobs. View run history,
stream live status updates, and cancel in-flight runs.
</p>
<Button
onClick={() => navigate({ to: "/jobs" })}
className="w-full"
>
Manage Jobs
</Button>
</div>
</Card>
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
<div className="flex flex-col h-full">
<h3 className="text-2xl font-semibold text-foreground mb-3">
Model Serving
</h3>
<p className="text-muted-foreground mb-6 flex-grow">
Chat with a Databricks Model Serving endpoint using streaming
completions with real-time SSE responses.
</p>
<Button
onClick={() => navigate({ to: "/serving" })}
className="w-full"
>
Try Model Serving
</Button>
</div>
</Card>
</div>
<div className="text-center pt-12 border-t border-border">
<p className="text-sm text-muted-foreground">
built by databricks using appkit
</p>
</div>
</div>
</div>
);
}