Skip to content
TchoukoualeuPublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

mboachess

mboachess is a small, free tool for the chess community. The goal is to help promote chess for all Cameroonian players—and anyone who wants to follow friends or teammates on Chess.com—by surfacing public ratings and activity in one place.

The app is a TanStack Start dashboard: a table of blitz and rapid ratings, online-style status, and last seen time. It reads the Chess.com Published-Data (Pub) API on each request. Visitors can submit a Chess.com username; it is stored in MongoDB and merged with the default list in server/home.ts.

Environment

Create .env (or .env.local):

  • MONGODB_URI — required for saving usernames. Use MongoDB Atlas or any MongoDB you control.
  • MONGODB_DB_NAME — optional; default database name is mboachess.
  • VITE_GITHUB_URL — optional override for the GitHub link.
  • VITE_WHATSAPP_URL — optional override for the WhatsApp community link.

If MONGODB_URI is missing, the site still runs and the table works for the static list only; Save will return a 503 from the API.

Development

npm install
npm run dev

Open http://localhost:3000. For production: npm run build then npm start. Run npm run lint before submitting changes.

Changing the player list

  • Admins / defaults: edit the TRACKED_USERNAMES array in server/home.ts (lowercase usernames, as in Chess.com profile URLs).
  • Public submissions: usernames are stored in the player_usernames collection. Chess.com fetch logic is in lib/chesscom.ts; persistence and validation are in lib/chesscomUsernames.ts and lib/mongodb.ts.

Online column

Online is shown when the latest public activity is within about 15 minutes—the newest of: profile last_online and the “last game” time (last.date) on blitz, rapid, or bullet stats. That picks up play activity even when the profile last_online value lags. Chess.com does not offer a true live online flag; this is an approximation. The UI uses a green dot for online and gray for offline.

Stack

  • TanStack Start, TanStack Router, Vite, Nitro, React 19, TypeScript, Tailwind CSS 4, MongoDB (official driver)

Deploy

Build with npm run build and run npm start (Nitro server at .output/server/index.mjs). Deploy to any Node host, or use a Nitro preset for Vercel, Cloudflare, etc. Set MONGODB_URI (and optional MONGODB_DB_NAME) in the project’s environment. Allow your deployment’s outbound IP (or 0.0.0.0/0 for serverless) in MongoDB Atlas Network Access if you use a cluster.

Contributing

Contributions are welcome. Open an issue to discuss ideas, or send a pull request with clear commits and a short description of the change. Please keep the scope focused; match existing code style. Bug fixes, documentation, and small features that help Cameroonian (and all) players follow chess online are especially appreciated.

License

This project is released under the MIT License.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages