This file documents the skills needed to work with this codebase.
- Frontend: React 19 + TypeScript
- Build: Vite 7
- Desktop: Tauri 2 (Rust backend)
- Styling: TailwindCSS 4 + Radix UI components
- State: Zustand + Dexie (IndexedDB)
- Editor: Monaco Editor
- Testing: Vitest + Playwright
- Validation: Zod 4
- Package Manager: pnpm
pnpm dev- Start the Vite dev server on port 61570pnpm tauri dev- Start the Tauri desktop app with Vite
pnpm test- Run unit tests with vitestpnpm test:watch- Run unit tests in watch modepnpm e2e- Run end-to-end tests with Playwrightpnpm e2e:ui- Run e2e tests with Playwright UIpnpm e2e:headed- Run e2e tests in headed mode
pnpm lint- Run ESLintpnpm lint:fix- Run ESLint with auto-fixpnpm ts:lint- Run TypeScript type checkingpnpm prettier:fix- Run Prettier with auto-fixpnpm prettier:check- Check Prettier formatting
The project uses husky for pre-commit hooks which run:
- ESLint on staged files
- Prettier on all files
pnpm commit- Create a conventional commit using commitizenpnpm release:patch- Release a patch versionpnpm release:minor- Release a minor versionpnpm release:major- Release a major version
- Components use PascalCase:
MyComponent.tsx - Hooks use camelCase with
useprefix:useSnippets.tsx - Utils/providers use camelCase:
snippetUtils.ts - Test files use
.test.tsor.test.tsxsuffix - Pages are in
src/components/layout/pages/
- Uses TailwindCSS 4 with
cn()utility for class merging - Components use Radix UI primitives wrapped with class-variance-authority
- Theme switching via
useThemehook andThemeProvider
- Global state via custom store in
src/lib/store/globalState.ts - Settings stored in localStorage with migration support
- API providers for snippet operations in
src/lib/providers/ - Snippet APIs: GitHub (
src/lib/api/github-api.ts), GitLab (src/lib/api/gitlab-api.ts), Local (src/lib/api/local-api.ts)
- Unit tests co-located with source files using
.test.tsor.test.tsx - E2E tests in root
e2e/directory - Uses
@testing-library/reactfor React component testing
- Translations stored in
public/locales/as JSON files (en.json, fr.json, es.json, de.json, ru.json, zh.json, ja.json) - Key structure:
list.viewAsList,list.viewByTags,list.viewByLanguages - Add new keys to all locale files when adding UI text