Skip to content

Manage YNAB accounts with multiple currencies in a single budget

Notifications You must be signed in to change notification settings

mhoad/ynab-multi-currency

Repository files navigation

Ynab Multi-Currency

Rails application to manage YNAB accounts with multiple currencies in a single budget.

It works by automatically converting your foreign account's transactions to your YNAB budget currency.

Check out the demo app.

Development set up

  1. Install all gems
bundle install
  1. Set up the database
rails db:setup
  1. Create a blank credentials file
rm config/credentials.yml.enc
rails credentials:edit

This will remove the encrypted credentials that come with this repo and create a blank credentials.yml.enc and its corresponding master.key.

  1. The command above will have opened the credentials file in an editor. Add your own secrets following this template:
open_exchange_rates_app_id: my_secret

ynab_client_id:
  development: my_secret
  production: my_secret

ynab_client_secret:
  development: my_secret
  production: my_secret

ynab_redirect_uri:
  development: urn:ietf:wg:oauth:2.0:oob
  production: https://my-website.com/oauth
  1. Add the master key to your env variables. Never commit the master key to git. If using Heroku, you can run:
heroku config:set RAILS_MASTER_KEY=$(cat config/master.key)
  1. Schedule recurrent tasks (e.g. using cron):

rake ynab_multi_currency:sync_accounts converts transactions for conversions configured with automatic sync (for example, run once a day).

rake ynab_multi_currency:delete_stale_transactions deletes stale transactions from unconfirmed syncs (for example, run every hour).

rake ynab_multi_currency:fetch_exchange_rates will fetch exchange rates (for example, run once a day)

About

Manage YNAB accounts with multiple currencies in a single budget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published