Skip to content

Repository files navigation

RustType icon

RustType

A native macOS typing trainer built with Rust & React.

Practice touch typing with timed sessions, live WPM/accuracy feedback, an on-screen keyboard with finger zones, idle detection with sound alerts, and a full statistics dashboard.

Platform Tauri React Rust License


📸 Screenshots

Practice setup Typing session
Practice Typing
Statistics dashboard Dark theme
Statistics Settings, dark theme

✨ Features

⌨️ Practice

  • Timed sessions — 10 / 15 / 20 / 25 / 30 minutes with an animated countdown ring
  • Two text sources — generated random words (English & Russian word banks) or your own pasted text
  • Live feedback — color-coded characters, blinking caret, real-time WPM · accuracy · error count
  • Virtual keyboard — QWERTY ⇄ ЙЦУКЕН layouts, pressed-key highlight, next-key hint glow, optional touch-typing finger zones
  • Idle detection — stop typing for 5s and you get a warning toast + chime; 15s brings up an alert modal
  • Completion screen — confetti, animated WPM count-up, and a WPM-over-time chart

📊 Statistics

  • Best & average WPM / accuracy, total practice time, day streak
  • 30-day speed and accuracy trend charts
  • Recent session history with per-session details
  • Everything stored locally in SQLite (~/.rusttype/stats.db) — no accounts, no cloud

⚙️ Settings

  • Word-bank language (English / Русский) and keyboard layout
  • Light / dark theme
  • Sound toggle — mutes everything including Rust-side key clicks
  • All preferences persisted between launches

🔊 Sound

All sound effects (key click, error buzz, idle chimes, timer done, whoosh) are synthesized at build time by build.rs and embedded into the binary — the app ships with zero audio assets and zero runtime dependencies.

🏗 Architecture

┌─────────────────────────────┐      invoke / events      ┌──────────────────────────────┐
│   React 19 + TypeScript     │ ◄───────────────────────► │         Rust (Tauri v2)      │
│                             │                           │                              │
│  Practice · Stats · Settings│   register_keystroke,     │  typing_engine  WPM/accuracy │
│  Tailwind v4 · Framer Motion│   timer://tick,           │  timer          daemon+idle  │
│  Recharts · Howler          │   timer://idle-*, ...     │  sound          rodio thread │
│                             │                           │  stats_db       rusqlite     │
└─────────────────────────────┘                           └──────────────────────────────┘
  • typing_engine.rs — sessions, per-keystroke validation, WPM (chars/5 ÷ min) and accuracy math, word banks
  • timer.rs — countdown daemon thread emitting timer://tick|done|idle-warning|idle-alert events
  • sound.rs — dedicated rodio audio thread; all .wavs embedded via include_bytes!
  • stats_db.rs — SQLite persistence: session history, best scores, daily aggregates, streak

🚀 Getting Started

Prerequisites

Development

git clone https://github.com/<you>/RustType.git
cd RustType
npm install
npm run tauri dev

Production build

npm run tauri build

Outputs a ready-to-use app and DMG installer:

src-tauri/target/release/bundle/macos/RustType.app
src-tauri/target/release/bundle/dmg/RustType_<version>_aarch64.dmg

The bundle is ad-hoc signed. For distribution outside your own machine, configure a Developer ID certificate and notarization in tauri.conf.json.

🗂 Project Structure

├── src/                        # React frontend
│   ├── components/
│   │   ├── practice/           # TimerPanel, TypingArea, VirtualKeyboard,
│   │   │                       # TextSourcePanel, IdleOverlay, CompleteScreen
│   │   ├── Sidebar.tsx
│   │   └── TopBar.tsx
│   ├── pages/                  # Practice / Stats / Settings
│   ├── lib/                    # api.ts (typed invoke), settings.tsx, keyboardLayouts.ts
│   └── types.ts                # Mirrors of the Rust structs
└── src-tauri/                  # Rust backend
    ├── src/                    # lib.rs, typing_engine, timer, sound, stats_db
    ├── build.rs                # Synthesizes .wav assets before compilation
    └── generate_sounds.rs

📄 License

MIT

About

Practice touch typing with timed sessions, live WPM/accuracy feedback, an on-screen keyboard with finger zones, idle detection with sound alerts, and a full statistics dashboard.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages