• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
alexwein

alexwein

thinkalittlelonger

a little game where you think of big words
Public
Like
thinkalittlelonger
Home
Code
5
frontend
6
scripts
1
towniePrompts
3
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
towniePrompts
/
todo.md
Code
/
towniePrompts
/
todo.md
Search
…
Viewing readonly version of main branch: v120
View latest version
todo.md

collecting game data

each submission gets a unique id, two players can submit with the same userName and clubName

Here's what I was thinking for data needed to be collected to support the leaderboard view. Although submitted at is not currently needed, it should be included. if this is insufficient, or could be handled better, make those changes.

  • submission_id

  • game_id

  • club_name

  • user_name

  • submitted_at: timestamp when the user submitted to finish the final round, ending the game.

  • total_points: sum of length of every valid submission, as displayed on the postGame resultsTable.

  • submissions: array of strings containing the words the user played, in order

  • submission_validity : array of booleans of same length of submission, true for valid words and false for invalid,

  • create a file scripts/initDbResults.ts to initialize a game_results table where these are stored.

leadboardBoard view

  • add leaderboard as a gameState.
  • the user transitions to the leaderboard state after they press the submitToLeaderboardButton
  • the leaderboard view displays a scrollable table with the results of every submission of to that club.
  • the results should be sorted by default from most total points to least
  • reuse the roundIndicator, but with an extra unconnected dot for total points, to allow the user to change the sort order to sort by round.
  • if two users have the same total points, use the username as a tiebreaker for sort order.
  • if two users have the same number of points for a round, use the submitted word as the first tiebreaker, followed by user_name.

routing

  • The club name should be autopopulated (but editable) if the user navigated to the app via a path with "/club/{clubname}/" (or "/club/{clubname}" without the terminal "/")
  • if a user inputs the url with a path "/club/{clubname}/leaderboard/" into their browser, that should take them to club leaderboard
  • if there are no player submissions with that club name, indicate "nobody in the club has played yet!"
  • when the user navigates from the postGame to leaderboard gameState, update the path in the browser as well.

add the edited version below here:

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.