This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Agent First website (agentfirst.dev) — a React SPA for an AI agent-first development services company. Includes a public marketing site and authenticated dashboard/settings pages backed by Supabase.
yarn # Install dependencies
yarn dev # Start Vite dev server (localhost:5173)
yarn build # Production build to dist/
yarn preview # Preview production build locally
yarn lint # ESLint (flat config at linter/eslint.config.js)
yarn lint-sql # PostgreSQL SQL formatting checkNo test framework is configured.
Stack: React 18 + Chakra UI 2 + Vite + Supabase (auth & PostgreSQL). Pure JavaScript/JSX — no TypeScript.
Routing (React Router v7, defined in src/App.jsx):
/— Home (landing page with animations)/dashboard— Usage dashboard (authenticated, Chart.js)/settings— Profile/settings (authenticated)
Source layout:
src/config/— Centralized configurationui.js— All magic numbers, colors, fonts, spacing, animation params, component dimensions. Check here first when adjusting any visual constant.uix.jsx— Reusable UI helper componentssupabase.js— Supabase client initialization
src/pages/— Route-level page componentssrc/components/— Shared components (Login, Sidebar)src/paths/— SVG path data stored as.txtfiles, imported with Vite's?rawsrc/markdown/— Markdown content files, also imported as raw stringssrc/theme.js— Chakra UI theme (custom colors, fonts, semantic tokens for light/dark mode, component overrides)
Key patterns:
- All visual constants (colors, fonts, spacing, animation timing, dimensions) are centralized in
src/config/ui.js— never use magic numbers inline. - Chakra UI semantic tokens handle light/dark mode theming in
src/theme.js. - Canvas-based animations use Rough.js for hand-drawn style and Anime.js for timelines, with frame caching for performance.
- Markdown content is parsed with
markdown-itand syntax-highlighted withhighlight.js. - Authentication uses Supabase Auth with magic link email flow; session state managed via
onAuthStateChange. - Supabase tables:
accounts(email, api_token, partners),usage(usage_date, result, count, elapsed_ms).
Build optimization (in vite.config.js): Chakra UI, highlight.js, and other vendors are split into separate chunks. Bundle visualizer generates stats.html.
- This codebase uses JavaScript, not TypeScript. Convert any TypeScript examples or generated code to plain JavaScript.
- Prettier config at
linter/.prettierrc: 100 char width, single quotes, no trailing commas. - ESLint uses flat config format with react, prettier, and jsonc plugins.
- Environment variables prefixed with
VITE_for client-side access.