Skip to content

ninest/typer

Repository files navigation

The 10-second typing game

Made with Deno Make a PR MIT Buy Me A Coffee

demo

🎮 How to play

  1. Visit https://typerapp.now.sh/
  2. To start a game, type "start"

You now have 10 seconds to type out all the words displayed. For every word you type correctly, your score increases, and you also get 1 extra second. Can you beat my highscore of 35? (you probably can)

🚀 Features

  • 10 seconds to type
    • Get an extra second for each word typed (small change of getting 2 seconds)
    • Randomly get a password field to spice the game up (1/6 chance)
  • Save your highscore locally

🛠 Build setup

Clone or fork the repository, then run the commands to start the development server:

npm i
npm run dev

To build the app, run

npm run build

Encryption

In src/scripts/, create keys.js with the following:

export const key = 'a secret key';

Here's one way to generate a random string:

# python
from base64 import b64encode
from os import urandom

random_bytes = urandom(32)
secret = b64encode(random_bytes).decode('utf-8')

print(secret)

Note that the encryption is done client-side!

Hosting

The game is hosted with Vercel. To host a debug version of the app, run

vc

To host the production version of the app, run

vc --prod

Firebase

Firebase and leaderboards have been removed. Please check the "firebase" branch for more details.

♥️ Support

If you liked this project, consider supporting by

  • ⭐️ Starring the repository
  • 🎒 Checking out my other projects
  • ☕️ Buying me coffee

📜 License

MIT