How bhattaraidipesh060-gif/puzzle-world works
PuzzleWorld is an offline-first Android escape-room game with a web portal and Node/SQLite sync backend. Players solve themed-room puzzles locally, then sync progress; account, daily-challenge, leaderboard, and badge features extend that loop. The README documents the broader game and portal capabilities, while sampled code confirms selected sync, auth, progress, and challenge flows. Several Android screens and web modules were not sampled, so their internal wiring is left unasserted.
Main entry points: server.js API Server · database.js SQLite Database · app.js Web Portal · MainActivity.kt Puzzle Gameplay
Components 23
Android Game
- Game Home
app/src/main/java/com/jeiu/puzzleworld/HomeActivity.kt - Puzzle Gameplay
app/src/main/java/com/jeiu/puzzleworld/MainActivity.kt - Puzzle Mechanics
app/src/main/java/com/jeiu/puzzleworld - Daily Challenge
app/src/main/java/com/jeiu/puzzleworld/DailyChallengeActivity.kt - Local Progress
app/src/main/java/com/jeiu/puzzleworld/LocalStorage.kt - World Repository
app/src/main/java/com/jeiu/puzzleworld/WorldRepository.kt - HTTP Sync
app/src/main/java/com/jeiu/puzzleworld/HttpWorldService.kt
Backend API
- API Server
backend/server.js - Authentication
backend/routes/auth.js - Token Security
backend/lib/security.js - Auth Middleware
backend/middleware/auth.js - Room Catalogue
backend/routes/rooms.js - Progress Sync
backend/routes/progress.js - Daily Challenge
backend/routes/challenges.js - Player Stats
backend/routes/stats.js - Profile Badges
backend/routes/profile.js - Badge Evaluation
backend/badges.js
Persistent Data
- SQLite Database
backend/database.js
Web Portal
- Web Portal
backend/public/app.js - Web Authentication
backend/public/auth.js - Portal Mini-Games
backend/public/games
Other components
- Player
- Portal Visitor
Connections 28
- Player → Game Home: plays
README.md - Game Home → Puzzle Gameplay: enters
- Puzzle Gameplay → Puzzle Mechanics: uses mechanics
- Puzzle Gameplay → Local Progress: saves progress
- Game Home → Daily Challenge: opens challenge
- Puzzle Gameplay → World Repository: loads world
- World Repository → HTTP Sync: delegates sync
app/src/main/java/com/jeiu/puzzleworld/HttpWorldService.kt - HTTP Sync → API Server: HTTP requests
README.md - API Server → Authentication: routes auth
backend/server.js - API Server → Room Catalogue: routes rooms
backend/server.js - API Server → Progress Sync: routes progress
backend/server.js - API Server → Daily Challenge: routes challenges
backend/server.js - API Server → Player Stats: routes stats
backend/server.js - API Server → Profile Badges: routes profile
backend/server.js - Authentication → Token Security: uses security
backend/routes/auth.js - Auth Middleware → Token Security: verifies tokens
backend/middleware/auth.js - Authentication → SQLite Database: reads and writes
backend/routes/auth.js - Room Catalogue → SQLite Database: reads catalogue
backend/routes/rooms.js - Progress Sync → SQLite Database: reads and writes
backend/routes/progress.js - Daily Challenge → SQLite Database: reads and writes
backend/routes/challenges.js - Player Stats → SQLite Database: reads stats
backend/routes/stats.js - Profile Badges → Badge Evaluation: evaluates badges
backend/routes/profile.js - Profile Badges → SQLite Database: reads profile
backend/routes/profile.js - API Server → Web Portal: serves static files
backend/server.js - Portal Visitor → Web Portal: visits
README.md - Web Portal → Web Authentication: uses login
- Web Portal → Portal Mini-Games: offers games
README.md - Web Portal → API Server: uses API