How unicorntechnology2026/the-indian-edit-game works
The repository implements a browser-based branded game: players register, complete three interactive levels, receive a calculated result, and can share or claim a reward. A separate admin area supports sign-in, dashboard management, and analytics. The README describes setup rather than product behavior; workflow detail comes from the source index and sampled files. Some admin and game modules were not sampled in full, so their internal relationships are shown only where the index or excerpts support them.
Main entry points: App.tsx Experience router · GameContext.tsx Game state · adminApi.ts Admin data API · Level1DecodeTheBottle.tsx Decode bottle
Components 29
App entry and state
- App bootstrap
src/main.tsx - Experience router
src/App.tsx - Game state
src/context/GameContext.tsx
Player experience
- Login and OTP
src/components/Screens/LoginScreen.tsx - Game welcome
src/components/Screens/WelcomeScreen.tsx - Decode bottle
src/components/Screens/Level1DecodeTheBottle.tsx - Decode intro
src/components/Screens/DecodeTheBottleIntro.tsx - Master blend
src/components/Screens/Level2MasterTheBlend.tsx - Hunt the edit
src/components/Screens/Level3HuntTheEdit.tsx - Hunt game board
src/components/HuntTheEdit/GameBoard.tsx - Hunt round data
src/data/huntData.ts
Results and rewards
- Social post
src/components/Screens/SocialPostScreen.tsx - Share card
src/components/ShareCard/ShareCard.tsx - Screenshot upload
src/components/Screens/UploadScreen.tsx - Scratch reward
src/components/Screens/ScratchCardScreen.tsx - Scratch reveal
src/components/ScratchCard/ScratchReveal.tsx - Reward catalog
src/data/rewards.ts - Leaderboard
src/components/Modals/LeaderboardModal.tsx
Admin console
- Admin routing
src/admin/AdminApp.tsx - Admin sign-in
src/admin/AdminLogin.tsx - Admin dashboard
src/admin/AdminDashboard.tsx - Analytics overview
src/admin/AnalyticsOverview.tsx - Analytics calculations
src/admin/analytics.ts - Admin data API
src/admin/adminApi.ts
Data and utilities
- Game data access
src/lib/supabaseClient.ts - Supabase
- Personality scoring
src/data/personalities.ts - Sound engine
src/utils/audio.ts
Other components
- Player
Connections 37
- Player → App bootstrap: opens
src/main.tsx - App bootstrap → Experience router: routes players
src/main.tsx - App bootstrap → Admin routing: routes admin
src/main.tsx - Experience router → Game state: provides state
src/App.tsx - Experience router → Login and OTP: renders
src/App.tsx - Experience router → Game welcome: renders
src/App.tsx - Experience router → Decode bottle: renders
src/App.tsx - Experience router → Master blend: renders
src/App.tsx - Experience router → Hunt the edit: renders
src/App.tsx - Experience router → Social post: renders
src/App.tsx - Experience router → Screenshot upload: renders
src/App.tsx - Experience router → Scratch reward: renders
src/App.tsx - Decode bottle → Game state: updates score
src/components/Screens/Level1DecodeTheBottle.tsx - Decode bottle → Decode intro: renders
src/components/Screens/Level1DecodeTheBottle.tsx - Hunt the edit → Hunt game board: renders
src/components/Screens/Level3HuntTheEdit.tsx - Hunt the edit → Hunt round data: uses rounds
src/components/Screens/Level3HuntTheEdit.tsx - Hunt game board → Hunt round data: reads
src/components/HuntTheEdit/GameBoard.tsx - Social post → Share card: renders
src/components/Screens/SocialPostScreen.tsx - Scratch reward → Scratch reveal: renders
src/components/Screens/ScratchCardScreen.tsx - Scratch reward → Reward catalog: selects reward
src/components/Screens/ScratchCardScreen.tsx - Game state → Personality scoring: computes result
src/context/GameContext.tsx - Game state → Reward catalog: selects reward
src/context/GameContext.tsx - Game state → Game data access: inserts registration
src/context/GameContext.tsx - Game data access → Supabase: reads and writes
src/lib/supabaseClient.ts - Leaderboard → Game data access: loads leaderboard
src/components/Modals/LeaderboardModal.tsx - Admin routing → Admin sign-in: renders
src/admin/AdminApp.tsx - Admin routing → Admin dashboard: renders
src/admin/AdminApp.tsx - Admin sign-in → Admin data API: authenticates
src/admin/AdminLogin.tsx - Admin dashboard → Admin data API: loads and manages data
src/admin/AdminDashboard.tsx - Admin dashboard → Analytics overview: renders
src/admin/AdminDashboard.tsx - Analytics overview → Analytics calculations: uses calculations
src/admin/AnalyticsOverview.tsx - Analytics overview → Admin data API: loads data
src/admin/AnalyticsOverview.tsx - Analytics calculations → Admin data API: reads data
src/admin/analytics.ts - Admin data API → Supabase: queries admin data
src/admin/adminApi.ts - Decode bottle → Sound engine: plays sounds
src/components/Screens/Level1DecodeTheBottle.tsx - Master blend → Sound engine: plays sounds
src/components/Screens/Level2MasterTheBlend.tsx - Hunt the edit → Sound engine: plays sounds
src/components/Screens/Level3HuntTheEdit.tsx