This kitty sorts out your complicated group expenses.
The plan is for AutoKitty to be an app that lets users create collaborative projects to manage complicated group expenses. Imagine you've gone on holiday with friends and you've all spent a lot of money on group expenses. Some people are involved in some expenses, while others are exempt (perhaps they don't drink alchohol for example, or they shouldn't contribute to petrol because they travelled by train).
Resolving this efficiently is tricky to do by hand, and impossible for large groups. AutoKitty will help by computing the smallest number of payments between members in order to settle all debts.
There are many other apps that do similar things. This project is mainly a learning exercise in new tech, but hopefully we can differentiate on simplicity and UX.
- Mock ups https://email@example.com/hHRoxPtf
- A naive implementation of the settling up algorithm https://gist.github.com/jedrichards/22fa15dd89fe34c3eec1
- React+Redux (atomic flux with reducers)
- RxJS (reactive state streams)
- Babel (ES6)
- Browserify (client bundling)
- Koa (static file server and REST API)
- PouchDB (CouchDB adapter)
- Standard (code style)
Manage Node versions with nvm)
$ npm install $ npm run start:dev
npm installwill install the dependencies and then automatically build the client code in a postinstall step.
npm run start:devwill spin up the server on localhost:3000.
Run the server in development mode while watching and restarting,
$ npm run watch:server
Bundle the client files while watching and re-bundling,
$ npm run watch:client
You'll need two terminal windows going during development, one for watching the server and one for watching the client.
Linting and testing
$ npm run -s lint
Run the unit tests with,
$ npm run -s test
-sflag stops npm from filling up your console with its overly chatty output, with
-syou'll just get the linting and testing tool's stderr or stdout.
actionsRedux action creators docs
components"Dumb" components docs
constantsGeneric constants and action type strings docs
containers"Smart" components docs
middlewareRedux middleware docs
observablesRxJs streams docs
reducersRedux reducers docs
selectorsRedux selectors docs
CI and deployment
CI is handled by Codeship here https://codeship.com/projects/80431.
Any commit that passes CI on the master branch will trigger an automatic deployment to the Heroku app at http://autokitty.herokuapp.com.
Additionally, raising a PR on GitHub will trigger an automatic deployment of the latest commit in that PR to a temporary Heroku app for QA/review purposes. PR apps are only deployed once their commit passes CI.
PouchDB provides a unified CouchDB-based interface to local or remote data stores.
The development database is local and in-memory, and is recreated each time the app starts.
TODO: How will the production database work? Cloudant?