This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Emomo is an AI-powered meme search engine frontend built with React 19, TypeScript, and Vite. It features semantic search, a responsive meme grid, and modal detail views with copy/download actions.
npm run dev- Start Vite dev server with HMRnpm run build- TypeScript build + Vite production build todist/npm run lint- Run ESLintnpm run test- Run Playwright e2e tests headlessnpm run test:ui- Run Playwright with UI runnernpm run test:headed- Run Playwright in headed browser mode
index.html -> src/main.tsx -> src/App.tsx (state hub) -> child components
src/components/- React components with co-located CSS modules (Component.tsx+Component.module.css)src/api/index.ts- API client functions (searchMemes, getMemes, getMeme, getCategories)src/types/index.ts- TypeScript interfaces (Meme, SearchResponse, etc.)e2e/- Playwright test specs (*.spec.ts)
Uses React hooks only (useState, useEffect, useCallback, useMemo, useRef). App.tsx is the state hub managing memes, search state, loading states, and modal state. No Redux or external state library.
- CSS Modules for component-scoped styles (import as
stylesobject) - Global CSS variables defined in
src/index.cssfor theming - Framer Motion for animations
Environment variables (copy .env.example to .env):
VITE_API_BASE- Backend API URL (default:http://localhost:8080/api/v1)VITE_API_TOKEN- Optional Bearer token for auth
Demo data fallback exists in App.tsx for offline development.
- 2 spaces indentation, semicolons, single quotes
- Components: PascalCase (
MemeCard.tsxwithMemeCard.module.css) - Hooks:
useSomethingpattern insrc/hooks/when added - Commits: Conventional Commits format (
feat:,fix:,refactor:)