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

kamalnrf

flag-quiz

Identify country flags — play solo, compete on the leaderboard
Public
Like
flag-quiz
Home
Code
3
lib
5
README.md
H
main.ts
Connections
Environment variables
Branches
1
Pull requests
Remixes
History
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
/
README.md
Code
/
README.md
Search
…
README.md

Flag Quiz

Create a challenge, share the link, compete with friends on country flag identification.

Live: https://kamalnrf-flag-quiz.val.run

How it works

  1. Create a challenge — pick your name and number of flags
  2. Share the /c/{id} link with friends
  3. Everyone gets the same flags (seeded shuffle), so it's a fair fight
  4. Per-challenge leaderboard shows who's on top

API

POST /challenge              → { name, rounds } → { id }
GET  /c/{id}                 → challenge page (HTML)
GET  /c/{id}/leaderboard     → scores for that challenge
POST /c/{id}/score           → submit { name, score, total, speed_bonus, streak_best }
GET  /quiz?n=5               → standalone random quiz (no challenge)

Scoring

  • 1 point per correct answer
  • Up to 2 speed bonus points (faster = more)
  • +1 streak bonus at 3+ consecutive correct
  • 12-second timer per question
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
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.