RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/nerds-odd-e/doughnut

Cursor rule

.cursor/rules/frontend-storybook.mdc

Frontend Storybook stories for Vue components, story format, story variants, makeMe builders, Storybook aliases

Cursor rules

Quality

69/100

Scores the file, not the repository.

Length

379 words

8 headings · 5 code blocks

Repository

49

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
nerds-odd-e/doughnut/.cursor/rules/frontend-storybook.mdcRawGitHub
1---
2description: Frontend Storybook stories for Vue components, story format, story variants, makeMe builders, Storybook aliases
3globs: frontend/src/**/*.stories.ts
4alwaysApply: false
5---
6# Frontend Storybook Rules
7 
8Use this rule when creating or updating frontend Storybook stories. Component-level naming, styling, icon, and derived-state conventions live in `frontend-component.mdc`.
9 
10## Running Storybook
11 
12Start Storybook locally for component development and debugging:
13 
14```bash
15CURSOR_DEV=true nix develop -c pnpm storybook
16```
17 
18Storybook starts on `http://localhost:6006` by default.
19 
20## Shared Test Data Builders
21 
22Storybook stories reuse the same `makeMe` builders as unit tests. Source code lives in `packages/doughnut-test-fixtures`.
23 
24```typescript
25import makeMe from "doughnut-test-fixtures/makeMe"
26```
27 
28The `makeMe` object provides access to test data builders:
29 
30- `makeMe.anAnsweredQuestion` creates recall prompts with answers.
31- `makeMe.aPredefinedQuestion` creates predefined question data.
32- `makeMe.aNote` creates note data.
33- `makeMe.aNoteRealm` creates note realm data.
34- Many other API-shaped builders are available.
35 
36```typescript
37const correctQuestion = makeMe.anAnsweredQuestion
38 .answerCorrect(true)
39 .withChoiceIndex(0)
40 .please()
41 
42const questionWithNote = makeMe.anAnsweredQuestion
43 .withNote(makeMe.aNote.topicConstructor("TypeScript").please())
44 .answerCorrect(true)
45 .please()
46```
47 
48## Writing A Story
49 
501. Create a file named `ComponentName.stories.ts` in the same directory as the component.
512. Import the component and necessary builders.
523. Define the story meta and stories.
53 
54```typescript
55import type { Meta, StoryObj } from "@storybook/vue3"
56import makeMe from "doughnut-test-fixtures/makeMe"
57import MyComponent from "./MyComponent.vue"
58 
59const meta = {
60 title: "Category/MyComponent",
61 component: MyComponent,
62 tags: ["autodocs"],
63} satisfies Meta<typeof MyComponent>
64 
65export default meta
66type Story = StoryObj<typeof meta>
67 
68export const Default: Story = {
69 args: {
70 prop1: makeMe.someBuilder.please(),
71 },
72}
73```
74 
75## Story Variants
76 
77Create multiple story variants to showcase different component states:
78 
79```typescript
80export const Variant1: Story = {
81 args: {
82 // props for variant 1
83 },
84}
85 
86export const Variant2: Story = {
87 args: {
88 // props for variant 2
89 },
90}
91```
92 
93## Module Aliases
94 
95Storybook supports the same module aliases as the main application:
96 
97- `@/` points to `src/`.
98- `@tests/*` points to `tests/`, for example `@tests/helpers`.
99- `@generated/` points to `generated/`.
100 
101For API-shaped fixtures, import `makeMe` from `doughnut-test-fixtures/makeMe`; do not use an `@tests/fixtures` alias.
102 
103## Global Styles
104 
105Storybook automatically loads global styles from `src/assets/daisyui.css`, including Tailwind CSS base styles, DaisyUI component styles, and custom application styles.
106 
107## Best Practices
108 
1091. Reuse builders: always use `makeMe` instead of ad-hoc mock objects that duplicate API shapes.
1102. Avoid duplication: use builders for consistency.
1113. Add multiple variants to showcase different component states.
1124. Use the `autodocs` tag to automatically generate documentation.
1135. Keep builders framework-neutral so they work in both tests and Storybook.
114 

Sections

  • Frontend Storybook Rules
  • Running Storybook
  • Shared Test Data Builders
  • Writing A Story
  • Story Variants
  • Module Aliases
  • Global Styles
  • Best Practices

What it covers

buildtestcode-styletesting-strategydo-not

Stack — with the evidence

typescript

(1.00)

cypress

(1.00)

biome

(1.00)

node

(0.70)

react

(0.70)

vue

(0.70)

hono

(0.70)

tailwind

(0.70)

vite

(0.70)

vitest

(0.70)

pytest

(0.70)

javascript

(0.60)

python

(0.60)

monorepo

(0.60)

pnpm

(0.60)

github-actions

(0.60)

Glob targeting

  • frontend/src/**/*.stories.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
nerds-odd-e
Language
—
License
—
Archived
no

All configs in this repo

Also in nerds-odd-e/doughnut

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
nerds-odd-e/doughnut.cursor/rules/general.mdc · 49Cursor rulestypescriptcypress+14styledo-not49/1003 days ago
nerds-odd-e/doughnut.clinerules/daisyui.md · 49Cline rulestypescriptcypress+14setuplint-formatstyleui+157/1003 days ago
nerds-odd-e/doughnut.cursor/rules/architecture-decisions.mdc · 49Cursor rulestypescriptcypress+14no sections16/1003 days ago
nerds-odd-e/doughnut.cursor/rules/backend-code.mdc · 49Cursor rulestypescriptcypress+14styletypesdatabasedo-not61/1003 days ago
nerds-odd-e/doughnut.cursor/rules/backend-testing.mdc · 49Cursor rulestypescriptcypress+14buildteststyletesting-strategy+273/1003 days ago
nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49Cursor rulestypescriptcypress+14setupbuildteststyle+496/1003 days ago
nerds-odd-e/doughnut.cursor/rules/db-migration.mdc · 49Cursor rulestypescriptcypress+14stylearchdatabasedeployment64/1003 days ago
nerds-odd-e/doughnut.cursor/rules/e2e-authoring.mdc · 49Cursor rulestypescriptcypress+14setupteststylearch+380/1003 days ago
nerds-odd-e/doughnut.cursor/rules/e2e-ocr.mdc · 49Cursor rulestypescriptcypress+14setuptesting-strategydo-not46/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-api.mdc · 49Cursor rulestypescriptcypress+14styletesting-strategyapido-not57/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-component.mdc · 49Cursor rulestypescriptcypress+14testlint-formatstylearch+276/1003 days ago
nerds-odd-e/doughnut.cursor/rules/frontend-testing.mdc · 49Cursor rulestypescriptcypress+14buildteststyletesting-strategy+289/1003 days ago
nerds-odd-e/doughnut.cursor/rules/gsd-coexistence.mdc · 49Cursor rulestypescriptcypress+14style60/1003 days ago
nerds-odd-e/doughnut.cursor/rules/linting_formating.mdc · 49Cursor rulestypescriptmonorepo+14testlint-formatstylearch+688/1003 days ago
nerds-odd-e/doughnut.cursor/rules/mcp-server.mdc · 49Cursor rulestypescriptcypress+14buildtestlint-formatarch+285/1003 days ago
nerds-odd-e/doughnut.cursor/rules/planning.mdc · 49Cursor rulestypescriptcypress+14teststylearchdo-not+175/1003 days ago
nerds-odd-e/doughnut.cursor/rules/script.mdc · 49Cursor rulestypescriptcypress+14testarch58/1003 days ago
nerds-odd-e/doughnutAGENTS.md · 49AGENTS.mdtypescriptcypress+14no sections47/1003 days ago
nerds-odd-e/doughnutCLAUDE.md · 49CLAUDE.mdtypescriptcypress+14agent-behaviour47/1003 days ago
Diff against .cursor/rules/general.mdc Diff against .clinerules/daisyui.md Diff against .cursor/rules/architecture-decisions.mdc Diff against .cursor/rules/backend-code.mdc Diff against .cursor/rules/backend-testing.mdc Diff against .cursor/rules/cli.mdc Diff against .cursor/rules/db-migration.mdc Diff against .cursor/rules/e2e-authoring.mdc Diff against .cursor/rules/e2e-ocr.mdc Diff against .cursor/rules/frontend-api.mdc Diff against .cursor/rules/frontend-component.mdc Diff against .cursor/rules/frontend-testing.mdc Diff against .cursor/rules/gsd-coexistence.mdc Diff against .cursor/rules/linting_formating.mdc Diff against .cursor/rules/mcp-server.mdc Diff against .cursor/rules/planning.mdc Diff against .cursor/rules/script.mdc Diff against AGENTS.md Diff against CLAUDE.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack