Examples
All example apps included in the Fabrik UI repository
The Fabrik repository includes seven example apps demonstrating different patterns. Each is a complete Next.js project you can run locally.
next-chat
Full-featured chat with generative UI components.
cd examples/next-chat && pnpm devDemonstrates: <Chat>, defineComponent, weather cards, bar charts, data tables, elicitation dialogs, artifact panels.
next-widget
Floating chat widget using the <Fab> component.
cd examples/next-widget && pnpm devDemonstrates: <Fab>, floating action button, expandable chat panel overlaying existing page content.
next-copilot
Side-panel copilot layout with a main content area.
cd examples/next-copilot && pnpm devDemonstrates: <Fab> in a copilot layout, side panel, context-aware responses alongside your main application.
custom-agent
Custom agent with specialized system prompts and tools.
cd examples/custom-agent && pnpm devDemonstrates: custom systemPrompt, defineTool, multi-step tool chains, agent-style behavior.
local-model
Running with a local LLM via Ollama or any OpenAI-compatible endpoint.
cd examples/local-model && pnpm devDemonstrates: openai() with a custom baseUrl pointing to a local server, no API key required.
pages-demo
Multi-page AI routing with FabrikPages.
cd examples/pages-demo && pnpm devDemonstrates: defineRoute, page-specific components, route-based system prompts, multi-page AI navigation.
Running examples
All examples are part of the monorepo. From the root:
# Install dependencies
pnpm install
# Run a specific example
pnpm --filter next-chat dev
# Or run all examples
pnpm devEach example uses the local @fabrik-sdk/ui workspace package, so changes to the SDK are reflected immediately.
Creating a new project
Use the CLI to scaffold a new project:
npx create-fabrik-app my-appThis creates a Next.js project with Fabrik UI pre-configured, including a server route, client page, and example component.