A terminal-based TypeRacer game built with React, OpenTUI, and Convex.
- ๐ฎ Solo Practice Mode - Race against the clock with different text categories
- ๐ Multiple Text Categories - Quotes, Code snippets, and Random words
- ๐จ Configurable Themes - Tokyo Night (default), Dark, and Light themes
- โก Real-time WPM Calculation - Live stats as you type
- ๐ Detailed Results - WPM, accuracy, consistency, and error tracking
- ๐ Sound Effects - Terminal bell for errors and completion
- ๐ฅ๏ธ Responsive Design - Works in terminals as small as 80x24
# Install globally
npm install -g ttyper
# Or run without installing
npx ttyper# Clone the repository
git clone https://github.com/divquan/ttyper.git
cd ttyper
# Install dependencies
bun install
# Run the game
bun run dev- Splash Screen - Watch the animated logo and progress bar
- Main Menu - Navigate with arrow keys, Enter to select
- Solo Practice - Configure your race:
- Text category (Quotes, Code, Random Words)
- Duration (15s, 30s, 60s, Unlimited)
- Difficulty (Easy, Medium, Hard)
- Race - Type the displayed text as fast and accurately as possible
- Green = Correct
- Red = Error
- Yellow = Current position
- Results - View your performance stats
- Press
Rto race again - Press
Mfor main menu
- Press
- Navigation: Arrow keys (โโ), Enter to select
- Typing: Any printable characters, Backspace to delete
- Quit Race: ESC
- Exit App: ESC from menu, or Ctrl+C
To enable multiplayer features:
-
Run Convex initialization:
npx convex dev
-
Follow the prompts to create a new project
-
The schema will be automatically deployed
-
Multiplayer features will be available in Phase 2
src/
โโโ components/
โ โโโ screens/ # Screen components (Splash, Menu, Race, etc.)
โ โโโ ui/ # Reusable UI components
โ โโโ shared/ # Shared components (ThemeProvider, etc.)
โโโ hooks/ # Custom React hooks
โโโ types/ # TypeScript type definitions
โโโ utils/ # Utility functions
convex/
โโโ schema.ts # Convex database schema
โโโ README.md # Convex setup instructions
Edit src/utils/textGenerators.ts:
export const textCategories: TextCategory[] = [
// ... existing categories
{
id: 'poetry',
name: 'Poetry',
icon: '๐',
description: 'Classic poetry excerpts',
difficulty: 'medium',
generator: generatePoetry
}
]Edit src/utils/themes.ts:
export const myTheme: GameTheme = {
background: '#000000',
foreground: '#ffffff',
// ... other colors
}
export const themes = {
// ... existing themes
myTheme: myTheme
}- Solo practice mode
- Multiple text categories
- Configurable themes
- WPM/accuracy tracking
- Sound effects
- โ Multiplayer races via Convex
- โ Real-time lobby system
- โ Quick play matchmaking
- User statistics persistence (Coming Soon)
- Chat system (Coming Soon)
- Spectator mode (Coming Soon)
- Achievement system
- Custom text upload
- API integration for quotes
- Advanced animations
- Sound pack options
- OpenTUI - Terminal UI framework
- React - UI library
- Convex - Backend and real-time sync
- Bun - JavaScript runtime
We welcome contributions! Please see our Contributing Guide for details on how to get started.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
See CHANGELOG.md for a history of changes.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.