Skip to content

docs(app-builder): add architecture doc explaining framework support and deployment pipeline#1763

Open
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
docs/app-builder-architecture
Open

docs(app-builder): add architecture doc explaining framework support and deployment pipeline#1763
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
docs/app-builder-architecture

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 31, 2026

Summary

Adds docs/app-builder-architecture.md documenting the full App Builder lifecycle, specifically addressing why Vite projects fail to deploy while working in preview.

Key findings documented:

  • Preview runs bun run dev in a Cloudflare Sandbox, so any framework with a valid dev script works (including Vite)
  • Deployment validates detected project types against supportedProjectTypeSchema, which only includes 6 of the 15 detectable types: nextjs, astro, hugo, jekyll, eleventy, plain-html
  • Vite is detected (priority 2 in detect-project.sh) but rejected at deploy time because no build pipeline exists for it
  • The doc includes the full detection-vs-deployment gap table, build pipeline details, workarounds for users, and a key file reference

Verification

  • Verified all file paths and code references cited in the document exist and are accurate
  • Verified supportedProjectTypeSchema values match what's in cloudflare-deploy-infra/builder/src/types.ts
  • Verified detect-project.sh detection order and project type list
  • Verified build pipeline mappings in deployment-orchestrator.ts

Visual Changes

N/A

Reviewer Notes

This is a documentation-only change. The doc is placed in docs/ alongside the existing do-sqlite-drizzle.md convention. It serves as both internal architecture reference and investigation notes for the user-reported issue of Vite projects failing to deploy.

…and deployment pipeline

Documents the full App Builder lifecycle (preview vs deploy), the gap between
detected and deployable project types, and why Vite projects fail to deploy
despite working in preview.
4. The preview is served through an iframe proxy that injects a bridge script
for navigation tracking.

Because the preview runs `bun run dev`, **any framework with a valid `dev`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

WARNING: Preview support is narrower than this sentence says

PreviewDO always runs bun install --frozen-lockfile before starting the dev server and the proxy only forwards to port 8080 (cloudflare-app-builder/src/preview-do.ts:420, cloudflare-app-builder/src/handlers/preview.ts:287). A project can have a valid dev script and still fail preview if Bun install fails or the server does not bind to that port, so this wording overstates what the preview layer guarantees.

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Mar 31, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
docs/app-builder-architecture.md 42 The doc says any project with a valid dev script previews correctly, but preview also depends on bun install --frozen-lockfile succeeding and the app binding to port 8080.
Other Observations (not in diff)

None.

Files Reviewed (1 files)
  • docs/app-builder-architecture.md - 1 issue

Reviewed by gpt-5.4-20260305 · 616,969 tokens

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.

0 participants