Splitwise Balance Viewer
Application URL:- http://splitwisebalanceviewer.batanasoftware.com
Fork it - https://github.com/walisc/SplitwiseBalanceView
Splitwise is a great application for dividing out costs of expenses between friends. Its interface in intuitive and pleasurable to use, giving you a summary of what you owe friends (or is owed to you). Splitwise also allows you to create groups (for instance if you want to share costs with housemates).
In this scenario [when using groups], Splitwise become a bit tricky to see how cost are being charged to you. Instead of grouping expenses by individual Spiltwise bundle all of them as one in a stream of transactions for the whole group. Of course you could go through each transactions and see which one you a linked to, and then try summaries that, but this is quite tedious.
This is were Splitwise Balance View fits in. Spllitwise Balance viewer aims to show you only the expense that matter in a quick to read way. To do this we use a standard balance sheet format listing all your friends individually (see below). The amount owing is also summaries at the top.
In addition you can also filter friends out if you only want to focus on one (or any number) of friends in particular The idea is that you should be able to say "How much to I owe friend X and for what" and get that answer simply. Also this app make no distinction between a friend in a group and a friend outside a group. It just adds everything up (if people desire that feature will can look into adding it)
Hope you find this app useful
Development
This application is written using angularjs for the frontend which talks to a php rest service backend. This php rest service communicates with the splitwise api and prepares the data and returns it to angularjs for frontend processing.
Getting Started
Prerequisties
- Php 5.6+
- Apache
- Oauth Enabled
Enable oauth
Windows - If you have php 5.6+ and above the php_oauth.dll should be already on your system. All you will need to is to enable it in you php.ini file (look for the line ;extension=php_oauth.dll and change this to extension=php_oauth.dll)
Linux - look at https://serverpilot.io/community/articles/how-to-install-the-php-oauth-extension.html. Do note:- if you are using lammp you don't need to create a configuration file for the extension. You can just modify you php.ini (/opt/lampp/etc/) to include the line extension=oauth.so
Installing
Clone or download this project to your apache document root (i.e /var/www/html/[splitwise_balance_view_folder]) or xammp htdocs folder.
- From there you should be able to navigate to the app in your browser (given that apache is running) - eg localhost/[splitwise_balance_view_folder] and this will show the home page
- Next, modify the .htaccess_sample file by modifying the RewriteBase appropriately (instruction there). When done rename the file to .htacess
- Next you need to register your app. Go to https://secure.splitwise.com/apps/new to register you application. Make sure your Callback URL is the same as that of 2 with the word app appended to it. i.e localhost/[splitwise_balance_view_folder]/app. When you're registered you will get API keys and OAuth detail for your app.
- Open the file [splitwise_balance_view_folder]/splitwise_wrapper/OAuthClientConfig.ini.sample. For CONS_KEY and the Consumer Key you got from 4. For the CONS_SEC and the Consumer Secret you got from 4. Rename the file to OAuthClientConfig.ini
From thee you should be able to navigate to localhost/[splitwise_balance_view_folder]/app. This will redirect to the splitwise authorization page. After authorising you should be redirected to the app and all the data should be fetched
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Authors
Chido Warambwa ([email protected])
License
This project is licensed under the MIT License - see the LICENSE.md file for details