flag-quiz
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.
server.tsx
https://willemhelmet--0199bb04a6257637997b6737af7f2f66.web.val.run
A fun, interactive flag quiz game built with React Router and Hono on Val Town.
Test your knowledge of world flags! Each game presents 10 randomly selected flags with multiple choice questions. Try to identify which country each flag belongs to.
- 55 Country Flags - Diverse selection from around the world
- Random Questions - Each game randomly selects 10 flags with shuffled answer options
- Progress Tracking - Visual progress bar shows your position in the quiz
- Detailed Results - Review all questions at the end with:
- Your score out of 10
- Color-coded correct/incorrect answers
- Side-by-side comparison of your answers vs. correct answers
- Play Again - Restart with a fresh set of random questions
- Responsive Design - Works great on desktop and mobile devices
- React 19 with React Router 7 for routing
- Hono for server-side rendering
- TailwindCSS for styling
- Val Town for hosting
The server.tsx file handles server-side rendering with Hono and React Router. The client.tsx file hydrates the app for client-side interactivity. All game logic runs on the client side with no backend storage required.