Skip to content

richer-richard/Downpour

Repository files navigation

Downpour

Downpour is a macOS-first Tauri desktop typing game in a pnpm monorepo. Words fall like rain in a neon city scene. Type words before impact, keep lives alive, and prevent the waterline from flooding the run.

Tech Stack

  • Monorepo: pnpm workspaces
  • Desktop shell/backend: Tauri v2 + Rust
  • Frontend: React + Vite + TypeScript (strict)
  • Styling: Tailwind CSS
  • Persistence: SQLite (rusqlite) in app data directory (downpour.db)

Workspace Layout

  • apps/downpour-desktop: Tauri app + frontend
  • packages/shared: shared TypeScript contracts + validators

Build-From-Source Install (macOS)

Downpour is currently distributed as a macOS build-from-source installation. The GitHub release does not include a notarized app bundle.

./install.sh will:

  • verify or install Xcode Command Line Tools, Homebrew, Node.js >= 22, pnpm, and Rust
  • install workspace dependencies with pnpm
  • build Downpour.app locally from source
  • copy Downpour.app into /Applications
  • remove repo-local build artifacts after installation completes

The first build can take a few minutes on a fresh machine.

Install

git clone https://github.com/richer-richard/Downpour.git
cd Downpour
./install.sh

If you prefer to manage the toolchain manually, make sure these are available first:

  • Node.js >= 22
  • pnpm >= 10
  • Rust stable toolchain (rustup)
  • Xcode Command Line Tools

Refresh the built-in word corpus from SCOWL:

pnpm update:wordlist

This downloads SCOWL en_US.txt and en_US-large.txt, filters them into gameplay-safe lowercase words, and updates apps/downpour-desktop/src/assets/wordlists/.

Development (Tauri desktop app)

pnpm dev

This runs:

  • frontend Vite dev server on http://localhost:1420
  • Tauri desktop host via cargo tauri dev

Startup Smoke Checklist

After running pnpm dev, verify:

  1. A native macOS window opens titled Downpour.
  2. Start screen is visible (title + Start, Records, Settings buttons).
  3. Press Start and confirm words are falling and HUD metrics update.

Lint

pnpm lint

Typecheck

pnpm typecheck

Build (Tauri)

pnpm build

This runs the repo-pinned Tauri build via pnpm --filter downpour-desktop tauri build.

Releases

  • Releases are source-first and rely on GitHub's autogenerated source archives.
  • Install a tagged release by downloading or cloning the release source and running ./install.sh.
  • No notarized .app, .zip, or .dmg is attached to the release.

Optional test commands

Frontend tests:

pnpm --filter downpour-desktop test

Rust tests:

cargo test --manifest-path apps/downpour-desktop/src-tauri/Cargo.toml

Persistence Details

  • DB file: <app_data_dir>/downpour.db
  • Tauri commands:
    • get_records
    • save_record
    • get_best_wpm
    • set_best_wpm
    • reset_records
  • SQLite settings:
    • PRAGMA journal_mode=WAL
    • PRAGMA synchronous=FULL
    • PRAGMA foreign_keys=ON

Controls

  • Type letters: lock and progress falling words
  • Backspace: rewind target progress
  • Esc: pause/resume
  • Missed words increase waterline and reduce lives
  • Game ends when lives reach 0 or waterline reaches threshold

Troubleshooting

  • If pnpm build fails with Tauri toolchain errors, verify:
    • xcode-select -p
    • rustc --version
    • pnpm --version
  • If the app cannot open WebView resources, ensure Vite port 1420 is available.
  • If you run frontend only (pnpm --filter downpour-desktop dev), Tauri commands fall back to browser localStorage stubs.
  • If macOS warns on first launch after installation, open Downpour.app from Finder or allow it in System Settings.

Word Source

  • Updater script: scripts/update-wordlists.mjs
  • Upstream source: SCOWL generated word lists from https://github.com/en-wl/wordlist-diff
  • License notice copied into apps/downpour-desktop/src/assets/wordlists/SCOWL-Copyright.txt