This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Guild Wars 2 inventory management web application built with React and TypeScript, bundled with Vite. Interfaces with the Guild Wars 2 API to fetch and display character and item data.
For detailed information, see:
- Coding Standards - Rules and quality checks
- Architecture - Patterns and context design
- Recent Changes - Refactoring history
- Feature Specs - Feature requirements and plans
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Testing
npm test # Run tests in watch mode
npm run test:run # Run tests once
npm run test:ui # Open Vitest UI
npm run test:coverage # Run tests with coverage
# Code quality
npm run typecheck # TypeScript type checking
npm run lint # ESLint code analysis
npm run lint:fix # ESLint auto-fix
npm run format # Format code with Prettier
npm run format:check # Check code formattingAll AI agents must follow this quality check process before commits:
1. Code Quality Checks (Required - All Must Pass):
npm run test:run && npm run typecheck && npm run format && npm run lint && npm run build2. Documentation Review (Required):
- Review
CLAUDE.mdfor necessary updates - Add significant changes to Recent Changes with timestamps
- Update architecture docs if patterns/approaches change
3. Commit Standards (Required):
- Use descriptive commit messages
- Add Claude Code signature:
🤖 Generated with [Claude Code](https://claude.ai/code) - Add co-authorship:
Co-Authored-By: Claude <noreply@anthropic.com>
- TokenContext - API tokens and account switching
- CharacterContext - Character list and specializations (React Query)
- Static data hooks (
src/hooks/useStaticData/) - React Query hooks for cached GW2 API static data (items, colors, skins, etc.) with IndexedDB persistence - Custom hooks (
useItemsData,useTitlesData, etc.) - Account-specific data
- Path alias
~forsrc/imports - Pathname-based routing for filtering (e.g.,
/characters/elementalist) - URL state via React Router v7
useSearchParams - Type guards for runtime validation
- React.useMemo for expensive computations
/src/contexts/- React Context providers/src/types/- TypeScript type definitions/src/pages/- Route components/src/components/- Reusable UI components/src/hooks/- Custom React hooks/src/helpers/- Utility functions
/characters/:profession?- Character overview with expandable builds/items/:category?- Item inventory/skins/:skinType?- Skins management/dyes/:hue?- Dyes management/account/*- Account pages (overview, wallet, outfits, mounts, gliders, mail carriers, home, masteries)/settings- Token configuration
- Framework: Vitest with jsdom
- Test files:
*.test.tsor*.test.tsxinsrc/ - Patterns: Mock hooks, React Router v7, external dependencies
- TypeScript 5.x, React 19, Chakra UI v2.10, React Router v7
- @tanstack/react-query, @gw2api/types
- IndexedDB (via idb-keyval) for static data caching