How vixvify/bangmod-guesser works
This is a Next.js location-guessing game with public play and administration. Players enter a game, inspect location imagery, submit timed map guesses, and review round scores and a final summary; the game service owns scoring and game-state operations. Admins manage locations and images, users, and dashboard reporting. The README also documents authentication, profiles, leaderboards, rate limiting, and Cloudflare R2 storage. Arrows are limited to relationships shown by excerpts, the source index, or README; several feature internals were not sampled.
Main entry points: container.ts Service composition · locations Location API · game.service.ts Game rules · location.service.ts Location management
Components 25
Game play
- Game screens
src/features/game/components/game-session.tsx - Game API
src/app/api/games - Game rules
src/features/game/server/game.service.ts - Game persistence
src/features/game/server/game.repository.ts - Scoring and distance
src/shared/lib/game-scoring.ts
Identity and users
- Sign-in screens
src/features/auth/components/auth-layout.tsx - Session API
src/app/api/session - Authentication
src/features/auth/server/auth.service.ts - User administration
src/features/users/server/user.service.ts
Admin content
- Location admin
src/features/locations/components - Location API
src/app/api/locations - Location management
src/features/locations/server/location.service.ts - Location records
src/features/locations/server/location.repository.ts - Image storage service
src/features/images/server/image.service.ts
Player and admin insights
- Admin dashboard
src/features/dashboard - Leaderboard
src/features/leaderboard - Player profile
src/features/profile
Application platform
- Route security
src/shared/lib/security/route.ts - Request validation
src/shared/lib/validation.ts - API responses
src/shared/lib/api-response.ts - Runtime configuration
src/shared/config/runtime.ts - Service composition
src/container.ts
Other components
- Player
- Cloudflare R2
- PostgreSQL
Connections 29
- Player → Game screens: plays
README.md - Game screens → Game API: requests game
- Game API → Service composition: gets services
src/app/api/games/route.ts - Service composition → Game rules: wires
src/container.ts - Game rules → Game persistence: uses repository
- Game rules → Scoring and distance: calculates scores
src/features/game/server/game.service.ts - Game rules → Location records: selects locations
- Sign-in screens → Session API: submits credentials
- Session API → Service composition: gets services
src/app/api/session/login/route.ts - Service composition → Authentication: wires
src/container.ts - Location admin → Location API: manages locations
- Location API → Service composition: gets service
src/app/api/locations/route.ts - Service composition → Location management: wires
src/container.ts - Location management → Location records: reads and writes
src/features/locations/server/location.service.ts - Location management → Image storage service: uploads images
src/features/locations/server/location.service.ts - Service composition → Image storage service: wires
src/container.ts - Image storage service → Cloudflare R2: stores images
README.md - Admin dashboard → Service composition: gets service
src/app/api/dashboard/route.ts - Service composition → Admin dashboard: wires services
src/container.ts - Leaderboard → Service composition: gets service
src/container.ts - Service composition → Leaderboard: wires services
src/container.ts - Player profile → Service composition: gets service
src/app/api/profile/route.ts - Service composition → Player profile: wires services
src/container.ts - Route security → Runtime configuration: reads policy
src/shared/lib/security/route.ts - Route security → Authentication: checks session
- Location API → Route security: guards routes
src/app/api/locations/route.ts - Location API → Request validation: validates input
src/app/api/locations/route.ts - Location API → API responses: formats output
src/app/api/locations/route.ts - Service composition → PostgreSQL: repositories persist