rybbit/CLAUDE.md
Bill Yang 15fd0dad08 Update dependencies and enhance live session location fetching
- Added `@react-three/drei` and `@react-three/fiber` for improved 3D rendering capabilities.
- Introduced `d3-geo` and `three` libraries to support geographical data visualization.
- Modified `useGetLiveSessionLocations` hook to accept a `minutes` parameter for dynamic time-based queries.
- Updated server-side API to handle the new `time` query parameter for fetching live session locations.
- Refactored `RealtimePage` to replace `RealtimeMap` with `RealtimeGlobe` for enhanced visual representation.
2025-04-10 19:08:21 -07:00

950 B

FrogStats Code Guidelines

Commands

Client (Next.js)

  • Build: npm run build
  • Dev: npm run dev (port 3002 with turbopack)
  • Lint: npm run lint
  • Start: npm run start (port 3002)

Server

  • Build: npm run build
  • Dev: npm run dev (builds and runs)
  • DB: npm run db:generate|migrate|push|pull|check|drop

Code Style

  • TypeScript: Strict typing, interfaces for API/props
  • React: Functional components, Tanstack Query, Zustand
  • Formatting: Arrow functions, async/await, named exports
  • Naming: camelCase for functions/variables, PascalCase for components
  • Structure: Client (Next.js + Tailwind + Shadcn), Server (Fastify + Drizzle + ClickHouse)
  • Error Handling: Proper checking in API endpoints, appropriate messages in UI
  • Documentation: JSDoc for utilities, descriptive function names
  • Theme: Dark mode by default

FrogStats is a self-hostable open source Google Analytics alternative.