How 5h0xib/chess-online works
Chess Online is a browser-based chess platform. Players authenticate, reach the dashboard, then start local AI games or find friends and challenge them; online games synchronize moves and status through Supabase. The product also includes profiles and presence, social requests, in-game chat, notifications, and finished-game history. The graph separates page workflows, game logic, social features, and backend configuration. Edges reflect calls or data access visible in excerpts, or capabilities explicitly documented in the README; unsampled wiring is omitted.
Main entry points: game.js Game orchestration · friends.js Friend management · dashboard.html Player dashboard · friends.html Friends page
Components 19
Player workflows
- Sign-in page
index.html - Player dashboard
dashboard.html - Friends page
friends.html - Game page
game.html - History page
history.html - Dashboard logic
js/dashboard.js
Chess gameplay
- Chess rules and AI
js/chess-engine.js - Game orchestration
js/game.js - Game chat
js/chat.js - Game layout preferences
js/layout.js
Social and history
- Friend management
js/friends.js - Notifications and challenges
js/notifications.js - Game history
js/history.js
Backend and presentation
- Authentication
js/auth.js - Theme preferences
js/theme.js - Supabase client setup
js/supabase-client.js - Database schema and RLS
supabase/schema.sql
Other components
- Player
- Supabase services
Connections 23
- Player → Sign-in page: signs in
README.md - Player → Player dashboard: opens hub
README.md - Player → Friends page: finds friends
README.md - Player → Game page: plays chess
README.md - Player → History page: reviews games
README.md - Player dashboard → Dashboard logic: runs
README.md - Friends page → Friend management: runs
README.md - Game page → Game orchestration: runs
README.md - History page → Game history: runs
README.md - Game orchestration → Chess rules and AI: uses rules and AI
README.md - Game orchestration → Supabase services: syncs moves and status
js/game.js - Game chat → Supabase services: reads and sends chat
js/chat.js - Friend management → Notifications and challenges: subscribes to requests
js/friends.js - Friend management → Supabase services: manages social data
js/friends.js - Notifications and challenges → Supabase services: handles challenges
js/notifications.js - Dashboard logic → Supabase services: reads games and friends
js/dashboard.js - Game history → Supabase services: loads finished games
js/history.js - Authentication → Supabase services: authenticates and updates profiles
js/auth.js - Supabase client setup → Supabase services: configures client
js/supabase-client.js - Database schema and RLS → Supabase services: defines tables and policies
README.md - Game orchestration → Game chat: enables online chat
- Player → Game layout preferences: customizes layout
js/layout.js - Player → Theme preferences: switches theme
js/theme.js