Skip to content

Add blueprint API endpoint#116

Open
pappensex wants to merge 1 commit intomainfrom
codex/anlegen-der-get-methode
Open

Add blueprint API endpoint#116
pappensex wants to merge 1 commit intomainfrom
codex/anlegen-der-get-methode

Conversation

@pappensex
Copy link
Owner

Summary

  • add a new API route that returns the CHIBot blueprint data as JSON

Testing

  • not run (not requested)

Codex Task

Copilot AI review requested due to automatic review settings November 20, 2025 03:30
@vercel
Copy link

vercel bot commented Nov 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
transzendenz Error Error Nov 20, 2025 3:30am
yoni-app Error Error Nov 20, 2025 3:30am

@vercel
Copy link

vercel bot commented Nov 20, 2025

Deployment failed with the following error:

The `vercel.json` schema validation failed with the following message: should NOT have additional property `output`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new API endpoint /api/blueprint that exposes the CHIBot blueprint data as JSON. The blueprint contains metadata about the application's pages, data layers, profiles, bots, rituals, and action items.

Key Changes:

  • New GET endpoint at /api/blueprint/route.ts that returns the blueprint data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { blueprint } from '@/app/data/chibot-blueprint'

export async function GET() {
return NextResponse.json(blueprint)
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

The GET handler lacks error handling. While the blueprint is static data and unlikely to fail, other GET endpoints in this codebase (e.g., /api/github-app/authorize/route.ts) include try/catch blocks for consistency and robustness. Consider wrapping the response in a try/catch block to handle any unexpected serialization errors and return an appropriate error response.

Suggested change
return NextResponse.json(blueprint)
try {
return NextResponse.json(blueprint)
} catch (error) {
return NextResponse.json(
{ error: 'Failed to serialize blueprint data.' },
{ status: 500 }
)
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant