Coder Social home page Coder Social logo

vimark1 / typist Goto Github PK

View Code? Open in Web Editor NEW
41.0 4.0 45.0 4.7 MB

Web app practice and learn touch-typing.

Home Page: https://typistapp.netlify.app

License: MIT License

JavaScript 0.67% HTML 2.83% TypeScript 90.54% Handlebars 1.28% SCSS 4.68%
typing typing-skills typing-trainer typing-practice react firebase

typist's Introduction

Typist

Build Status Join the chat at https://gitter.im/vimark1-typist/Lobby

Touch typing practice web app in which you type short words and aim to achieve better scores.

Demo: https://typistapp.netlify.app/

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need at least node v8.

Installing

Getting the app up and running is pretty simple.

The app uses Firebase for authentication, bundled in the source is a development Firebase version, so you don't need to setup firebase separately.

To get the app up and running, just run npm install and npm start

$ npm install
$ npm start

The console should provide a link to the running app

Running the tests

All the automated tests for the app runs with jest, to run all tests use:

$ npm test

Contributing

Contributions welcome; Please submit all pull requests the against master branch. Or create an issue with a new feature!

typist's People

Contributors

ammarbinfaisal avatar arjunkesava avatar cgduncan7 avatar chamodmalintha avatar clayreimann avatar dependabot[bot] avatar dnivra26 avatar falafel72 avatar fpereira1 avatar ghousahmed avatar gitter-badger avatar katfrog avatar mailtelenko avatar mmendesas avatar musajoshua avatar natstar93 avatar nobuti avatar rahul1995 avatar shefali163 avatar smkamranqadri avatar timeforjakob avatar vimark1 avatar warcops avatar zidail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

typist's Issues

User preferences

Move the nº of words feature into a new preferences route.
Save n of words preference so that next time user comes back it will remember

Stats: Display on Profile the user's top, average and median score

Render user's time top, average and median score

There should be dropdown to allow the user to see top, average and median from a time range:

  • Last 24 hours
  • Last month
  • All time

User sessions are stored in

typist/src/Main/index.js

Lines 187 to 218 in 1f8c297

async saveScore() {
try {
const { user } = this.props;
if (!user.uid) return this.setState({ authError: true });
this.setState({ authError: false, error: '' });
const { score } = this.state;
// a string in the format 2018-10-26
const sessionId = (new Date()).toISOString().slice(0,10);
// store record in Firebase
await firebase
.database()
.ref('user-score')
.child(user.uid)
.child(sessionId)
.push({
score,
timestamp: firebase.database.ServerValue.TIMESTAMP
});
this.updateScoreboard(user, score)
} catch (err) {
console.error(err);
this.setState({
error:
'Something went wrong while saving score, please contact support!'
});
}
}

Desktop App

We need to make it desktop app too, for that we have two options.

  1. Chrome Webstore.
  2. Electron using nativefier.

Domain

Hey @clayreimann and anyone else who's interested
I've just been thinking about getting a domain. I have got a few in mind. Do you?
Also, to help pay for the domain, I'd be keen to add some ads to the app to see how it performs and wether it could be viable, does that sound cool?

Netlify

We’ve been using GitHub pages to host the main app, but I’m keen to host it on netlify as we’d eventually need custom domain https

Spacebar increases/decreases number of words

If we increase/decrease the number of words using mouse, and then continue typing.
If the button is still in focus, space activates the onclick() event and number of words are affected.

As a user I want to add a username

On the signup process or in an area, designated to the profile.
A user should be able to enter a username, this will be used later for leaderboard and etc.

Add Redux to the app

Introduce redux to the app

Try keeping the PR as small as possible, I will review and merge fairly promptly, this is to minimise the work already happening on other branches.

Implement Google login

In #22 we merged Firebase authentication. It currently only works with an email/password combination.

This issue is about introducing some other login options, but particularly Google.

Alternatives to Firebase, PoC, ideas

I like Firebase for this project, because it allows us get away with not using a server, yet, at the same time, this project is becoming more and more dependent on it. I am keen to find any alternatives that we can look into.

I am interested in implementing a PoC on using blockchain. Perhaps a good start can be following the approach described on this article
https://medium.com/@takleakshar/how-to-build-a-decentralized-full-stack-app-in-ethereum-and-react-42e63d45a208

Not compatible with Vimium on Chrome

I have Vimium installed on Chrome, for which I can control the browser without touching of trackpad/mouse.

It seems that typist is not compatible with vimium, because keys are already occupied as hotkeys.

Cheers.

Score Leaderboard

A score leaderboard showing top 10 scores. For now three basic info need to be shown, rank, name or email, and score.

We will need to write firebase cloud function on every score update to analysis if the score is in between the highest and lowest score at that time.

For that, we need to maintain a node top-score, which will have three child node, highest score, lowest score and top-10 score.

Extract user/score related code into separate sagas/reducers

Currently, there is Firebase code scattered all over the app. It would be nice if that code got consolidated into sagas/reducers similar to how the user preferences are handled.

This will require touching (at least) index.js, TypingTest/index, Scoreboard/index. Bonus points if you extract the register/sign in auth code too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.