Skip to content

Add Match Analytics and Hall of Fame Dashboard "Feature/match analytics"#1

Open
msahil2 wants to merge 9 commits into
sachgaur:mainfrom
msahil2:feature/match-analytics
Open

Add Match Analytics and Hall of Fame Dashboard "Feature/match analytics"#1
msahil2 wants to merge 9 commits into
sachgaur:mainfrom
msahil2:feature/match-analytics

Conversation

@msahil2

@msahil2 msahil2 commented Jun 5, 2026

Copy link
Copy Markdown

Summary

This PR adds Match Analytics and Hall of Fame functionality to CrowdGame.

What I Added

  • Added a match_history table to store completed match results.

  • Tracked match winner, winner score, player count, total puzzle pieces, and completion time.

  • Added /api/history endpoint to fetch recent completed matches.

  • Added Hall of Fame section in the Admin Dashboard.

  • Improved mobile completion screen to show:

    • Winner
    • Completion time
    • Top 3 leaderboard
  • Added README troubleshooting notes for native dependency issues such as sqlite3.

How to Run

npm install
npm run dev

Then open:

  • Admin: https://localhost:3000/admin
  • Screen: https://localhost:3000/screen/DEMO
  • Player: https://localhost:3000/join/DEMO

Default local admin password:

admin123

Native Dependency Note

The upstream repository includes node_modules, so native binaries such as sqlite3 or sharp may be platform-specific.

If the app fails with an error like:

node_sqlite3.node is not a valid Win32 application

please delete node_modules and reinstall dependencies.

Windows PowerShell:

Remove-Item -Recurse -Force node_modules
Remove-Item -Force package-lock.json
npm install
npm run dev

macOS/Linux/Git Bash:

rm -rf node_modules package-lock.json
npm install
npm run dev

Testing Done

  • Admin login tested.
  • Room creation tested.
  • Puzzle start tested.
  • Player join tested.
  • Puzzle completion tested.
  • Match result saved in database.
  • Hall of Fame displays recent match data.
  • Mobile completion screen displays winner, completion time, and leaderboard.

Known Notes

  • The project uses a self-signed HTTPS certificate in development, so browsers may show a security warning.
  • SQLite is used locally when DATABASE_URL is not provided.

msahil2 and others added 9 commits June 5, 2026 10:49
added Troubleshooting Native Dependencies

The upstream repository currently includes a committed `node_modules` directory. In some environments, native modules such as `sqlite3` or `sharp` may contain binaries built for a different operating system or Node.js version.
@msahil2

msahil2 commented Jun 5, 2026

Copy link
Copy Markdown
Author

Testing Performed

  • Created room from Admin dashboard
  • Started puzzle activity
  • Joined using mobile client
  • Verified puzzle completion tracking
  • Verified winner and leaderboard generation
  • Verified Hall of Fame updates after match completion
  • Verified /api/history endpoint returns recent matches

Note:
If sqlite3 native binary issues occur locally, remove node_modules and reinstall dependencies:
npm install

Then run:
npm run dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant