Skip to content

A Refactored Version of Crowd Jigsaw Puzzle, based on Node.js, Express and MongoDB.

Notifications You must be signed in to change notification settings

Symbolk/CrowdJigsaw

Repository files navigation

Crowd Jigsaw


Crowd Jigsaw is an online game, where multiple players work together to figure out a complex jigsaw puzzle.

As a Refactored Version of CrowdJigsawPuzzle based on Firebase.

Designed to be an Application of Crowd Wisdom/Collective Intelligence Powered By: @Symbolk @Yuhan Wei @Xinyue Zhang

Overview

Language :

[Javascript/Paperscript/Html5/CSS3]

Framework :

Express Mongodb paper.js AdminLTE FontAwesome

Requirements :

Platform Support Version
OS Windows/Linux/iOS/Android N/A
Browser Chrome/Safari ~60.0
Node.js Node.js ~8.9.4
Express Express ~4.15.0
Mongodb Mongodb ~3.4.7

P.S. See npm dependencies in package.json


Usage

Home Phone PhoneDrawer

Step1 : New a Game Round

round_wait

Step2 : Wait for Players to Join

round_new

Step3 : Puzzle Started Automatically(when players are enough)

puzzle

In one round, a crowd of players are playing together to figure out the same jigsaw puzzle(which can be overwhelming for any individual). In this process, explicit communication is not necessary, people just focus on their work but assistance comes to him continually from the crowd.

Step4 : Check the Contribution Rank

round_rank

Development(Windows)

0, Set the env as development:

# edit config/example.js and rename as dev.js
rm config/example.js config/dev.js
# windows
set NODE_ENV=development
# linux/macOS
export NODE_ENV=development

1, Start mongodb service with the command:

# Make a new folder as your database, e.g. d:\database in Windows
mongod --dbpath d:\database

2, Create the database required in another CMD:

# get into the interactive shell of mongodb
mongo
# create the userinfo database
> use userinfo;
# check the current database
> show dbs;
> db;

3, Under the project folder, install the package dependencies:

cd CrowdJigsaw
npm install

4, Start the server:

# test or debug it locally(automatically restart server once code changed)
npm test
# or use nodemon directly
nodemon app.js

5, Go http://localhost:3000/ in Chrome to see the client.

Delpoyment(Aliyun CentOS)

0, Set the env as production:

# edit config/example.js and rename as pro.js
rm config/example.js config/pro.js
# windows
set NODE_ENV=production
# linux/macOS
export NODE_ENV=production

1, Start mongodb service with the command:

# Make a new folder as your database, e.g. /var/www/database
nohup mongod --dbpath /var/www/database &

2, Start the server:

# install forever first
npm install forever -g
# start it
npm start
# or use forever
forever start app.js

3, Go http://SERVERIP:3000/ in Chrome to see the client.

Bugs&Issues

About

A Refactored Version of Crowd Jigsaw Puzzle, based on Node.js, Express and MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published