Files
vngeoguessr/CLAUDE.md
T
tiennm99 11bfa59377 docs: codify the conventions the code follows, drop the unused tabs dependency
docs/development.md states the rules the code now enforces or keeps:
server-only modules and the import-graph test (which now also forbids
the daily pick and the region locator from client bundles), route
decides best-effort and the library never swallows, typed failure kinds
mapped to statuses, claim before write, one module per storage concern
through the guarded store, useEffectEvent for imperative callbacks,
unprefixed logical keys, three fixed region levels, and the response
contract. The parameter rule now says what it always meant: React
components destructure props. @radix-ui/react-tabs had no component
using it. Stale lines about tabs, pagination, a leaderboard migration
and a sub-second suite are corrected.
2026-09-21 16:25:53 +07:00

3.2 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Documentation

For detailed information about this project, refer to the documentation files in /docs/:

Quick Reference

Development Commands:

  • npm run dev - Start development server with Turbopack
  • npm run build - Build the application for production
  • npm start - Start production server
  • npm run lint - Run ESLint
  • npm test - Run tests against the in-memory Redis fake (no service needed)
  • npm run test:integration - Same tests against local Redis (npm run redis:up first)

Key Guidelines:

  • JavaScript Only: No TypeScript files (.ts, .tsx)
  • Function Parameters: Use individual parameters, not object destructuring, in library functions, scripts and route helpers. React components take a single props object and destructure it, as every component here does
  • File Modifications: Only modify source code, /docs, and /plans
  • Generated Data: src/data/ is build output; the panorama index lives in Neon Postgres, seeded from gitignored data-build/panos/ artifacts. Change the scripts in scripts/, never the generated files
  • Client Safety: src/lib/pano-index.js and src/lib/pano-db.js are server-only. Client components use src/lib/regions.js
  • Security: Never expose secrets or keys
  • Testing: Run npm test for changes under src/lib/ or src/data/; inform user when complete - they handle manual testing of the UI

Critical Instructions

When working on this codebase, always:

  1. Read the relevant documentation files in /docs/ for context
  2. Follow the JavaScript-only approach with individual function parameters
  3. Maintain server-side security for game sessions, coordinates, and the district a panorama resolved to
  4. Use existing patterns and libraries already present in the codebase
  5. Highlight any configuration file changes for manual processing

This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.

This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.