This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a monorepo using Yarn workspaces with the following structure:
- service/app: Next.js 14 application (main frontend)
- shared/design: Design system with Storybook and Tailwind CSS
- shared/lib: Shared utilities and fetch client
- shared/eslint: Shared ESLint configurations
- shared/figma-plugin: Figma plugin for extract figma style using mcp
- shared/types: Shared TypeScript types
yarn test:all- Run all tests across workspacesyarn lint:all- Run linting across all workspacesyarn type-check:all- Run type checking across all workspacesyarn ci- Run complete CI pipeline (test, type-check, lint)yarn commit- Use Commitizen for conventional commits
yarn workspace @ject-5-fe/app dev- Start Next.js development serveryarn workspace @ject-5-fe/app build- Build for productionyarn workspace @ject-5-fe/app test- Run unit tests with Vitestyarn workspace @ject-5-fe/app test:msw- Run MSW integration testsyarn workspace @ject-5-fe/app test:all- Run all tests (unit + MSW)yarn workspace @ject-5-fe/app test:e2e- Run Playwright E2E testsyarn workspace @ject-5-fe/app lint- ESLint with auto-fixyarn workspace @ject-5-fe/app type-check- TypeScript type checking
yarn workspace @ject-5-fe/design storybook- Start Storybook developmentyarn workspace @ject-5-fe/design test- Run Storybook testsyarn workspace @ject-5-fe/design generate-icons- Generate icons from SVG
The main app follows FSD architecture:
- entities/: Business entities (game, auth) with API, models, and UI
- widgets/: Independent UI blocks (GameSection, HeroSection)
- app/: Application configuration and routing
- Zustand: For client-side state management (useGameStore)
- TanStack Query: For server state and API caching
- Context + Reducer: For complex component state (game creation)
- MSW (Mock Service Worker): API mocking for development and testing
- Custom fetch client with interceptors in
shared/lib/fetchClient.ts - API functions organized by entity in
entities/*/api/
- Vitest: Unit testing with browser mode using Playwright
- MSW: Integration testing with mocked APIs
- Playwright: E2E testing (tests in
**/__tests__/**/*.spec.tsx) - Storybook: Component testing and documentation
Uses conventional commits with custom types including "rule" for Cursor Rules changes.
- Shared ESLint config across workspaces
- Prettier with Tailwind CSS plugin
- Lint-staged for pre-commit hooks
- Unit tests:
**/*.test.ts - E2E tests:
**/__tests__/**/*.spec.tsx - MSW tests: Use
vitest.msw.config.ts - E2E Test Scenarios: See detailed guidelines in
.cursor/rules/guides/test-spec.mdc
- All file names must be camelCase (not PascalCase or kebab-case)
- Component names use PascalCase (in the code, not file names)
- Follow Feature-Sliced Design architecture with strict layer dependencies
- See detailed conventions in
.cursor/rules/guides/folder-structure-convention.mdc
- Main branch:
main(deployed version) - Development branch:
dev(staging) - Feature branches:
feature/*(created fromdev) - Always run
yarn installwhen switching branches - See full process in
.cursor/rules/guides/development-convention.mdc
- English only - Korean commits will fail
- Format:
type(scope): description - Allowed types: feat, fix, docs, style, refactor, test, chore, ci, build, revert, rule
- Use
yarn commitfor guided conventional commits
- Figma design tokens available via MCP integration
- Follow semantic token naming:
color/purpose/detail/state - See token conventions in
.cursor/rules/figma/design-token-convention.mdc
- Development:
yarn dev(runs on localhost:3000) - Figma Integration: MCP servers configured for Figma plugin and Playwright
- Build: Uses Vercel for deployment
Use the unified radix-ui package instead of individual @radix-ui/* packages:
// ✅ Correct - Components
import { RadioGroup, Dialog, Form } from "radix-ui"
// ✅ Correct - Internal hooks (use~ prefix)
import { useControllableState } from "radix-ui/internal"
// ❌ Wrong - Legacy individual packages
import * as RadioGroup from "@radix-ui/react-radio-group"
import { useControllableState } from "@radix-ui/react-use-controllable-state"For comprehensive development guidelines and conventions, refer to the cursor rules in .cursor/rules/:
- Development workflow:
.cursor/rules/guides/development-convention.mdc - Folder structure:
.cursor/rules/guides/folder-structure-convention.mdc - Design tokens:
.cursor/rules/figma/design-token-convention.mdc - MSW usage:
.cursor/rules/guides/msw-usage-convention.mdc - Playwright E2E testing:
.cursor/rules/guides/playwright-convention.mdc - Test writing convention:
.cursor/rules/guides/test-convention.mdc - Test specifications:
.cursor/rules/guides/test-spec.mdc