Code Monkey home page Code Monkey logo

groupwrite.io's People

Contributors

dorweid avatar giladartzi avatar guywarburg avatar idoviron avatar mainyanim avatar rbuenavida avatar ripper234 avatar tamarstern avatar tjstretchalot avatar ulmanb avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

groupwrite.io's Issues

Debug Toolbar should only be viewable with adminKey set

The homepage comes with a "Debug Toolbar".

The admin key is set if someone runs

window.localStorage.setItem('writeio-admin-key', 'nalkFaoKsjd78');

(also runnable as a bookmarklet: javascript:window.localStorage.setItem('writeio-admin-key', 'nalkFaoKsjd78');)

The debug toolbar should only be viewable if someone set the admin key (currently it's visible by default).
No need to check the value of the admin key on the client (the value of the admin key cannot be part of the client codebase), just its existence.

Write a text line

  1. User has a text field where he writes his suggestion
  2. He sees in real-time suggestions from other users (each in their own row)

Ending the game

There should be a "The End" button that counts as a suggestion.
When The End text is selected, the game ends. Players are presented with the finished story, with a suggestion to play again.

Spectator mode

This would be essential before launch (at least internally), in order to understand what's going on in a game / debug it.

"Spectator mode" means viewing a game in progress without participating.

  1. Per game, create a link that enables spectating that game
  2. When the game ends, the link shows "Game finished"
  3. Anyone playing a game should be able to share a link
  4. Admin page shows all running games + links to spectate in them

Queue page should remove a player if they disconnect via socket.io

See test/e2e/test.js, 'Queue page' --> "should kick a player out if they disconnect".

(change xit("...") to it("...") to run the test).

In socket.io disconnect hook we need to identify the playerId and remove them from the queue (+ inform other players). This should probablly be done via sessions, but I wasn't able to consistently share session state between express and socket.io (was able to get it to work sometime).

Probably need to add more tests as well for various edge cases.

Add version number

Should be contained in a file version.txt (e.g. 0.1.2)
And displayed at the footer of the website

Two player mode

While the game is in "launching phase", it's going to be hard to get to three players.
So, we will implement a two player random mode as follow:

While waiting in the queue, if two players are there and both agree, they should be able to launch a two-player version of the game.

In this version in each round the game randomly selects between the two players' suggestions.

Don't send identity of voters to client

Currently every player sees exactly who voted for whom.
The standard client does not display this information, but someone could construct a modified client that does.

The server should not send this info out in the first place.

See router.post('/vote', ... in api.js.

Fix build

Why does Travis run rake?

Locally npm test works, and this is what .travis.yaml contains...

https://api.travis-ci.org/jobs/192658169/log.txt?deansi=true

Worker information
hostname: i-060f240-precise-production-2-worker-org-docker.travisci.net:187b9368-1721-4925-954b-503c223703cd
version: v2.5.0-8-g19ea9c2 https://github.com/travis-ci/worker/tree/19ea9c20425c78100500c7cc935892b47024922c
instance: fb88655:travis:ruby
startup: 1.515079796s
Could not find .travis.yml, using standard configuration.
system_info
Build system information
Build language: ruby
Build group: stable
Build dist: precise
Build id: 192658168
Job id: 192658169
travis-build version: c4c841b3c
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"
fix.CVE-2015-7547
$ export DEBIAN_FRONTEND=noninteractive
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-amd64_Packages.gz is not what the server reported 19576 20785
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages.gz is not what the server reported 19521 20707
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_source_Sources.gz is not what the server reported 5886 5888
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_travis-ci_zero-mq_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 832 1195
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 33653 36677
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-i386_Packages.gz is not what the server reported 33699 36733
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-amd64_Packages.gz is not what the server reported 13782 14904
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages.gz is not what the server reported 13751 14885
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc-bin libc-dev-bin libc6-dev
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc-bin libc-dev-bin libc6 libc6-dev
4 upgraded, 0 newly installed, 0 to remove and 266 not upgraded.
Need to get 8,840 kB of archives.
After this operation, 14.3 kB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.15 [2,943 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.15 [84.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-bin amd64 2.15-0ubuntu10.15 [1,177 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6 amd64 2.15-0ubuntu10.15 [4,636 kB]
Fetched 8,840 kB in 0s (34.2 MB/s)
Preconfiguring packages ...
(Reading database ... 71420 files and directories currently installed.)
Preparing to replace libc6-dev 2.15-0ubuntu10.10 (using .../libc6-dev_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.15-0ubuntu10.10 (using .../libc-dev-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc-bin 2.15-0ubuntu10.10 (using .../libc-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.15-0ubuntu10.15) ...
(Reading database ... 71419 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.10 (using .../libc6_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.15-0ubuntu10.15) ...
Setting up libc-dev-bin (2.15-0ubuntu10.15) ...
Setting up libc6-dev (2.15-0ubuntu10.15) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
git.checkout
0.39s$ git clone --depth=50 --branch=master https://github.com/ripper234/write.io.git ripper234/write.io
Cloning into 'ripper234/write.io'...
remote: Counting objects: 631, done.
remote: Compressing objects: 100% (444/444), done.
remote: Total 631 (delta 150), reused 592 (delta 126), pack-reused 0
Receiving objects: 100% (631/631), 368.79 KiB | 0 bytes/s, done.
Resolving deltas: 100% (150/150), done.
Checking connectivity... done.
$ cd ripper234/write.io
$ git checkout -qf 8b01c3b
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
[33;1mSee https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
rvm
0.12s$ rvm use default
Using /home/travis/.rvm/gems/ruby-1.9.3-p551
$ ruby --version
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
$ rvm --version
rvm 1.26.10 (latest-minor) by Wayne E. Seguin [email protected], Michal Papis [email protected] [https://rvm.io/]
$ bundle --version
Bundler version 1.7.6
$ gem --version
2.4.5
0.10s$ rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in eval' /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in

'
(See full trace by running task with --trace)
The command "rake" exited with 1.
Done. Your build exited with 1.

Player colors

  1. Each player gets assigned a random unique color as the game starts (from a fixed palette, server chooses)
  2. The player's nickname is shown in this color.
  3. The player's contributions to the story are shown in this color (or a version of it). Should not impact readability.

Save finished story

Every finished story should be saved.
The stories should be accessed via a unique link (short GUID + story title)
There should be a page with a list of all stories.

Note on implementation: maybe use github pages for completed stories?

Refactor state.js to use MongoDB or session storage

Currently the web server is stateful, it won't work with two redundant servers.

We need to use some in memory database.
I'm guessing Mongo might be the best fit, but need to do a bit of research.

This also depends on cost: as this is a free project, we have very little budget for servers, and would like the minimize costs. Need to consider where this is going to be deployed.

Format player suggestion into paragraphs

Expected
If a player enters multiple lines into the suggestion box, this should be displayed as multiline.

Actual
Currently the text is displayed in a single line, in a single <p> element.

image

image

Deploy staging server

Need to:

  1. Find a good, cheap/free reliable hosting service for node + database (see #8 ).
  2. Have the Travis CI deploy there (add an npm build task for that).
  3. Add the URL of the deployed server to the Readme.

Configure email MX records

Currently our root domain groupwrite.io is set as a CNAME record to Heroku.
Appearantly, this breaks MX records and means no emails are received by [email protected].

There are a few solutions:

  1. Move to a server that gets an IP address, then switch from CNAME to A Record
  2. Move to a different DNS provider and use Alias, or A Name records. (This article on Heroku mentions DNSimple, DNS Made Easy, easyDNS, PointDNS)
  3. Add CloudFlare and use CNAME there.

adminKey should be configurable with git secret

The admin key is used to authenticate /admin requests
It's value (nalkFaoKsjd78) is currently hard coded.

It needs to be configurable, set outside the environment with something like git secret.

Mocha tests should start web server on different port

Our mocha tests (test.js) start the express web server on the default port 3000.

This means that in order to run tests locally, we need to shutdown the local dev server.
Instead, the tests should use a different port by default e.g. 3001.

Integrate logging solution

Go over all console.log in both server & client, and replace them with proper log() calls with the appropriate error level.

Game Rounds

  1. Whenever a majority of players in a game vote for a suggestion, it wins the current rounds.
  2. It is appended to a Story area that is visible to all players
  3. Current suggestions and votes are cleared

Investigate why VueRouter.history.current always shows '/'

This might be a Vue bug or misuse by us.
Ideally we should use VueRouter's API to check if we're in the queue page in updateStateForPlayer.
Currently, we use a workaround of window.location.hash .

Investigate why router.history.current always shows /, fix our usage or open a bug as needed.

Fix player names

Players names have been broken when some usage of socket.io was converted to API calls.

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.