How aifanfou/nightreign-map works
Nightreign Seed Finder lets players narrow map seeds by choosing a map, Nightlord, and building slots, then inspect a matching result. Its main flow is map selection → interactive slot configuration → seed filtering → result map. A separate OCR service detects game-map details from captured screens or uploaded images and supports live overlay updates and optional SMS. The repository also includes update notices and feedback/reporting endpoints. The OCR service’s full orchestration and frontend integration are only partially evidenced by the sampled excerpts, so those links are kept limited.
Main entry points: main.py OCR API · MapBuilder.tsx Map Builder · updateManager.ts Update Notices · page.tsx Map Selection
Components 25
Seed Finder
- Map Selection
src/app/page.tsx - Map Builder
src/components/MapBuilder.tsx - Seed Search
src/hooks/useSeedSearch.ts - Seed Matching
src/lib/data/seedSearch.ts - Result Page
src/app/result/[id]/page.tsx
Map Experience
- Result Map
src/components/MapResult.tsx - Interactive Map
src/components/BaseMap/BaseMap.tsx - Slot Markers
src/components/BaseMap/hooks/useMarkerManager.ts - Map Coordinates
src/lib/constants/mapCoordinates.ts
OCR Service
- Capture Page
src/app/capture/page.tsx - OCR Controls
src/components/OCRCaptureControl.tsx - Capture Client
src/hooks/useOCRCapture.ts - OCR API
ocr-service/app/main.py - Screen Capture
ocr-service/app/capture/screen_capture.py - Frame Processing
ocr-service/app/capture/frame_processor.py - Game Detection
ocr-service/app/detection - Overlay Updates
ocr-service/app/websocket/manager.py - SMS Messaging
ocr-service/app/messaging/imessage.py
Updates And Feedback
- Update Notices
src/lib/updates/updateManager.ts - Update Preferences
src/lib/updates/storage.ts - Usage Logging
src/app/api/log/route.ts - Bug Reports
src/app/api/report-bug/route.ts
Other components
- Player
- Supabase
src/lib/supabaseClient.ts - SMS Provider
Connections 26
- Player → Map Selection: chooses map
- Player → Map Builder: sets slots
- Map Selection → Map Builder: opens builder
- Map Builder → Interactive Map: renders map
- Map Builder → Seed Search: filters selections
- Seed Search → Seed Matching: queries seeds
- Map Builder → Result Page: opens match
- Result Page → Result Map: renders result
- Interactive Map → Slot Markers: manages markers
- Slot Markers → Map Coordinates: reads coordinates
- Player → Capture Page: opens capture
- Capture Page → OCR Controls: shows controls
- OCR Controls → Capture Client: uses capture
- OCR API → Screen Capture: captures monitor
- OCR API → Frame Processing: extracts map region
- OCR API → Game Detection: runs detection
- OCR API → Overlay Updates: broadcasts updates
- OCR API → SMS Messaging: sends messages
- SMS Messaging → SMS Provider: delivers SMS
- Player → Update Notices: views notices
- Update Notices → Update Preferences: reads preferences
- Update Notices → Update Preferences: saves preferences
- Player → Usage Logging: submits usage
- Player → Bug Reports: reports bug
- Usage Logging → Supabase: inserts logs
- Bug Reports → Supabase: inserts reports