What it does
The app allows two users to pull a christmas cracker, and the phone with the greatest acceleration wins. A joke from /r/Jokes or /r/programmerhumor is also displayed to the user after pulling the cracker.
How we built it
The server is a Node.js application using Express and SocketIO. MongoDB is used for the database, providing user -and match data storage, with Mongoose providing a model layer between the code and DB. Vue.js allowing us to operate a single page web app with real updating features, using Webpack, vue-loader and many other modules to combine all of the Vue components into a single file. The client also uses the HTML5 acceleration API to measure data from the accelerometer. The server runs on AWS Lightsail, with pm2 for managing the node application, mongoDB running in the same VM, and Apache as a reverse proxy.
Challenges we ran into
- Getting Vue.js to work
- Logic flow for creating matches
What we learned
- Vue.js 2.0 app structure
- HTML5 acceleration API
- Chrome network debugging is awesome for testing on a phone