Skip to content

Conversation

@ian
Copy link
Owner

@ian ian commented Feb 1, 2026

  • adding storybook + npx startupkit add storybook
  • feat(cli): add Storybook template to init and add commands

Summary by cubic

Adds Storybook as the styleguide in new repos and as an optional app template you can add later. Satisfies Startup-131 by making component docs available out of the box.

  • New Features
    • CLI: init prompts to include Storybook (default yes) and clones it to apps/storybook; add command includes a “Storybook” template.
    • Template: Storybook React + Vite with Tailwind, docs/essentials addons, preview config, and aliases/stubs for server-only modules and Prisma; loads stories from packages.
    • Repo: new storybook script targets apps/storybook; Vercel config for building/deploying Storybook.
    • Tests: updated unit tests for add/init to validate storybook sources and template selection.

Written for commit 15004b2. Summary will update on new commits.

ian added 2 commits February 1, 2026 14:51
- Add Storybook as optional template during startupkit init with prompt
- Add Storybook to startupkit add command template list
- Update paths and dependencies for Storybook integration
- Add unit tests for storybook template configuration
- All 158 tests passing
@linear
Copy link

linear bot commented Feb 1, 2026

@socket-security
Copy link

socket-security bot commented Feb 1, 2026

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 1, 2026

Deploying startupkit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 15004b2
Status: ✅  Deploy successful!
Preview URL: https://e03ab5cf.startupkit-975.pages.dev
Branch Preview URL: https://ian-startup-131-add-stylegui.startupkit-975.pages.dev

View logs

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 22 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="templates/apps/storybook/package.json">

<violation number="1" location="templates/apps/storybook/package.json:2">
P2: Package name matches a dependency, which creates a self-dependency. npm/pnpm warn or refuse installs when a package depends on itself, so this template can fail to install. Rename the package to avoid matching the Storybook dependency name.</violation>
</file>

<file name="packages/cli/src/cmd/init.ts">

<violation number="1" location="packages/cli/src/cmd/init.ts:180">
P2: Non-interactive init (--name) silently skips Storybook because includeStorybook defaults to false and the prompt never runs. Defaulting to the prompt’s "true" behavior prevents Storybook from being omitted when users pass --name.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@@ -0,0 +1,35 @@
{
"name": "storybook",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 1, 2026

Choose a reason for hiding this comment

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

P2: Package name matches a dependency, which creates a self-dependency. npm/pnpm warn or refuse installs when a package depends on itself, so this template can fail to install. Rename the package to avoid matching the Storybook dependency name.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At templates/apps/storybook/package.json, line 2:

<comment>Package name matches a dependency, which creates a self-dependency. npm/pnpm warn or refuse installs when a package depends on itself, so this template can fail to install. Rename the package to avoid matching the Storybook dependency name.</comment>

<file context>
@@ -0,0 +1,35 @@
+{
+	"name": "storybook",
+	"version": "0.0.0",
+	"private": true,
</file context>
Fix with Cubic

const isCurrentDir = destDir === cwd

// Step 3: Ask about Storybook
let includeStorybook = false
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 1, 2026

Choose a reason for hiding this comment

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

P2: Non-interactive init (--name) silently skips Storybook because includeStorybook defaults to false and the prompt never runs. Defaulting to the prompt’s "true" behavior prevents Storybook from being omitted when users pass --name.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/cli/src/cmd/init.ts, line 180:

<comment>Non-interactive init (--name) silently skips Storybook because includeStorybook defaults to false and the prompt never runs. Defaulting to the prompt’s "true" behavior prevents Storybook from being omitted when users pass --name.</comment>

<file context>
@@ -173,9 +176,24 @@ export async function init(props: {
 	const isCurrentDir = destDir === cwd
 
+	// Step 3: Ask about Storybook
+	let includeStorybook = false
+	if (promptedForName) {
+		const { addStorybook } = await inquirer.prompt([
</file context>
Suggested change
let includeStorybook = false
let includeStorybook = !promptedForName
Fix with Cubic

@ian ian merged commit f596d01 into main Feb 2, 2026
13 checks passed
@ian ian deleted the ian/startup-131-add-styleguide-to-default-repo-creation branch February 2, 2026 00:41
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