Skip to content

feat: add blank project preset#488

Merged
schiller-manuel merged 4 commits into
mainfrom
taren/blank-project-preset
Jul 17, 2026
Merged

feat: add blank project preset#488
schiller-manuel merged 4 commits into
mainfrom
taren/blank-project-preset

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Jul 17, 2026

Copy link
Copy Markdown
Member

What changed

  • add a --blank preset for minimal React and Solid projects
  • keep optional UI and tooling dependencies out of blank projects unless a selected integration needs them
  • move shared template assets and dependencies to their actual consumers
  • add CLI, generator, composition, collision, and scaffold-skill coverage

Why

The standard starter is useful for exploration, but it obscures framework startup and dependency costs in clean-room evaluation and in minimal production projects. The blank preset creates the smallest helpful project while retaining framework-required structure and explicit opt-ins.

Validation

  • pnpm build
  • pnpm test
  • pnpm --filter @tanstack/cli exec intent validate skills
  • clean-worktree install and full validation

The changeset releases minor versions of @tanstack/cli and @tanstack/create.

Summary by CodeRabbit

  • New Features
    • Added --blank to create minimal, production-ready TanStack Start apps in non-interactive mode.
    • Blank projects generate a simple / route and conditionally include Tailwind and devtools (re-enabled only when add-ons require them); intent/examples are omitted.
    • Blank preset now uses .cta.json-driven preset behavior for generated project contents.
  • Documentation
    • Updated README, quick-start, and CLI reference with --blank examples and clarified include/exclude details (including intent and --tailwind interactions).
  • Bug Fixes
    • Improved --blank flag incompatibility handling and non-interactive safety checks (instructs using --force when needed).
  • Tests
    • Added unit and e2e coverage for blank preset generation, validation, and filesystem safety.

@tannerlinsley
tannerlinsley requested a review from a team as a code owner July 17, 2026 17:03
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e9bfe18c-6c44-453e-9964-9ec8de80d432

📥 Commits

Reviewing files that changed from the base of the PR and between a12ba9f and 8711a8b.

📒 Files selected for processing (1)
  • packages/create/tests/package-json.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/create/tests/package-json.test.ts

📝 Walkthrough

Walkthrough

The CLI adds a --blank preset that resolves minimal project options, and the generator renders reduced React and Solid applications with conditional add-ons, Tailwind, devtools, examples, and Intent setup. Documentation, dependency ownership, build assets, and automated tests are updated accordingly.

Changes

Blank project generation

Layer / File(s) Summary
CLI blank option flow
packages/cli/src/*, packages/cli/tests/*
Adds --blank, validates incompatible flags, skips optional prompts, sets the blank preset, updates telemetry and confirmation output, and rejects non-interactive creation in non-empty directories without --force.
Generator contracts and package composition
packages/create/src/*, packages/create/scripts/*, packages/create/package.json, packages/create/src/frameworks/*/add-ons/*, packages/create/src/frameworks/*/examples/*
Propagates blank and Tailwind values through rendering, excludes blank-incompatible packages, assigns integration dependencies to add-ons, and moves asset copying into a build script.
React and Solid blank templates
packages/create/src/frameworks/{react,solid}/project/*
Generates minimal routes, styles, README content, conditional devtools, and reduced base dependency manifests for blank projects.
Generator and dependency validation
packages/create/tests/*
Tests blank file and dependency allowlists, Tailwind add-on composition, Node/edge package parity, and consumer-owned lucide-react dependencies.
End-to-end blank app verification
packages/cli/tests-e2e/*
Adds fixture support and smoke tests for blank deployment, target-directory safety, generated files, dependencies, scripts, served HTML, and browser-visible output.
Blank preset documentation
README.md, docs/*, .agents/index.md, packages/cli/skills/*, .changeset/*
Documents blank commands, option compatibility, generated-project behavior, metadata changes, and updated CLI skill guidance.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant TanStackCLI
  participant CreateOptions
  participant CreateGenerator
  participant GeneratedApp
  User->>TanStackCLI: run create --blank
  TanStackCLI->>CreateOptions: validate and normalize preset
  CreateOptions->>CreateGenerator: pass blank, Tailwind, add-on, and deployment options
  CreateGenerator->>GeneratedApp: render routes, styles, README, and package manifests
  GeneratedApp-->>User: provide minimal runnable application
Loading

Possibly related PRs

  • TanStack/cli#475: Both changes modify the create manifest and template-rendering pipeline.
  • TanStack/cli#477: Both changes modify the create manifest and template-rendering context.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: introducing a new blank project preset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/blank-project-preset

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/create/tests/package-json.test.ts

Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
The file was not found in any of the provided project(s): packages/create/tests/package-json.test.ts


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/skills/create-app-scaffold/SKILL.md`:
- Line 93: Rename the heading in the minimal scaffold section to state “Use
--blank when a minimal scaffold is required,” aligning it with the supported
command and the section’s corrected example.
- Around line 48-52: Update every npx `@tanstack/cli` invocation in the create-app
scaffold skill examples to use the pinned `@tanstack/cli`@0.70.0 package version,
including the shown create command, while preserving all existing arguments and
behavior.

In `@packages/cli/src/cli.ts`:
- Around line 991-994: Extend the validation used by the shared --blank options
so the dev command also rejects incompatible flags such as --tailwind and
template/example combinations. Update the dev command flow around
startDevWatchMode to invoke validateLegacyCreateFlags, or centralize that
validation before entering dev mode, while preserving existing create-command
validation and preventing silent normalization.

In `@packages/cli/tests-e2e/helpers.ts`:
- Around line 413-414: Update the fixture creation flow around the afterCreate
callback so that if afterCreate rejects, the temporary app directory and
installed node_modules are cleaned up before the error propagates. Preserve the
existing callback behavior and successful fixture return path.

In `@packages/create/src/frameworks/react/project/base/README.md.ejs`:
- Line 4: Update the README template’s styling description to render
conditionally from the existing `tailwind` template context, so projects with
Tailwind no longer claim to use plain CSS while preserving the appropriate
description for non-Tailwind projects.

In `@packages/create/src/frameworks/solid/project/packages.json`:
- Around line 21-23: Update the file-router manifest in packages.json to include
`@tanstack/router-plugin` as a dependency required by the routerOnly branch in
vite.config.ts.ejs, preserving the existing versioning and dependency
conventions so generated projects can resolve the imported Vite plugin.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e2bcc436-675b-4db3-a94c-5a76d44620ec

📥 Commits

Reviewing files that changed from the base of the PR and between d7818c3 and 2ef5925.

⛔ Files ignored due to path filters (6)
  • packages/create/src/frameworks/react/project/base/public/favicon.ico is excluded by !**/*.ico
  • packages/create/src/frameworks/react/project/base/public/logo192.png is excluded by !**/*.png
  • packages/create/src/frameworks/react/project/base/public/logo512.png is excluded by !**/*.png
  • packages/create/src/frameworks/solid/project/base/public/favicon.ico is excluded by !**/*.ico
  • packages/create/src/frameworks/solid/project/base/public/logo192.png is excluded by !**/*.png
  • packages/create/src/frameworks/solid/project/base/public/logo512.png is excluded by !**/*.png
📒 Files selected for processing (67)
  • .agents/index.md
  • .changeset/clean-cats-start.md
  • README.md
  • docs/cli-reference.md
  • docs/quick-start.md
  • examples/react/blog/package.json
  • packages/cli/skills/add-addons-existing-app/SKILL.md
  • packages/cli/skills/choose-ecosystem-integrations/SKILL.md
  • packages/cli/skills/create-app-scaffold/SKILL.md
  • packages/cli/skills/create-app-scaffold/references/create-flag-compatibility-matrix.md
  • packages/cli/skills/create-app-scaffold/references/framework-adapters.md
  • packages/cli/skills/maintain-custom-addons-dev-watch/SKILL.md
  • packages/cli/skills/query-docs-library-metadata/SKILL.md
  • packages/cli/src/cli.ts
  • packages/cli/src/command-line.ts
  • packages/cli/src/options.ts
  • packages/cli/src/types.ts
  • packages/cli/tests-e2e/blank-smoke.spec.ts
  • packages/cli/tests-e2e/helpers.ts
  • packages/cli/tests/command-line.test.ts
  • packages/cli/tests/options.test.ts
  • packages/create/package.json
  • packages/create/scripts/copy-assets.mjs
  • packages/create/scripts/generate-manifest.mjs
  • packages/create/src/add-to-app.ts
  • packages/create/src/create-app.ts
  • packages/create/src/edge-create-app.ts
  • packages/create/src/edge-package-json.ts
  • packages/create/src/edge-render.ts
  • packages/create/src/edge-template-file.ts
  • packages/create/src/frameworks/react/add-ons/posthog/info.json
  • packages/create/src/frameworks/react/add-ons/shadcn/info.json
  • packages/create/src/frameworks/react/add-ons/shadcn/package.json
  • packages/create/src/frameworks/react/add-ons/shopify/info.json
  • packages/create/src/frameworks/react/add-ons/strapi/package.json
  • packages/create/src/frameworks/react/add-ons/tanstack-query/package.json
  • packages/create/src/frameworks/react/examples/events/package.json
  • packages/create/src/frameworks/react/examples/resume/package.json
  • packages/create/src/frameworks/react/hosts/cloudflare/package.json.ejs
  • packages/create/src/frameworks/react/project/base/README.md.ejs
  • packages/create/src/frameworks/react/project/base/package.json
  • packages/create/src/frameworks/react/project/base/public/manifest.json
  • packages/create/src/frameworks/react/project/base/public/robots.txt
  • packages/create/src/frameworks/react/project/base/src/App.test.tsx.ejs
  • packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs
  • packages/create/src/frameworks/react/project/base/src/routes/index.tsx.ejs
  • packages/create/src/frameworks/react/project/base/src/styles.css.ejs
  • packages/create/src/frameworks/react/project/base/vite.config.ts.ejs
  • packages/create/src/frameworks/react/project/packages.json
  • packages/create/src/frameworks/solid/add-ons/solid-ui/info.json
  • packages/create/src/frameworks/solid/project/base/README.md.ejs
  • packages/create/src/frameworks/solid/project/base/_dot_cursorrules.append
  • packages/create/src/frameworks/solid/project/base/package.json
  • packages/create/src/frameworks/solid/project/base/public/manifest.json
  • packages/create/src/frameworks/solid/project/base/public/robots.txt
  • packages/create/src/frameworks/solid/project/base/src/App.test.tsx.ejs
  • packages/create/src/frameworks/solid/project/base/src/routes/__root.tsx.ejs
  • packages/create/src/frameworks/solid/project/base/src/routes/index.tsx.ejs
  • packages/create/src/frameworks/solid/project/base/src/styles.css.ejs
  • packages/create/src/frameworks/solid/project/base/vite.config.ts.ejs
  • packages/create/src/frameworks/solid/project/packages.json
  • packages/create/src/package-json.ts
  • packages/create/src/template-file.ts
  • packages/create/src/types.ts
  • packages/create/tests/add-to-app.test.ts
  • packages/create/tests/blank-preset.test.ts
  • packages/create/tests/react-template-dependencies.test.ts
💤 Files with no reviewable changes (9)
  • packages/create/src/frameworks/solid/project/base/public/robots.txt
  • packages/create/src/frameworks/solid/project/base/_dot_cursorrules.append
  • packages/create/src/frameworks/react/project/base/public/manifest.json
  • packages/create/src/frameworks/solid/project/base/public/manifest.json
  • packages/create/src/frameworks/react/project/base/src/App.test.tsx.ejs
  • packages/create/src/frameworks/react/project/base/public/robots.txt
  • packages/create/src/frameworks/react/add-ons/posthog/info.json
  • packages/create/src/frameworks/solid/project/base/src/App.test.tsx.ejs
  • examples/react/blog/package.json

Comment thread packages/cli/skills/create-app-scaffold/SKILL.md
Comment thread packages/cli/skills/create-app-scaffold/SKILL.md Outdated
Comment thread packages/cli/src/cli.ts
Comment thread packages/cli/tests-e2e/helpers.ts Outdated
Comment thread packages/create/src/frameworks/react/project/base/README.md.ejs Outdated
Comment thread packages/create/src/frameworks/solid/project/packages.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/create/tests/package-json.test.ts`:
- Around line 45-48: Extend the normal-project assertion around
createPackageJSON to verify that the appropriate Start dependency,
`@tanstack/react-start` or `@tanstack/solid-start` based on the selected framework,
remains in devDependencies when routerOnly is not enabled. Keep the existing
router-plugin absence assertion unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 932970f5-bda2-4d09-8db4-3962a0d765f8

📥 Commits

Reviewing files that changed from the base of the PR and between 2ef5925 and a12ba9f.

📒 Files selected for processing (8)
  • packages/cli/skills/create-app-scaffold/SKILL.md
  • packages/cli/src/cli.ts
  • packages/cli/tests-e2e/blank-smoke.spec.ts
  • packages/cli/tests-e2e/helpers.ts
  • packages/create/src/frameworks/react/project/base/README.md.ejs
  • packages/create/src/frameworks/solid/project/base/README.md.ejs
  • packages/create/tests/blank-preset.test.ts
  • packages/create/tests/package-json.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/create/src/frameworks/solid/project/base/README.md.ejs
  • packages/cli/src/cli.ts
  • packages/create/tests/blank-preset.test.ts

Comment thread packages/create/tests/package-json.test.ts
@tannerlinsley
tannerlinsley requested a review from jherr July 17, 2026 17:44
@schiller-manuel
schiller-manuel merged commit 75db7e8 into main Jul 17, 2026
8 checks passed
@schiller-manuel
schiller-manuel deleted the taren/blank-project-preset branch July 17, 2026 21:25
@github-actions github-actions Bot mentioned this pull request Jul 17, 2026
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.

2 participants