Memo Sequence is a memory game built with React, Vite, Tailwind CSS, and Supabase.
The app is a single-page web app with a lightweight PWA setup, responsive UI, synthetic audio feedback, and a hosted leaderboard.
- The game replays the full digit sequence one digit at a time.
- Each digit is highlighted visually and played with a matching tone.
- As the sequence gets longer, earlier digits are replayed faster while the ending remains easier to read and hear.
- Once the replay ends, the player must enter the full sequence in order.
- Every input is final. There is no undo and no submit button.
- A wrong digit ends the run immediately.
- After a game over, players with a score greater than
0can save their name and score to the leaderboard.
- Mobile-first responsive game board
- On-screen numeric keypad and hardware keyboard support
- Weighted sequence replay with Web Audio API tones
- Distinct digit tones plus a short game-over sound
- Local best-score persistence with
localStorage - Saved player-name persistence with
localStorage - Post-game score save modal with Supabase
/leaderboardroute with:- Top 10 all-time scores
- Latest 10 saved runs
- Lightweight PWA installability
/— game/leaderboard— leaderboard page
- React
- React Router
- Vite
- Tailwind CSS
- Supabase
Create a local environment file such as .env.local with:
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyThe leaderboard UI requires both variables. If they are missing, the game still works locally, but saving scores and loading the leaderboard will not.
The app expects a scores table with public read and insert access through Supabase Row Level Security policies.
Expected columns:
idplayer_namescorecreated_at
Recommended rules:
score >= 0player_namelength between1and24- public
select - public
insert - no public
update - no public
delete
Install dependencies:
npm installStart the development server:
npm run devCreate a production build:
npm run buildPreview the production build locally:
npm run previewThe project includes:
- a web app manifest at public/manifest.webmanifest
- a minimal service worker at public/sw.js
- service worker registration in src/main.tsx
This setup supports installability on compatible browsers, but it is intentionally minimal and does not provide a full offline-first caching strategy.
The app is configured for Vercel with SPA rewrites in vercel.json, so direct access or refresh on /leaderboard resolves back to the client app correctly.
When deploying, make sure the same Supabase environment variables are configured in Vercel:
VITE_SUPABASE_URL
VITE_SUPABASE_ANON_KEY