https://github.com/codesignal/learn_typing-simulator-game
Typing simulator with games for engaging practices!
https://github.com/codesignal/learn_typing-simulator-game
Last synced: 22 days ago
JSON representation
Typing simulator with games for engaging practices!
- Host: GitHub
- URL: https://github.com/codesignal/learn_typing-simulator-game
- Owner: CodeSignal
- License: other
- Created: 2025-11-29T23:35:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-05T17:27:48.000Z (23 days ago)
- Last Synced: 2026-03-05T19:59:17.507Z (23 days ago)
- Language: JavaScript
- Size: 135 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Typing Simulator Game
Typing practice app with three modes:
- `classic`: standard text typing
- `racing`: race opponents while typing
- `meteoriteRain`: destroy falling word meteorites by typing them
## Setup
```bash
git submodule update --init --recursive
npm install
```
## Run
```bash
# local development (Vite on 3000 + API server on 3001)
npm run start:dev
# production build output to dist/
npm run build
# serve dist/ on 3000
npm run start:prod
```
`npm start` maps to `npm run start:prod`.
## Configuration
Runtime behavior is controlled by `client/config.json`:
- `gameType`: `classic`, `racing`, or `meteoriteRain`
- `keyboard`: show/hide visual keyboard
- `availableKeys`: allowed keys (empty array means all keys)
- `showStats`: show final stats dashboard
- `realTimeStats`: enabled live metrics (`speed`, `accuracy`, `time`, `errors`, `errorsLeft`, `chars`)
- `racing`: mode-specific config (`opponentSpeeds`, `mistakesAllowed`)
- `meteoriteRain`: mode-specific config (`meteoriteSpeed`, `spawnInterval`, `pointsPerChar`, `difficulty`)
## Main Files
- `client/index.html`: app shell and mode containers
- `client/typing-simulator.js`: core gameplay and stats logic
- `client/typing-simulator.css`: gameplay styles
- `client/app.css`: shared shell/layout styles
- `client/app.js`: help modal bootstrap
- `client/design-system/components/modal/modal.js`: design-system modal used for help
- `client/help-content.html`: help text shown in the modal
- `client/text-to-input.txt`: source text used for typing
- `server.js`: `/save-stats`, production static hosting
- `extract_solution.py`: parses and prints `client/stats.txt`
## API Endpoints
- `POST /save-stats`
- Body: plain text payload
- Persists results to `client/stats.txt`.
## Notes
- Help content is loaded from `client/help-content.html` and shown via `Modal.createHelpModal` from the design system when `#btn-help` is clicked.
- In development, Vite serves static assets and proxies `/save-stats` to the API server.