This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
VISCA is a Next.js application that displays school information with an interactive map interface. It integrates with Google Sheets for dynamic data fetching and uses OpenLayers for map visualization.
- Development server:
npm run dev(starts on http://localhost:3000) - Build:
npm run build - Production server:
npm start - Linting:
npm run lint
- Framework: Next.js with Pages Router (not App Router)
- Styling: Tailwind CSS with shadcn/ui components
- Map Library: OpenLayers (ol package)
- UI Components: Radix UI primitives with custom styling
src/pages/: Next.js pages (index.js is main page)src/components/: React components organized by purposelayout/: Header and Footer componentsmap/: Map-related components (MapContainer, Map, InfoSheet, PlaceInfoSheet)ui/: shadcn/ui components (button, dialog, accordion, etc.)
src/lib/: Utility functionssrc/styles/: Global CSS and Tailwind styles
- School data can come from Google Sheets API or fallback to local
data.json - Main page uses
getStaticPropswith 60-second revalidation - Order preservation is critical - data should maintain spreadsheet order
- Environment variables required:
SPREADSHEET_ID,GOOGLE_SERVICE_ACCOUNT_EMAIL,GOOGLE_PRIVATE_KEY
MapContainer: State management for map interactions and modalsMap: OpenLayers integration with markers for schools, places, and hotelsInfoSheet/PlaceInfoSheet: Modal dialogs for displaying detailed informationList: Displays school information in structured format
- Uses Tailwind CSS with custom configuration
- Dark theme with gradient backgrounds
- Custom fonts: Inter for sans-serif, Roboto Mono for monospace
- shadcn/ui components configured for JSX (not TSX)
- Path aliases:
@/componentsand@/lib/utils
- Data Order: Never sort or reorder school data - preserve original spreadsheet order
- Error Handling: Always fall back to local data.json if Google Sheets fails
- Environment: Requires environment variables for Google Sheets integration
- Map Integration: Uses custom pin markers and location data from school records