Skip to content

The Open Standard for Generative UI

docs: serve the F1 dashboard and trip planner demos under /demo (#1397)

AB78e762b45a99
diff --git a/docs/app/sitemap.ts b/docs/app/sitemap.ts
index f26504e5b..196c287d3 100644
--- a/docs/app/sitemap.ts
+++ b/docs/app/sitemap.ts
@@ -8,6 +8,8 @@ const STATIC_PATHS = [
"/lab",
"/integrations",
"/chat",
+ "/demo/f1-dashboard",
+ "/demo/trip-planner",
"/blog",
"/benchmarks",
"/benchmarks/language",
diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index 07e19d37a..b0ded21f8 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -6,6 +6,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
const withMDX = createMDX();
+// Demos deployed as their own Vercel projects, served under openui.com/demo/<path>. Each app sets
+// NEXT_PUBLIC_BASE_PATH to the same path, so its pages, assets and API routes all live under it.
+const proxiedDemos = {
+ "f1-dashboard": "https://openui-f1-dashboard.vercel.app",
+ "trip-planner": "https://openui-trip-planner.vercel.app",
+};
+
/** @type {import('next').NextConfig} */
const config = {
serverExternalPackages: ["@takumi-rs/image-response"],
@@ -372,6 +379,10 @@ const config = {
},
async rewrites() {
return [
+ ...Object.entries(proxiedDemos).flatMap(([path, origin]) => [
+ { source: `/demo/${path}`, destination: `${origin}/demo/${path}` },
+ { source: `/demo/${path}/:rest*`, destination: `${origin}/demo/${path}/:rest*` },
+ ]),
{
source: "/docs/:path*.mdx",
destination: "/llms.mdx/docs/:path*",