33 lines
1.7 KiB
Markdown
33 lines
1.7 KiB
Markdown
# Fancy Wordle
|
|
|
|
A Wordle-style game with one shared word for every UTC hour.
|
|
|
|
## Supabase setup
|
|
|
|
The app can enforce the shared hourly word with Supabase/Postgres. Run `supabase/schema.sql` in your Supabase SQL editor, then run `supabase/seed-word-data.sql` to load all answers and accepted guesses.
|
|
|
|
Enable the Email provider in Supabase Auth. The UI signs users in with email and password; if the account is missing, it reveals account creation with username, email, and password. Then fill in `supabase-config.js`:
|
|
|
|
```js
|
|
window.FANCY_WORDLE_SUPABASE = {
|
|
url: "https://your-project.supabase.co",
|
|
anonKey: "your-public-anon-key"
|
|
}
|
|
```
|
|
|
|
The database chooses the word from `public.wordle_words` based on the current UTC hour, so everyone who plays during the same hour gets the same answer. Signed-in users submit guesses through Supabase, which validates guesses, scores tiles, stores completed rounds, and calculates synced stats.
|
|
|
|
The hourly leaderboard uses completed authenticated rounds for the current UTC hour. It ranks wins first, then fewer guesses, then earliest completion time.
|
|
|
|
Leaderboard tabs include this hour, today, and all time. Signed-in users are included even if their row falls outside the top 25. Stats also show the current revealed word definition and this hour's average score summary.
|
|
|
|
`supabase/seed-word-data.sql` is generated from `targetWords.json` and `dictionary.json`:
|
|
|
|
```sh
|
|
node scripts/generate-supabase-word-seed.mjs
|
|
```
|
|
|
|
If Supabase is not configured, the app falls back to a browser-only hourly lock using the same deterministic hourly word calculation from `targetWords.json`.
|
|
|
|
Guest play uses local browser storage. Sign in with email and password to persist scores across devices.
|