How I built an anonymous daily leaderboard — and why it resets every night
The article discusses the creation of an anonymous daily leaderboard for a typing site called Clackpit. It emphasizes the importance of reducing barriers to entry for new users and resetting the leaderboard every night to encourage competition. This approach allows users to feel competitive regardless of their skill level, fostering a more engaging experience.
- ▪Clackpit features an anonymous leaderboard that allows users to compete without creating an account.
- ▪The leaderboard resets every night at midnight UTC, giving all users a fresh start each day.
- ▪The implementation uses localStorage for persistent anonymous handles and Cloudflare Workers for leaderboard management.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3911103) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Clackpit Posted on May 18 How I built an anonymous daily leaderboard — and why it resets every night #javascript #gamedev #typescript #webdev Every competitive typing site has a leaderboard. Most of them are terrible. TypeRacer shows you an all-time WPM rank that you'll never crack. MonkeyType has a global top-1000 that's been locked in by dedicated grinders for years. Both create the same problem: if you're not already in the top tier, the leaderboard is demotivating noise.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).