mirror of
https://github.com/tiennm99/vngeoguessr.git
synced 2026-10-11 12:29:01 +00:00
The Next.js starter left five SVGs in public/ that nothing references. Eight shadcn primitives were vendored in but rendered nowhere: avatar, form, popover, progress, separator, sheet, table and tooltip. Removing them frees five Radix packages plus react-hook-form, its resolvers and zod, none of which the app had wired up. getAccumulatedScoreMessage was imported by GameClient and never called. getRandomCityLocationFromBbox had no caller at all, so it goes with its tests rather than leaving coverage pointed at unreachable code. The docs claimed a form and validation stack the project never used, and listed components that are no longer vendored.
3.0 KiB
3.0 KiB
Project Structure
Root Directory
CLAUDE.md- Project instructions and guidelines for Claude Codecomponents.json- shadcn/ui configurationpackage.json- Dependencies and scriptsnext.config.mjs- Next.js configurationeslint.config.mjs- ESLint configurationpostcss.config.mjs- PostCSS configurationjsconfig.json- JavaScript project configuration
Source Code (src/)
App Router (src/app/)
Next.js 15 App Router structure:
Pages
page.js- Homepage with city selectionlayout.js- Root layout componentglobals.css- Global stylesfavicon.ico- Site favicon
Game Pages
game/page.js- Main game interfaceleaderboard/page.js- Leaderboard displaydebug/page.js- Development debugging tools
API Routes (src/app/api/)
new-game/route.js- Creates new game sessions with Redis storageguess/route.js- Processes guess submissions and calculates scoresleaderboard/route.js- Leaderboard data management with Redisskip/route.js- Skip current round functionalitydebug/mapillary/route.js- Mapillary API debugging and testing
React Components (src/app/components/)
GameClient.js- Main game client componentLeafletMap.js- Interactive map for guess placementPanoramaViewer.js- 360° street view displayUsernameModal.js- Username input modalDonateQRModal.js- Donation QR code modal
Reusable Components (src/components/)
shadcn/ui Components (src/components/ui/)
Only the primitives the app actually renders are vendored in. Add others with the shadcn CLI when a screen needs them, rather than keeping unused ones around.
alert.jsx- Alert notificationsbadge.jsx- Badge componentsbutton.jsx- Button variantscard.jsx- Card layoutsdialog.jsx- Modal dialogsinput.jsx- Input fieldslabel.jsx- Form labelsskeleton.jsx- Loading skeletonstabs.jsx- Tab navigation
Utility Libraries (src/lib/)
utils.js- Utility functions includingcn()for class name merginggame.js- Game logic, scoring, distance calculations, city definitions, Mapillary delta configleaderboard.js- Leaderboard operations with Redis sorted setsmapillary.js- Mapillary API integration (dart-throw strategy, per-city delta)session.js- Redis-based session management with 30-min expiryupstash.js- Upstash Redis REST client adapter with multi-tenant key prefix support
Documentation (/docs/)
project-overview.md- Project overview and key characteristicsfeatures.md- Detailed game features documentationtech-stack.md- Technology stack and dependenciesdevelopment.md- Development guidelines and commandsgame-flow.md- Complete gameplay flow documentationproject-structure.md- This file - project organization
Planning (/plans/)
- Project planning documents and implementation plans
Public Assets (public/)
*.svg- SVG icons and graphics- Static assets served directly by Next.js