Build AI whiteboards and operating dashboards by asking questions on an infinite canvas.
AI Native Dashboard is an OpenUI-powered prototype for creating editable operating dashboards from natural language. Instead of starting with a chart builder, the app starts with a canvas of whiteboards, notes, and movable widgets. Press /, type or dictate your prompt, and the app generates a dashboard widget in that spot.
The demo focuses on teams that need fast operating visibility: founder metrics, engineering health, sales pipeline, ops workflows, model spend, token waste, retries, agent quality, and runway impact.
- Natural-language widget generation from anywhere on the canvas
- Voice prompts via mic or
Cmd+M/Ctrl+M(Groq speech-to-text) - Prebuilt Founder, Engineering, Sales, and Ops whiteboard templates
- AI-assisted whiteboard creation from a short operating brief
- Multiple personal whiteboards with local persistence
- Canvas notes for context, assumptions, priorities, and follow-ups
- OpenUI Lang rendering through a local React component library
- Streaming generation flow with preview data followed by generated UI
- Drag, resize, retry, delete, zoom, pan, and theme controls
- AI operations dashboard examples for spend, token waste, model usage, runway, and workflow quality
- Groq-first server routes with optional multi-key failover for deployed demos
Watch the demo video: Loom walkthrough
The current demo uses mock/demo data for UI prototyping. It does not connect to live business systems yet.
There are two generation paths:
- Create with AI posts an operating brief to
/api/generate-board. The server plans a new board with 4-8 widget prompts and optional notes. If no API key is configured, the app falls back to a deterministic local board plan. - Widget generation posts
{ prompt }to/api/generate-widget.
Each generated widget streams through two stages:
- Generate realistic preview data for the requested dashboard concept.
- Generate compact OpenUI Lang that renders the widget with the local component library.
Whiteboards, notes, widgets, the active board, and theme preference are persisted in browser localStorage.
Generated values are preview data for UI prototyping. They are not sourced from real business systems.
show our burn rate and runwaycompare this month's spend with last monthshow AI spend and token waste by workflowbreak AI spend down by modelshow wasted spend from failed runs, retries, and oversized contextforecast runway if AI spend grows 40% next month
The prototype becomes more valuable when it moves from generated preview data to real operating data. High-leverage next steps:
- Connect real AI-layer sources such as OpenAI, Anthropic, Groq, Langfuse, Helicone, Vercel AI SDK logs, or internal agent traces.
- Define a canonical AI operations event schema for model calls, workflow runs, retries, failures, evals, human escalations, and cost.
- Add opinionated AI-native metrics: cost per workflow, retry waste, failed-run rate, context efficiency, model ROI, human escalation rate, and runway impact.
- Let users ask questions that combine AI activity with business data from Stripe, QuickBooks, GitHub, Linear, or CRM systems.
- Move from passive widgets to recommended actions, such as changing a model, capping context, adding an eval, or routing failed runs to a human.
- Next.js 16 App Router
- React 19
- TypeScript
- Tailwind CSS 4
- Groq SDK for primary generation and the OpenAI SDK for OpenRouter-compatible backup generation
- OpenUI Lang for generated widget markup
- Recharts for generated chart components
- Zod for runtime schemas
Prerequisites:
- Node.js 20+
- pnpm
- A Groq API key for primary generation
- An OpenRouter API key and explicit OpenRouter model slug for backup generation
Install dependencies:
pnpm installCreate .env.local with server-side provider keys:
# Groq is the primary LLM provider for all runtime widget and board generation.
GROQ_API_KEY=your_groq_api_key
# Optional Groq key pool for deployed demos.
# Keep these server-side only. The app rotates to another key when a key returns 429.
GROQ_API_KEYS=groq_key_1,groq_key_2,groq_key_3
# You can also provide numbered Groq keys.
GROQ_API_KEY_1=groq_key_1
GROQ_API_KEY_2=groq_key_2
# OpenRouter is the backup LLM provider when Groq fails before streaming output.
OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_MODEL=provider/model-slugOptional model overrides:
OPENROUTER_MOCK_DATA_MODEL=provider/model-slug
OPENROUTER_UI_MODEL=provider/model-slug
OPENROUTER_BOARD_MODEL=provider/model-slug
OPENROUTER_SITE_URL=https://your-app.example
OPENROUTER_APP_TITLE=New Dashboard
GROQ_MOCK_DATA_MODEL=openai/gpt-oss-20b
GROQ_UI_MODEL=llama-3.3-70b-versatile
GROQ_BOARD_MODEL=openai/gpt-oss-20b
GROQ_STT_MODEL=whisper-large-v3-turbo
GROQ_STT_LANGUAGE=en
# Browser analytics (safe to expose to the client).
NEXT_PUBLIC_AMPLITUDE_API_KEY=your_amplitude_api_keyDo not expose Groq or OpenRouter keys in the browser or commit .env files.
Run the development server:
pnpm devOpen http://localhost:3000.
Vercel is the simplest deployment target because the app uses Next.js server routes at /api/generate-board and /api/generate-widget.
Set these environment variables in Vercel:
GROQ_API_KEY=your_groq_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_MODEL=provider/model-slugFor showcase demos, you can provide a small server-side key pool. The app rotates to another key when Groq returns a rate-limit response:
GROQ_API_KEYS=groq_key_1,groq_key_2,groq_key_3
# or:
GROQ_API_KEY_1=groq_key_1
GROQ_API_KEY_2=groq_key_2Do not expose provider keys in the browser or commit .env files.
- Switch between the prebuilt Founder, Engineering, Sales, and Ops templates from the whiteboard tabs.
- Use
Create with AIto generate a new editable whiteboard from a purpose, audience, tasks, metrics, source context, and notes. - Use the
+control to create a blank personal whiteboard. - Move the pointer over the canvas and press
/to open the command input at that location. - Use the mic button or
Cmd+M/Ctrl+Min the command input to dictate a prompt with Groq speech-to-text. - Enter a prompt such as
show our burn rate and runwayorshow AI spend and token waste by workflow. - Press
nto create a note at the pointer location. - Drag a widget by its header.
- Resize a widget from the bottom-right handle.
- Drag, edit, resize, or delete notes.
- Use the
+and-controls, keyboard shortcuts, or trackpad pinch/zoom gestures to adjust zoom. - Toggle between light and dark theme from the canvas controls.
- Retry failed widgets from their header control.
Built and maintained by Jai Bhasin.
Contact: bhasinjai@gmail.com
Apache License 2.0. See LICENSE.
pnpm devGenerates the OpenUI prompt bundle and starts the Next.js dev server.
pnpm buildGenerates the OpenUI prompt bundle and creates a production build.
pnpm startStarts the production server after a successful build.
pnpm lintRuns ESLint.
pnpm generate:openui-promptRegenerates src/generated/openui-dashboard-prompt.txt from src/openui/dashboard-prompt-library.ts.
pnpm generate:engineering-boardRegenerates the Engineering prebuilt board at src/generated/board-templates/engineering.generated.json using OpenRouter (OPENROUTER_API_KEY, default model anthropic/claude-sonnet-4.6). Run this after editing src/lib/board-template-engineering.spec.ts or bumping BOARD_TEMPLATE_VERSION, then commit the generated JSON.
src/app/page.tsx Canvas UI, widget interactions, streaming client
src/app/api/generate-board/route.ts Provider-backed AI whiteboard planning endpoint
src/app/api/generate-widget/route.ts Provider-backed widget generation endpoint
src/app/_components/whiteboard/ Canvas, board tab, note, widget, and modal components
src/app/_lib/whiteboard/ Canvas state, storage, generation, and geometry helpers
src/lib/board-template-engineering.spec.ts Engineering widget prompts for build-time generation
src/lib/board-template-engineering.ts Loads generated Engineering board JSON
src/generated/board-templates/ Versioned LLM-generated prebuilt board cache
src/lib/ai-board-schemas.ts Zod schemas for AI whiteboard planning
src/lib/dashboard-schemas.ts Zod schemas and shared widget data types
src/lib/widget-stream.ts NDJSON stream event types
src/openui/dashboard-render-library.tsx Local OpenUI component library
src/openui/dashboard-prompt-library.ts Prompt source for OpenUI generation
src/generated/openui-dashboard-prompt.txt Generated prompt bundle used by the API
- The client posts
{ prompt }to/api/generate-widget. - The API uses
GROQ_API_KEYS, numberedGROQ_API_KEY_Nvalues, orGROQ_API_KEYby default. - If Groq fails before any stream event is emitted, the API retries once with
OPENROUTER_API_KEYand the configured OpenRouter model. - The selected provider generates structured preview data and the API validates it with Zod.
- The API streams the preview data followed by OpenUI Lang deltas as NDJSON.
- The client renders OpenUI Lang through
@openuidev/react-langusing the local component library.
- The client posts an AI whiteboard brief to
/api/generate-board. - The API uses Groq first with
GROQ_BOARD_MODELor the Groq defaults, then tries OpenRouter withOPENROUTER_BOARD_MODELorOPENROUTER_MODELif Groq planning fails. - The provider returns a board plan with a board name, widget prompts, layout, and optional notes.
- The API validates and normalizes the plan with Zod.
- The client creates the board, then generates the planned widgets through the normal widget stream.
- If the board planner fails or no API key is configured, the client receives a local fallback board plan.
- The API routes require the Node.js runtime because widget generation reads the generated OpenUI prompt bundle from disk.
- Interrupted streaming widgets are restored as errors on the next page load so they can be retried.
- Current whiteboard state is stored under
new-dashboard.canvas.boards.v1in browserlocalStorage. - The active whiteboard is stored under
new-dashboard.canvas.activeBoard.v1. - The legacy widget-only key
new-dashboard.canvas.widgets.v1is read for migration into the current board format. - Theme preference is stored under
new-dashboard.theme.preference.v1.