Code Monkey home page Code Monkey logo

catsvsdogs's People

Contributors

devpaul avatar dylans avatar tomdye avatar

Watchers

 avatar  avatar  avatar

Forkers

dylans tomdye

catsvsdogs's Issues

Improve admin signin/security

In order to make this a better example application and create better deployments security should be improved around admin

Server

  • Add a required environment variable that holds the super admin password
  • Add Passport to show how Nest and Passport interact
  • Add Permission guards
  • Add a @User() property decorator
  • Add a login endpoint that sets a cookie
  • Add a logout endpoint that deletes the cookie

Add better vote tracking

When users load the app they're automatically given a tracking guid. Unfortunately this guid doesn't persist itself and so a user can register another vote by reloading the app. This feature should prevent the ability to reload and revote by storing the guid in cache or otherwise persisting the identifier.

Use accelerometer for head animation

Use the accelerometer to make the characters behave like bobble heads. If the accelerometer is not present then revert back to the old head bob motion.

Connect Dog/Cat buttons to vote api

When a user selects the cat or dog button the app should generate a UUID to represent the user (if one has not already been generated) and post that UUID and their selection to the server /api endpoint in order to tally the vote

Create a server

Create a server with 2 APIs

  1. Capture API

This API should capture a "vote" by a user choosing either cat or dog.
e.g. POST /user/<uuid>/selection BODY <dog|cat>

  1. Report API

This API should report the current stats
e.g. GET /stats RESPONSE { dog: number; cat: number; }

Websockets would be nice if we have time so we can update live. HTTP RESTful APIs are a good standard.

Add Meow and Woof sounds

Add meow and woof sounds using WebAudio. This is just a basic implementation. We'll add the ability to change pitch later (time permitted)

Upgrade to Dojo 6

  • Use @dojo/cli-upgrade-app to upgrade to Dojo 5
  • Manually update to use Dojo 6 alpha

Add buttons and controls

Add a big "Meow" and "Woof" button below the cat and dog characters (respectively). Button should be large enough that we can get positional information from a touch. If we have time, we'll be changing the pitch of the sounds based on their finger position.

Results page

We need a page that shows the tally of dog & cat votes.

MVP: A PC only page that is readable from a projector screen that says "Dogs" and "Cats" and display numbers from the server; updates periodically via REST.

Desired: A reactive page w/ a bar chart displaying the results of cats vs dogs that updates from the server via websockets

Update README

Update README w/ instructions for Cats vs Dogs, Overview of the project, link to slides, where it's being presented (Half-Stack, Phoenix TypeScript), include logos, build instructions, deployment instructions.

Add mute icon

As a user I may want to mute/unmute the experience

Deployment

We need to consider where we're going to deploy the server. The client will need a static address to connect to the server and tally votes.

Other questions:

Where shall we deploy?
Do we need to dockerize?

Potential deploy points:

https://glitch.com/
https://zeit.co/
codesandbox (client?)
personal server

Add VR

Use A-Frame to alternatively display the characters in VR

Update results fetching

Update the results fetching to use an optional fetch if the initial fetch hasn't happened.

While results are up, fetch should be triggered on a timer.

Add acceptance tests

A live site should have a set of acceptance tests that assert a user matrix.

All endpoints should be asserted that the expected responses are returned for all levels of authorization

  • unauthenticated user
  • admin

Pitch change audio

Change the pitch of the sounds based on where a user places their finger on the Meow or Woof buttons

Administration Panel

It would be useful to have an administration panel that would

  • Login/logout admin
  • Update the configuration
  • delete the results

Add functional tests

We should test the happy path of the application

  • User can select a choice
  • When a user selects a choice the count increments

It would be nice to use Cucumber/Gherkin syntax for these tests

Add head bob web animation

Add a head bob web animation to both of the characters. Also include the web animation polyfill so it works across browsers.

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.