Code Monkey home page Code Monkey logo

btest's People

Contributors

viroulep avatar

Watchers

 avatar  avatar  avatar

btest's Issues

Improve games management

  • Full games index should only be available to admin.
  • The landing page should display two tabs:
    • current (pending or started) competitions
    • past (finished or aborted) competitions
  • Games should be able to be started/aborted only by their creator

Provide an "analyze playlist" feature

Some tracks are listed through the deezer API but are not actually readable.
We filter them on the fly, but it may be frustrating to not precisely which tracks are not available.

We could create a button to "analyze playlist" on the "create game" view, that would query the deezer API for the tracklist, and display in a modal which tracks are not available.

Server tests

It's API only so it should be fairly easy to test the expected behavior through rspec.

Autoplay requires the user to have interacted with the page before

We create and programatically start an Audio object, which is considered as autoplay by web browsers.
By default they actually don't play it, unless the user made an explicit interaction with the webpage (such as focusing a field, clicking a link, ...).
We auto-focus the input, which means that a user can actually open a direct link to the game and be ready to type in an answer without having interacted with the page (which also means the preview won't be played...).
We should create a modal to inform the user they are joining a game, which will make interact with the page.

Localize the client

Although i18n is implemented, the string are not yet extracted.
We should do that, and go through internationalize to get the French translation.

@zeecho ? ;)

I used the rails infrastructure for i18n (which means strings are to be put in the usual server/config/locales/locale.yml), then running bin/rails i18n:exports will create the appropriate js exports at the appropriate place in the client (generated_locales is a symlink to there).
In the js files it's just a matter of doing import I18n from 'i18n-js';, and using the helper just as in a rails app (I've added an example here).

Restarting the server stops the games

Because the jobs use the default queue, it's executed by the same process as the server.
So if it restarts, the queued jobs are lost.
We should simply use an adapter running in a different process (eg: DelayedJobs).

Create games from user-provided deezer playlists

It could be one, it could be multiple :

  • if #9 is implemented, we could display the current user's public playlists
  • in any case, we could let them add up to N < 15 public playlist to pick songs from

When creating the game :

  • pick one of N playlist, pick 1 song from it
  • repeat until we have 15 songs
    It's better than just concatenating all songs and picking 15, as it gives equal weight for all playlists.

Store i18n user's preference server side

For non anonymous users, we should:

  • send a PUT to the server whenever the user changes its session locale
  • send a locale attribute in the me object
  • update the function getting the user's preference to first take a look at the me object

Create some specific look and feel

The client is using vanilla material ui, it could be nice to come up with a specific set of colors (primary/secondary) to make it feel less like a default theme.

Proper handling for requests exceptions

Request may fail if something wrong happens with the server.
Currently they are silently ignore, we should figure out a common way to handle them (maybe some common Snackbar?).

Improve the landing page

Clearly describe what the website is intended for (and what is it not!), describe the basic features and such, and provide alternative websites in case it doesn't match their expectations.

Cleanup for anonymous users

Basically there will be a lot of them, and they change every time the browser is closed.
We should implement a job that delete any anonymous user created more than 7 days ago (arbitrary).

Single sign in from different providers

Currently the workflow only supports a 1-1 relation between the local user and the provider's user.
It would be nice to let them sign in from multiple providers into the same local account.
We could use the email address to identify them across providers.
Tricky part: what if they change email in one of their provider?

This requires fairly serious work, and should be done later.

Sign in with deezer

omnioauth has an adapter for it, but it's outdated.
It shouldn't be too hard to refresh/reimplement it.

Implement an "admin" status for users

This will require very basic user management capabilities on the API.
It's fine if the first user has to be marked as admin on the rails console.

Setup reproducible development and production environment

Most likely use chef to provision the given environment, assuming it runs from a fresh debian install.

Other things to consider:

  • a docker image to build the client code (provide a dockerfile for the client, create a container based on it, mount /client, and get the result in /client/build.
  • a docker image containing the stuff needed to start the whole app (for a production image, it's basically a fresh container + running chef)

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.