Skip to content

ryanjosephkamp/brrrdle-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

226 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ„๏ธ brrrdle

A polished Wordle + Hurdle hybrid โ€” daily puzzles, chained sessions, and an icy brrr aesthetic.

React TypeScript Vite Tailwind CSS Vitest PWA

Guess the word. Then guess five more. Stay frosty. ๐ŸงŠ


โœจ What is brrrdle?

brrrdle is a mobile-first, accessible, production-minded word game that blends two beloved formats:

  • og mode โ€” classic single-puzzle, Wordle-style play.
  • go mode โ€” chained five-puzzle, Hurdle-style play where solved answers pre-fill carry-over rows into the next puzzle.

It ships with guest progress, optional cloud accounts, post-game definitions, emoji sharing, an in-app economy, and Progressive Web App foundations โ€” all wrapped in a dark-first UI with icy brrr accents.

Project status: v1 launch scope plus approved addenda through Phase 18 (answer-difficulty tiers, Word Explorer / Go / Settings polish, and the daily-overlap fix) are implemented; Phase 19 (enhanced statistics visualizations, a configurable Go puzzle count, full resume-most-recent-game activation, advanced polish, and a light theming foundation) is planned and awaiting approval. Production deployment requires explicit release approval after PR review โ€” do not trigger a production deploy without it.


๐ŸŽฎ Features

Core gameplay

  • ๐ŸŸฉ Exact Wordle tile coloring, including correct duplicate-letter accounting, from a single canonical source of truth.
  • ๐Ÿ”— go chained sessions of five puzzles with carry-over pre-fills between rounds.
  • ๐Ÿง  Hard Mode for og and go, in both daily and practice contexts.
  • ๐Ÿ“… Daily puzzles fixed at 5 letters; Practice supports word lengths 2 through 35.
  • โŒจ๏ธ Physical keyboard + on-screen keyboard input with clear loading, empty, error, and invalid-guess states.

Progression, economy & stats

  • โญ XP, levels, and coins earned through play.
  • ๐Ÿ›’ Consumables โ€” Reveal One Letter and Remove Incorrect Letters.
  • ๐Ÿ’ธ Pay-to-Continue in daily and practice, scaled by word length and completion.
  • ๐Ÿ“Š Per-mode statistics (og vs go) tracked from day one.

Words, definitions & discovery

  • ๐Ÿ“š Local curated word lists for every length 2โ€“35 (hundreds of thousands of real English words).
  • ๐ŸŽš๏ธ Answer-difficulty tiers (Casual / Standard / Expert) that subset the answer pool only โ€” valid guesses stay identical across tiers.
  • ๐Ÿ” Post-game definitions with a graceful lookup chain: bundled data โ†’ Dictionary API โ†’ Wiktionary โ†’ an always-available Search Google button.
  • ๐Ÿงญ Word Explorer tab for browsing and inspecting the dictionary.

Accounts, sharing & platform

  • ๐Ÿ‘ค Guest play with full local progress, coins, levels, stats, settings, and history.
  • โ˜๏ธ Optional Supabase accounts with email verification, cloud sync, and a guest-to-account transfer prompt.
  • ๐ŸŸฆ๐ŸŸจโฌœ Classic emoji sharing generated from canonical tile states.
  • ๐Ÿ Ranked Practice Multiplayer with a transparent Elo model documented in docs/ranked-multiplayer.md.
  • ๐Ÿ“ฑ PWA shell with offline caching where reasonable.
  • ๐Ÿ”Š Toggleable sound effects and a Feedback tab.
  • ๐Ÿ›ก๏ธ Protected admin route (/api/admin-refresh) for word-list refresh, gated by Supabase auth + an admin role.

๐ŸงŠ Why brrrdle?

  • Faithful, not fragile. Tile coloring, Hard Mode, and sharing all consume one canonical engine โ€” never re-implemented per surface.
  • Accessible by default. Targets WCAG AA: semantic controls, visible focus, keyboard-only navigation, reduced-motion support, and readable contrast.
  • Offline-friendly data. Word lists are bundled locally, so daily play stays fast and resilient.
  • Governed & auditable. Every change follows a written constitution, a phased plan, and per-phase progress reports.

๐Ÿš€ Quick start

# 1. Install dependencies from the lockfile (reproducible)
npm ci

# 2. Start the dev server
npm run dev

Then open the printed local URL (Vite defaults to http://localhost:5173).

Use npm install only when you intentionally change dependencies; otherwise prefer npm ci.

Optional: configure Supabase (for accounts/sync)

cp .env.example .env.local
# then fill in your public Supabase project URL + anon key (see "Environment variables" below)

Guest mode is fully playable without any Supabase configuration.


๐Ÿ› ๏ธ Tech stack

Layer Technology
UI framework React 19 + TypeScript
Build tooling Vite 8 (@vitejs/plugin-react)
Styling Tailwind CSS v4 (@tailwindcss/vite)
Testing Vitest
Linting ESLint + typescript-eslint + React Hooks/Refresh plugins
Accounts / sync Supabase (@supabase/supabase-js)
Hosting (game) Vercel (serverless API routes + cron)
Hosting (docs) GitHub Pages + Jekyll (docs/)
PWA Service worker + web manifest

๐Ÿ“œ Available scripts

Script Description
npm run dev Start the Vite dev server with HMR.
npm run build Type-check (tsc -b) and produce the production bundle in dist/.
npm run preview Serve the built dist/ locally to smoke-check production output.
npm run test Run the Vitest unit-test suite once.
npm run lint Lint the project with ESLint.

Recommended verification before a PR

npm run lint
npm run test
npm run build
npx tsc -p tsconfig.api.json --noEmit   # type-check the serverless API project

๐Ÿ” Environment variables

Copy .env.example to .env.local and provide public Supabase values only:

VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_ANON_KEY=your-public-anon-key
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your-public-anon-key
  • VITE_* values are public and shipped in the browser bundle โ€” use only the public project URL and anon key.
  • SUPABASE_URL / SUPABASE_ANON_KEY are server-side aliases used by /api/admin-refresh; they should point to the same public URL and anon key.
  • Never commit secrets, service-role keys, JWT signing secrets, database passwords, or any privileged credentials.

๐Ÿงฉ Supabase & admin setup

See docs/supabase.md for schema, Row-Level Security, account sync, and admin-role guidance. The browser client uses only the public project URL and anon key; admin roles must be assigned through a secure Supabase dashboard or server-side process โ€” never from browser code.

The protected refresh endpoint is POST /api/admin-refresh. It requires a Supabase bearer token for a user whose app_metadata.role is admin (or whose app_metadata.roles contains admin):

Caller Response
Unauthenticated 401
Authenticated, non-admin 403
Authenticated admin Refresh acknowledgement

๐Ÿšข Deployment targets

  • Game: Vercel, using npm run build and the dist/ output configured in vercel.json.
  • Blog / docs: GitHub Pages + Jekyll from docs/.

See docs/deployment.md for deployment and verification checklists (environment-variable warnings, PWA asset checks, and production smoke checks).


๐Ÿ“ฑ Progressive Web App

brrrdle registers a service worker and ships a web manifest so it can be installed and remain usable offline where reasonable. Word-list handling is optimized so daily mode loads quickly and gameplay stays smooth.


๐Ÿ—‚๏ธ Repository structure

brrrdle/
โ”œโ”€โ”€ api/                     # Vercel serverless functions and server-only helpers
โ”‚   โ”œโ”€โ”€ _lib/                # Word-list persistence adapters (Vercel Blob)
โ”‚   โ”œโ”€โ”€ cron/                # Scheduled word-list refresh endpoint
โ”‚   โ”œโ”€โ”€ word-lists/          # Public word-list manifest endpoint
โ”‚   โ””โ”€โ”€ admin-refresh.ts     # Protected admin refresh route
โ”œโ”€โ”€ docs/                    # GitHub Pages / Jekyll documentation site
โ”œโ”€โ”€ progress/                # Phase progress CSV, template, and step reports
โ”œโ”€โ”€ public/                  # Static PWA assets, icons, manifest, service worker
โ”œโ”€โ”€ src/                     # React application and shared TypeScript modules
โ”‚   โ”œโ”€โ”€ account/             # Supabase auth, guest storage, sync, settings UI
โ”‚   โ”œโ”€โ”€ admin/               # Admin authorization helpers and admin panel
โ”‚   โ”œโ”€โ”€ app/                 # App shell, routing, navigation
โ”‚   โ”‚   โ””โ”€โ”€ games/           # Playable og/go route panels
โ”‚   โ”œโ”€โ”€ data/                # Word-list loading, validation, refresh, cache, daily selection
โ”‚   โ”‚   โ””โ”€โ”€ bundled/         # Historical bundled fallback word-list seed
โ”‚   โ”œโ”€โ”€ definitions/         # Post-game definition lookup and rendering
โ”‚   โ”œโ”€โ”€ feedback/            # Feedback tab UI
โ”‚   โ”œโ”€โ”€ game/                # UI-independent game engine and gameplay helpers
โ”‚   โ”‚   โ”œโ”€โ”€ go/              # Go-mode session state logic
โ”‚   โ”‚   โ”œโ”€โ”€ input/           # Keyboard normalization and input hook
โ”‚   โ”‚   โ”œโ”€โ”€ og/              # Og-mode session state logic
โ”‚   โ”‚   โ””โ”€โ”€ storage/         # Daily in-progress session local-storage helpers
โ”‚   โ”œโ”€โ”€ latest/              # Local curated per-length word-list JSONs (lengths 2โ€“35)
โ”‚   โ”œโ”€โ”€ lib/                 # Cross-feature, non-game-specific utilities
โ”‚   โ”œโ”€โ”€ progression/         # XP, levels, coins, consumables, Pay-to-Continue
โ”‚   โ”œโ”€โ”€ pwa/                 # Service worker registration
โ”‚   โ”œโ”€โ”€ sound/               # Toggleable Web Audio sound effects
โ”‚   โ”œโ”€โ”€ stats/               # Statistics model and dashboard UI
โ”‚   โ”œโ”€โ”€ test/                # Shared test helpers and testing docs
โ”‚   โ”œโ”€โ”€ types/               # Shared ambient/type-only declarations
โ”‚   โ”œโ”€โ”€ ui/                  # Reusable UI primitives and layout controls
โ”‚   โ””โ”€โ”€ wordExplorer/        # Word Explorer data helpers and tab UI
โ”œโ”€โ”€ supabase/                # Supabase migrations and setup assets
โ”œโ”€โ”€ .env.example             # Placeholder environment-variable documentation
โ”œโ”€โ”€ eslint.config.js         # ESLint configuration
โ”œโ”€โ”€ index.html               # Vite HTML entry point
โ”œโ”€โ”€ package.json             # npm scripts and dependency manifest
โ”œโ”€โ”€ tsconfig*.json           # TypeScript project references and compiler configs
โ”œโ”€โ”€ vercel.json              # Vercel build and cron configuration
โ””โ”€โ”€ vite.config.ts           # Vite + React + Tailwind configuration

๐Ÿงญ Governance & authoritative sources

brrrdle is built under a strict, written governance model. When in doubt, these documents win โ€” in this order:

  1. CONSTITUTION.md โ€” binding rules for scope, review gates, verification, security, and conduct.
  2. BRRRDLE-SPEC.md โ€” the product specification.
  3. BRRRDLE-OVERVIEW.md โ€” the approved project plan.
  4. AGENT-IMPLEMENTATION-PLAN.md โ€” root shim for the active lightweight plan and the archived full historical plan.
  5. CHANGELOG.md โ€” root shim for historical and Phase 24 changelog locations.
  6. planning/ โ€” current planning hub, specs, history, and testing strategy.
  7. progress/ โ€” per-phase progress reports and PROGRESS.csv.

The agent workflow is model-agnostic โ€” any sufficiently capable coding model (e.g., Claude Opus 4.8) can drive it.


๐Ÿค Contributing

This project follows a phase-gated, verification-first workflow:

  1. Read the governance docs first โ€” CONSTITUTION.md, then BRRRDLE-SPEC.md, then AGENT-IMPLEMENTATION-PLAN.md and the relevant planning files it links to.
  2. Make small, cohesive, reviewable changes tied to the current phase. Avoid speculative refactors and out-of-scope features.
  3. Preserve canonical logic โ€” never duplicate tile-coloring or Hard Mode rules; consume the shared engine.
  4. Verify before you finish โ€” run npm run lint, npm run test, npm run build, and npx tsc -p tsconfig.api.json --noEmit.
  5. Never weaken or remove tests to make a phase pass, and never commit secrets.
  6. Update the changelog and progress artifacts when a phase requires it, then halt for review at the relevant gate.

โ™ฟ Accessibility & ๐Ÿ”’ security at a glance

  • Accessibility: WCAG AA targets โ€” semantic controls, visible focus, keyboard-only navigation, dialog accessibility, status announcements, readable contrast, and reduced-motion support.
  • Security: no committed secrets; no service-role privileges in browser code; Row-Level Security for user data; server-side admin authorization; imported word/definition data treated as untrusted; safe external-link behavior for new tabs.

Built with โ„๏ธ and care. Stay frosty.

About

Independent development repository for brrrdle Phase 24+ work

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors