How ezcraftid/taopat works
TaoPat is a realtime browser patting game: a player interacts with the character, the client sends pat activity to the server, and server-validated totals feed live regional leaderboard updates. The client also presents local combo, records, stamps, visual/audio effects, and background music. The graph includes server-side abuse controls, SQLite-backed state, and deployment path handling. Server excerpts are partial, so several detailed routes and persistence relationships are omitted rather than inferred.
Main entry points: server.js HTTP and socket server · app.js Pat input and live UI · index.html Game page · config.js Runtime configuration
Components 18
Browser game
- Game page
public/index.html - Pat input and live UI
public/js/app.js - Combos and records
public/js/game.js - Pat effects and audio
public/js/fx.js - Background music
public/js/music.js - Menu controls
public/js/menu.js - Game assets
public/assets
Realtime server
- HTTP and socket server
server.js - Abuse controls
lib/guard.js - Game state store
server.js - Regional leaderboard
server.js - IP region lookup
server.js
Shared services
- Base-path handling
lib/basepath.js - Shared game rules
public/js/tao-core.js
Runtime support
- Runtime configuration
config.js - Graceful shutdown
lib/shutdown.js
Other components
- Player
- Web browser
Connections 24
- Player → Game page: opens
README.md - Player → Pat input and live UI: pats
README.md - Game page → Pat input and live UI: loads
- Pat input and live UI → HTTP and socket server: sends pats
- HTTP and socket server → Pat input and live UI: pushes updates
README.md - Pat input and live UI → Combos and records: updates stats
- Pat input and live UI → Pat effects and audio: triggers
public/js/fx.js - Pat input and live UI → Background music: enables playback
public/js/music.js - Game page → Menu controls: loads
- Pat effects and audio → Game assets: loads audio and images
public/js/fx.js - Background music → Game assets: loads tracks
public/js/music.js - HTTP and socket server → Abuse controls: checks connections
server.js - HTTP and socket server → Abuse controls: limits activity
server.js - HTTP and socket server → Game state store: reads and saves
server.js - HTTP and socket server → Regional leaderboard: publishes totals
server.js - Regional leaderboard → Pat input and live UI: streams regions
README.md - HTTP and socket server → IP region lookup: looks up regions
server.js - HTTP and socket server → Runtime configuration: loads settings
server.js - HTTP and socket server → Base-path handling: handles prefixes
server.js - Base-path handling → Shared game rules: uses helpers
lib/basepath.js - Runtime configuration → Abuse controls: loads limits
config.js - Runtime configuration → Shared game rules: normalizes paths
config.js - HTTP and socket server → Graceful shutdown: runs teardown
server.js - Web browser → Game page: renders