{"id":16736756,"url":"https://github.com/hursey013/real-balance","last_synced_at":"2026-05-19T11:05:50.650Z","repository":{"id":99274456,"uuid":"296622088","full_name":"hursey013/real-balance","owner":"hursey013","description":"Discretionary funds less credit card spending via Plaid API + Firebase Functions","archived":false,"fork":false,"pushed_at":"2020-10-16T22:14:03.000Z","size":53,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-22T10:43:50.684Z","etag":null,"topics":["firebase","firebase-functions","firebase-realtime-database","plaid-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hursey013.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-18T13:00:03.000Z","updated_at":"2023-11-09T21:55:23.000Z","dependencies_parsed_at":"2023-06-25T23:35:01.083Z","dependency_job_id":null,"html_url":"https://github.com/hursey013/real-balance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hursey013%2Freal-balance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hursey013%2Freal-balance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hursey013%2Freal-balance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hursey013%2Freal-balance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hursey013","download_url":"https://codeload.github.com/hursey013/real-balance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243796565,"owners_count":20349251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-functions","firebase-realtime-database","plaid-api"],"created_at":"2024-10-13T00:23:27.621Z","updated_at":"2026-05-19T11:05:45.627Z","avatar_url":"https://github.com/hursey013.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# real-balance\n\n\u003e Discretionary funds less credit card spending via Plaid API + Firebase Functions\n\n## Introduction\n\nEndpoint to provide your current \"real\" balance using the Plaid API. The function totals up your depository (checking) accounts as well as credit accounts and returns the difference.\n\nFurther reading:\n\n- [Firebase SDK for Cloud Functions](https://firebase.google.com/docs/functions)\n- [Plaid API Documentation](https://plaid.com/docs/)\n\n## Functions code\n\nSee file [functions/index.js](functions/index.js) for the code.\n\nThe dependencies are listed in [functions/package.json](functions/package.json).\n\n## Initial setup\n\n### Clone this repo\n\n- Clone or download this repo and open the `real-balance` directory.\n\n### Create a Firebase project\n\n- Create a Firebase Project using the [Firebase Developer Console](https://console.firebase.google.com)\n- Enable billing on your project by switching to the Blaze or Flame plan. See [pricing](https://firebase.google.com/pricing/) for more details. This is required to allow requests to non-Google services within the Function.\n- Install [Firebase CLI Tools](https://github.com/firebase/firebase-tools) if you have not already, and log in with `firebase login`.\n- Configure this sample to use your project using `firebase use --add` and select your project.\n\n### Install dependencies and add environment variables\n\n- Install dependencies locally by running: `cd functions; npm i; cd -`\n- [Add your Plaid API credentials](https://dashboard.plaid.com/signup) and basic auth password to the Firebase config:\n  ```bash\n  firebase functions:config:set \\\n  plaid.clientid=\u003cYOUR PLAID CLIENT ID\u003e \\\n  plaid.secret=\u003cYOUR PLAID SECRET\u003e \\\n  user.password=\u003cYOUR BASIC AUTH PASSWORD\u003e\n  ```\n- You will also need to add an array of Plaid `access_token`'s for each [Plaid Item](https://plaid.com/docs/#creating-items-with-plaid-link) you would like included in your \"real\" balance. You may also (optionally) add an array of specific accounts to be used with each `access_token`, otherwise all accounts will included.\n  ```bash\n  firebase functions:config:set \\\n  plaid.items.0.token=\u003cFIRST PLAID ACCESS TOKEN\u003e \\\n  plaid.items.1.token=\u003cANOTHER PLAID ACCESS TOKEN\u003e \\\n  plaid.items.1.account_ids.0=\u003cA SPECIFIC ACCOUNT ID\u003e \\\n  plaid.items.1.account_ids.1=\u003cANOTHER SPECIFIC ACCOUNT ID\u003e\n  ```\n\n### Deploy the app to production\n\n- Deploy your function using `firebase deploy --only functions`\n- After deploying the function you can use the your basic auth credentials to access the endpoint at:\n\n```\nhttps://us-central1-\u003cproject-id\u003e.cloudfunctions.net/balance\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhursey013%2Freal-balance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhursey013%2Freal-balance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhursey013%2Freal-balance/lists"}