A fun typing racing game built with React and TypeScript where you can test and improve your typing skills.
- Three difficulty levels: Easy, Medium, and Hard
- Three time settings: 30 seconds, 1 minute, and 2 minutes
- Race car that accelerates based on your typing speed
- Real-time statistics: WPM, accuracy, characters typed
- Detailed results and scoring after each race
- Maximum score of 10,000 for each mode and setting
- Error handling and debugging capabilities
- Select your difficulty level and time setting
- Click "Start Typing"
- Type the text as accurately and quickly as possible
- Watch your car race across the track based on your typing speed
- Complete as much text as possible before time runs out
- View your detailed results and score
Your score is calculated based on a combination of correct characters typed and words completed. The formula is designed so that the maximum possible score is 10,000 points, scaled according to the difficulty level and time setting.
- Node.js (version 14 or higher)
- npm or yarn
- Clone this repository
- Navigate to the project directory:
cd typing-racer - Install dependencies:
npm installoryarn install - Start the development server:
npm startoryarn start - Open your browser to:
http://localhost:3000
You can also use the included start script:
chmod +x start.sh
./start.sh
npm start- Starts the development servernpm run build- Builds the app for productionnpm test- Runs the test suitenpm run lint- Checks for linting errorsnpm run lint:fix- Automatically fixes linting errors when possiblenpm run typecheck- Checks TypeScript typesnpm run check- Runs both lint and typecheck
The application includes comprehensive error handling:
- Error boundaries catch and display React component errors
- Console logging for debugging issues
- User-friendly error messages
- Fallback mechanisms for critical functions
Set REACT_APP_DEBUG=true in the .env file to enable additional debugging information. Error messages will be displayed in the console and, when appropriate, in the UI.
- React
- TypeScript
- Styled Components
This project is licensed under the MIT License - see the LICENSE file for details.