This repository is a Vite + React 18 + TypeScript application for A-B looping, shadowing recording, transcripts, and AI-assisted language-learning workflows.
- Applies to the entire repository unless a deeper
CLAUDE.mdoverrides it. - Prefer small, focused changes that preserve existing UX patterns and state behavior.
- Read the relevant files before editing.
- Prefer
rg/rg --filesfor search. - Make minimal, targeted edits.
- Do not revert user changes you did not make.
- Avoid unrelated refactors unless they are required to complete the task safely.
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS, Radix UI, Framer Motion
- State: Zustand
- Routing: React Router
- i18n:
src/i18nwith locale JSON files insrc/i18n/locales
- Preserve the current component structure under
src/components,src/pages,src/hooks,src/stores, andsrc/utils. - When changing user-facing copy, update translations in:
src/i18n/locales/en.jsonsrc/i18n/locales/ja.jsonsrc/i18n/locales/zh.json
- Reuse existing UI primitives from
src/components/uibefore creating new ones. - Follow the established Zustand store patterns instead of introducing new global state approaches.
- Keep browser-only behavior compatible with Vite client execution.
- Treat audio, media, transcript, and recording flows as sensitive areas that need careful regression avoidance.
- Run targeted validation after changes when possible.
- Common commands:
npm run buildnpm run lint
- Summarize what changed, note any risks, and mention validation performed.
- If checks were not run, say so explicitly.