Skip to content

feat: add pre-flight config validation for silently skipped features#100

Open
Marve10s wants to merge 2 commits intomainfrom
feat/preflight-config-validation
Open

feat: add pre-flight config validation for silently skipped features#100
Marve10s wants to merge 2 commits intomainfrom
feat/preflight-config-validation

Conversation

@Marve10s
Copy link
Owner

Summary

  • Adds a pre-flight validation layer that warns users when selected features will be silently skipped during template generation (e.g., CMS without Next.js, Search with Convex backend)
  • Uses Effect-ts Data.Class for immutable warnings, Array.filterMap + Option for rule evaluation
  • Integrates in both CLI (yellow warning box) and web builder (collapsible banner in preview panel)
  • Covers 20+ silent failure scenarios across search, file storage, job queue, email, logging, observability, CMS, payments, analytics, feature flags, API, and database handlers

Files changed

File Change
packages/template-generator/src/preflight-validation.ts Core validation module with rules
packages/template-generator/src/index.ts Export new module
packages/template-generator/package.json Add effect dependency
apps/cli/src/utils/preflight-display.ts CLI warning display
apps/cli/src/helpers/core/command-handlers.ts Integration in both --yes and interactive paths
apps/web/src/components/stack-builder/preview-panel.tsx Warning banner in preview
apps/cli/test/preflight-validation.test.ts 52 tests

Test plan

  • bun test apps/cli/test/preflight-validation.test.ts — 52/52 pass
  • bun run test:release — snapshots, CLI-builder sync, preview configs all pass
  • bun run lint — 6/6 packages pass
  • Manual: run CLI with --cms payload --frontend nuxt --backend hono and verify warning appears
  • Manual: run CLI with valid config and verify NO warnings appear
  • Manual: open web builder, select incompatible combo, switch to Preview tab, verify warning banner

… features

Template handlers silently skip features when config combinations are
incompatible (e.g., CMS with non-Next.js frontend, Search with Convex
backend). Users get zero feedback — selected features simply don't
appear in the generated project.

Adds a pre-flight validation layer using Effect-ts that runs after
config assembly and before template generation, warning users about
features that won't produce output. Covers 20+ silent failure scenarios
across search, file storage, job queue, email, logging, observability,
CMS, payments, analytics, feature flags, API, and database handlers.

- CLI: yellow warning box between config assembly and generation
- Web: collapsible warning banner in the preview panel
- 52 tests covering all rules, edge cases, and multiple warnings
@vercel
Copy link

vercel bot commented Mar 22, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
better-fullstack-web Ignored Ignored Preview Mar 23, 2026 10:19am

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.

1 participant