A simple card game. To see it in action, start at http://mrhen.github.io/obtuse-octo-adventure (be gentle; it can take some time to wake up the server.)
The app is split into client
and server
folders but could be split into two repos without trouble (with one exception).
- Client
- Simple wrapper to show off the REST API
- TypeScript + Angular
- Uses gulp build pipeline (source)
- Deployed at http://mrhen.github.io/obtuse-octo-adventure
- Deploy using
gulp deploy
from the client directory - Builds the entire app and publishes the client files to GitHub Pages
- Deploy using
- Development only node instance (source)
- Server
- Deployed at https://murmuring-tundra-3318.herokuapp.com/ (no exposed server dashboard at this time)
- Hosted on Heroku
- Be gentle; it can take some time to wake up the Heroku instance
- Deploy using
gulp deploy
from the server directory - Uses
npm postinstall
hook to build TypeScript and run tests
- REST API
- Behavior declared using controller interfaces
- Initalization and base route driven by the core app
- Route payloads defined using TypeScript and consumed on both server (example) and client (example)
- "Hot swappable" data stores
- Development environment uses an in-memory variation
- Production uses Redis (source)
- Data store tests run against either and should be run against a final environment setup
- Generates data driven events using Redis PubSub
- Event services
- Client event traffic handled with Socket.IO source
- Translates back-end events into WebSocket friendly messages and event names
- Assumes only one real user; would need to be extended to support more than one user at a time
- Game service hooks into Redis PubSub and reacts using a game event loop source
- Listener chain is set up in the core app
- Events are not setup to scale horizontally in this release but it was designed with that direction in mind
- Client event traffic handled with Socket.IO source
- Deployed at https://murmuring-tundra-3318.herokuapp.com/ (no exposed server dashboard at this time)