Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

This kitty sorts out your complicated group expenses

Notifications You must be signed in to change notification settings

madebycomrades/autokitty-react

Repository files navigation

AutoKitty

Codeship Codeship

js-standard-style

Overview

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.

Resources

Tech

  • Isomorphic Universal app
  • 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)

System requirements

  • iojs 3.1.0, npm 2.13.3

Manage Node versions with nvm)

Quick start

$ npm install
$ npm run start:dev

npm install will install the dependencies and then automatically build the client code in a postinstall step.
npm run start:dev will spin up the server on localhost:3000.

Npm commands

Server

Run the server in development mode while watching and restarting,

$ npm run watch:server

Client

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

Lint with,

$ npm run -s lint

Run the unit tests with,

$ npm run -s test

The -s flag stops npm from filling up your console with its overly chatty output, with -s you'll just get the linting and testing tool's stderr or stdout.

Src folders

  • actions Redux action creators docs
  • components "Dumb" components docs
  • constants Generic constants and action type strings docs
  • containers "Smart" components docs
  • middleware Redux middleware docs
  • observables RxJs streams docs
  • reducers Redux reducers docs
  • selectors Redux selectors docs
  • utils Utility functions

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.

Database

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?

About

This kitty sorts out your complicated group expenses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published