8000 Custom dashboards and unified ai no playground by aadesh18 · Pull Request #1243 · stack-auth/stack-auth · GitHub
[go: up one dir, main page]

Skip to content

Custom dashboards and unified ai no playground#1243

Merged
aadesh18 merged 195 commits intodevfrom
custom-dashboards-and-unified-ai-no-playground
Mar 13, 2026
Merged

Custom dashboards and unified ai no playground#1243
aadesh18 merged 195 commits intodevfrom
custom-dashboards-and-unified-ai-no-playground

Conversation

@aadesh18
Copy link
Contributor
@aadesh18 aadesh18 commented Mar 12, 2026

This PR implements unified AI endpoint and custom dashboards.

Unified AI Endpoint
We now use a single endpoint throughout the codebase that makes the call to openrouter. Specifically, email drafts, email templates, email themes, wysiwyg, cmd centre ai search and docs ai, all use this unified ai endpoint. All the tools are defined in the backend, all the prompts exist in the backend.

How to review this PR for unified ai endpoint:

This PR will be easier to review if we look at the different folders that were affected.

under packages - We added streaming functionality, and made renaming changes

under docs - there are three files that have changed
package.json - we updated the package (we were previously using a very old version of the package)
route.ts - we changed the call from a direct call to openrouter to the unified ai endpoint
ai-chat.tsx - because of updating the package, we had to make changes to adapt to the latest versions of the package

under backend

route.ts - the main unified ai endpoint. this endpoint uses various support files
forward.ts - this is the forward to production functionality
models.ts - consists of the models, and the rules for selecting those models
prompts.ts - consists of the base prompt + specific system prompts depending upon the usage
schema.ts
every single file under ai/tools folder - which as the name suggests, consists of the implementations of the different tools that can be provided to the llm
route-handlers - added support for streaming to SmartRoute and response
under dashboard

ai-search/route.ts - refactored the file to use unified ai endpoint
chat-adapters.ts - refactored the file to use unified ai endpoint and created extra checks for the ai generated code

Custom Dashboards
We let the user write their query in english. We then use AI to create dashboards that are interactive, live and savable. This PR includes a new package called dashboard-ui-components. This package has components that are used in the dashboard and more importantly, these components are being imported from esm in the ai generated code for custom dashboards. We also change the bar at the top for the products pages.

How to review this PR:

Review the new package (package/dashboard-ui-components), the setup and the files inside it.
Review the schema changes in stack-shared/src
Review the changes in dashboard. The following changes have been made
Updated the design-components folder since we moved the dashboard components to the new package
Updated imports for these components accordingly
Updated the title bar of the product pages
Created the files for custom dashboards under the dashboards folder and components under commands/create-dashboard
Created a script under dashboard/scripts that generates the file with type definitions that would go to the llm
Review the backend
Started using unified ai endpoint

Summary by CodeRabbit

  • New Features

    • Added custom dashboards feature allowing users to create and manage personalized dashboards with AI assistance.
    • Integrated AI-assisted dashboard code generation with visual preview and editing capabilities.
    • Introduced new AI query endpoints supporting stream and generate modes with configurable model quality/speed settings.
  • Improvements

    • Reorganized UI components into a dedicated component library package for better code reuse.
    • Enhanced chat architecture with improved message handling and tool integration.
    • Updated AI provider integration with improved configuration management.

@aadesh18 aadesh18 requested a review from N2D4 March 13, 2026 00:23
Copy link
@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

Module not found errors when importing DesignCard, DesignInput, DesignAlert, DesignBadge, and DesignButton from non-existent paths in design-components directory.

Fix on Vercel

@aadesh18 aadesh18 merged commit 8267ebc into dev Mar 13, 2026
30 checks passed
@aadesh18 aadesh18 deleted the custom-dashboards-and-unified-ai-no-playground branch March 13, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0