An educational, roleplay game for teachers to practice eliciting learner knowledge
npm install
npm run compile
node server.js
Deployed at https://tsl-elk.herokuapp.com/
==================================================================
React is used in ELK for its reusable user interface (UI) components and speed (only renders the diff of existing DOM elements and updated one). All of the React files are in elk/app/Components. The Game/index.js and App.js are the top level React components that contain the rest of them, making them good starting points for understanding the application.
Server file can be found at server.js. ELK uses node server-side.
Socket.io is used for server-client communication. Socket.IO boasts a synchronized, bilateral exchange using a persistent channel, so both the server and clients can subscribe to rooms in order to receive broadcasts (as opposed to constantly pinging the server/client for updates). Again, Game/index.js and App.js are good files to see client side examples. The socket can also get passed in as a React prop such as in ChatApp.js. Server.js shows socket.io being used server side.
Currently the back-end stores messages sent for each game. It is installed as an add-on via Heroku. Currently the back-end stores a single table for messages sent between users. Table headers are [gameID, player, message, timestamp]
ELK is deployed at www.tsl-elk.herokuapp.com. Ask Kevin for collaboration permission.
All React code is in app/Components. Game/index.js and App.js are good starting points for understanding the application front-end. Each file imports the React components so that can be a good way to understand the application structure. Game and App components are in turn imported by routes.js. GameBundle template are in app/GameBundles. Server and backend code is in server.js. The server stores game data, such as student/teacher id, gamebundle data, player answers etc.) in a gameIDs dictionary, only messages are stored in the backend.
- Install GitHub to get code using the instructions here: https://gist.github.com/derhuerst/1b15ff4652a867391f03
- Ask Kevin (or any other lab developer) to give you access to the ELK repo
- Download the git repo using any of the following options :
- In cmd, “git clone https://github.com/mit-teaching-systems-lab/elk.git”
- Go to https://github.com/mit-teaching-systems-lab/elk to download
- Instructions for windows here: http://blog.teamtreehouse.com/install-node-js-npm-windows. Note: may not require restarting laptop if “node -v” gives a version number
- In command prompt/terminal/cmd, navigate to the the ELK folder and run ‘npm install’ to download dependencies
- In cmd, run ‘node server.js’
- Open up a web browser (Chrome has best compatibility) and navigate to localhost:3333
- For editing GameBundles, make changes to corresponding file in GameBundles
- For adding a new GameBundle
- Save a new file using the GameBundle using the template. JSON doesn’t allow comments so be sure to delete them otherwise an error will be thrown
- In app/routes.js, add the GameBundle id to bundles dict
- In app/Components/App.js, add GameBundle id to games dictionary (currently in render method)
- In cmd, ‘git push heroku yourbranch:master’
- Navigate to www.tsl-elk.herokuapp.com
- Choose random student profile + question combinations
- studentID in Game/index.js is currently hardcoded so first profile in gamebundle is always selected.
- Quiz.js currently iterates through all questions in GameBundles. Change to randomly select subset of questions. Depending on implementation method, other relevant files may include Scores.js and server.js
- Refactor game bundle logic so that it uses id numbers and not indices in the array.
- Relevant files: Game/index.js, GameBundles (for testing)
- Adding scores to database, redoing things on the database to fit future needs
- Work with 11.125 data
- Two sets of data: surveys on google drive and chat transcripts in postgres
- Surveys can be linked to transcripts using gameID and player role (recorded in table in backend and self-reported in survey).