groupwrite-io / groupwrite.io Goto Github PK
View Code? Open in Web Editor NEWA realtime collaborative writing game
Home Page: http://groupwrite.io/
License: MIT License
A realtime collaborative writing game
Home Page: http://groupwrite.io/
License: MIT License
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.
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.
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.
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.
Should be contained in a file version.txt (e.g. 0.1.2
)
And displayed at the footer of the website
(Doesn't do anything)
Something we want to experiment with, is to use a preselected writing prompt from /r/WritingPrompts.
This should give players focus and might help to write a better story.
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.
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
.
Where do we want to be in Apr 1 2017?
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:ineval' /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.
The two pages (home-page and game-page) are implemented using plain v-if
- it's probablly better to move them to use Vue Components.
We don't own write.io, it might be quite costly. Should probably think of a different name.
When there is some error (e.g. in all API json calls), show an error popup and ask to email [email protected]
Currently this is done via alerts, need to change to some proper UI element.
This code is duplicated between the index & admin views
<div id='game-page'>
<h1>List of players</h1>
<ol>
<li v-for="player in players">
${ player.nickname }
</li>
</ol>
</div>
Need to decide whether it's a static link, or perhaps a floating ribbon:
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?
Should be moved from api.js
to admin.js
, and the URLs should contain /admin/
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.
All admin endpoints (in api.js
or admin.js
if #54 was done already) should validate the admin key.
Need to:
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:
Look for various values which are inline in the server code, and move them to a common config file.
Look for // TODO Config
in the code (not all values that need to move are labeled as such)
(Sample config layout from https://github.com/madhums/node-express-mongoose-demo)
GPL, Unlicense, ... ?
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
.
(In order to save a separate HTTP request)
http://stackoverflow.com/questions/41921081/audio-assets-not-found-in-vue-webpack
(Look for TODO Security
)
Our tests were broken by restructuring the project using vue-cli, we need to restore them.
They worked in commit b91cdf287903387aca675365ce99866ab2dcb1ac.
Currently they reside, commented out, inside test/e2e/specs/test.js ... need to be revived.
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.
Go over all console.log
in both server & client, and replace them with proper log()
calls with the appropriate error level.
Fix or turn into Github issues
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.
Players names have been broken when some usage of socket.io was converted to API calls.
The animation is displayed only when the current player wins the round, of course.
E.g. ClickTale/FullStory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.