📓🙊A simple flash cards app to help you learn Japanese (and other languages!) https://flash-cards.netlify.com
  • JavaScript 87.2%
  • HTML 12.8%
Find a file
Monica Dinculescu dccb93de62
Merge pull request #26 from mcurcija/master
added closeIcon for settings page
2018-07-23 10:10:18 -07:00
images update images 2018-05-14 16:42:20 -07:00
src Merge pull request #26 from mcurcija/master 2018-07-23 10:10:18 -07:00
test regenerate screenshots 2018-06-20 12:10:41 -07:00
.gitignore fix default offline 2018-05-21 14:13:23 -07:00
.travis.yml add more browsers 2018-05-15 12:10:16 -07:00
_redirects no i do not 2018-02-21 16:31:50 -08:00
doit.js add a card that looks like a card 2018-01-28 20:57:02 -08:00
gulpfile.js exclude some things from dist 2018-02-06 11:24:36 -08:00
index.html more ie11 fixes 2018-06-20 14:03:47 -07:00
LICENSE Create LICENSE 2018-06-18 13:46:22 -07:00
manifest.json fix the start url 2018-05-28 11:09:13 -07:00
package-lock.json update deps 2018-06-20 12:00:35 -07:00
package.json use correct 🚾 polyfill 2018-06-20 12:24:19 -07:00
polymer.json need to move redirects to build output, duh 2018-05-15 15:10:36 -07:00
README.md Update README.md 2018-05-24 14:47:08 -07:00
service-worker.js init with pwa-starter-kit 2018-02-02 12:30:41 -08:00
sw-precache-config.js fix precache config 2018-05-15 14:51:42 -07:00
wct.conf.json add unit tests 2018-04-18 16:08:34 +03:00

Built with pwa–starter–kit Build status

Flash Cards

This is a simple flash cards app to help you learn Japanese. It is built using the PWA Starter Kit, using the default template as the starting point and the wiki for configuring and personalizing.

Apart from several game options, flash-cards also comes with a stats page that shows you a heatmap of your answers.

screen shot 2018-03-23 at 6 49 11 pm

Features/highlights

  • uses Redux to handle the application's state
  • this state is also stored and loaded from localStorage, so that the last question asked and the stats are persisted across refreshes
  • uses the SpeechSynthesis API to read out the question being asked
  • the actual cards data is loaded from arbitrary json files, so the app can be extended to work for any language and any set of words being learnt

Setup

git clone https://github.com/notwaldorf/flash-cards
cd flash-cards
npm install
npm start

To run the tests, you can run npm run test.

Build and deploy

To build the app, run npm run build. This will create a build folder that has all the minified bundles and assets you need to deploy. If you want to test that the build output works, you can run

npm run serve

For deployment, I used Netlify's pretty much out-of-the-box setup. These are my deploy settings (so that the app is rebuilt and the bundled app is redeployed every time there's a new commit to master): screenshot of netlify deploy settings

Since this app is structured as an app-shell (the index.html knows how to display the correct route based on the URL, but each URL does not correspond to a standalone view you can just load), I've also added a _redirects file used by the Netlify server tohandle these redirects (read more about that here)

Supported browsers

This app uses the es5-bundled bundle, so that it works on browsers up to IE11, as well as Googlebot (so that it can get indexed).

Performance

Lighthouse:

screen shot 2018-05-15 at 3 12 38 pm

WebPageTest:

Full test results. screen shot 2018-05-15 at 3 18 40 pm

Known Issues

There's a problem with the SpeechSyntesis API on Windows, where I bail out early if I don't find a Voice I can recognize (because there don't seem to be any Japanese languages installed by default on Windows). Should prolly figure out something around this.