{"id":16882711,"url":"https://github.com/lildude/starling-sweeper","last_synced_at":"2026-05-05T18:39:42.839Z","repository":{"id":66330372,"uuid":"540488965","full_name":"lildude/starling-sweeper","owner":"lildude","description":"💰 Sweep your Starling balance to a savings goal when you get paid.","archived":false,"fork":false,"pushed_at":"2026-05-01T18:59:51.000Z","size":484,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-01T20:28:41.503Z","etag":null,"topics":["azure","azure-functions","golang","serverless","starlingbank"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lildude.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"lildude"}},"created_at":"2022-09-23T14:51:32.000Z","updated_at":"2025-12-08T13:39:46.000Z","dependencies_parsed_at":"2023-10-12T19:37:25.989Z","dependency_job_id":"75d47796-530e-4af8-aa39-bab67a7398f9","html_url":"https://github.com/lildude/starling-sweeper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lildude/starling-sweeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstarling-sweeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstarling-sweeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstarling-sweeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstarling-sweeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lildude","download_url":"https://codeload.github.com/lildude/starling-sweeper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstarling-sweeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32663429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["azure","azure-functions","golang","serverless","starlingbank"],"created_at":"2024-10-13T16:08:25.066Z","updated_at":"2026-05-05T18:39:42.798Z","avatar_url":"https://github.com/lildude.png","language":"Go","funding_links":["https://github.com/sponsors/lildude"],"categories":[],"sub_categories":[],"readme":"# Starling Sweeper\n\nThis application allows you to \"sweep\" the balance in your account as the time of receiving an inbound faster payment or Nostro deposit to a savings goal.\n\nI run this as an Azure Function but thanks to the way they run, this can be run independently standalone anywhere without any tie-in to the likes of AWS Lamba.\n\n## How it works\n\n1. Starling Bank triggers a webhook on each transaction.\n1. This webhook is configured to POST the transaction data to this application running on Azure Functions.\n1. The application...\n   - checks the signature of the request,\n   - checks the transaction UID and if it's not the transaction we swept last,\n   - checks the amount is greater than a set threshold,\n   - checks balance from prior to the incoming,\n   - and then sends a request back to Starling Bank to move the original balance to a savings goal.\n\n## Examples\n\n### Above Threshold\n\n```\nBalance: £200\nThreshold: £2000\nIncoming payment: £2100\nResult: £200 tranferred to goal.\nBalance after: £2100\n```\n\n### Below Threshold\n\n```\nBalance: £200\nThreshold: £2000\nIncoming payment: £1700\nResult: No transfer\nBalance after: £1900\n```\n\n### Overdrawn\n\n```\nBalance: (£100)\nThreshold: £2000\nIncoming payment: £2300\nResult: No transfer\nBalance after: £2200\n```\n\n## Installation\n\n### Pre-Requisites\n\n- A [Starling Bank](https://starlingbank.com) account.\n- A [Starling Bank Developer](https://developer.starlingbank.com) account.\n- An [Azure](https://azure.microsoft.com/free/) account.\n- A Redis database. I use a free account from [Redis](https://redis.com/try-free/) as it's cheaper than Azure.\n\n### Configuring Your App\n\n- Create your function app:\n  - in the Azure portal:\n    \u003cdetails\u003e\u003csummary\u003eHow to set up a custom handler Azure Function\u003c/summary\u003e\n    \u003cp\u003e\n\n    Start by searching for Function App in the Azure Portal and click Create.\n    The important settings for this are below, other settings you can use default or your own preferences.\n\n    [Basic]\n\n    1. Publish: Code\n    2. Runtime stack: Custom Handler\n    3. Version: custom\n\n    [Hosting]\n\n    1. Operating System: Linux\n    2. Plan type: Consumption (Serverless)\n\n    \u003c/p\u003e\n    \u003c/details\u003e\n\n  ... or ...\n  \n  - in [VSCode](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Clinux#create-the-function-app-in-azure)\n- As we're shipping an executable, you will need to use a Azure Service Principal for RBAC for the deployment credentials. Follow [these](https://github.com/Azure/functions-action/blob/d4e7f5d24dc958f6904ffd095fe5033d474abe49/README.md#using-azure-service-principal-for-rbac-as-deployment-credential) instructions.\n- Register an application with your Starling developer account.\n- Create a personal webhook using the URL from when you created your function app above.\n- Make a note of the webhook secret and the personal access token.\n- Set the following keys under Settings \u003e Configuration \u003e Application Settings for your function app:\n  - `WEBHOOK_SECRET` - used to validate inbound requests.\n  - `PERSONAL_ACCESS_TOKEN` - used to request transfers to savings goal.\n  - `SWEEP_GOAL` - the target savings goal for sweeps.\n  - `SWEEP_THRESHOLD` - the threshold, in _pence_, for incoming payments to trigger a sweep.\n  - `ACCOUNT_UID` - the identifier of the Starling account on which you want this to run.\n  - `REDIS_URL` - the URL for the Redis database you want to use.\n  - `FUNCTION_APP` - the name of your Azure Function app.\n  You should probably use the [Key Vault](https://azure.microsoft.com/services/key-vault/) for all secrets to be extra safe.\n- Deploy the application, either using [VSCode](https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Clinux#publish-the-project-to-azure) or via GitHub Actions by pushing to `main` or merging a pull request into `main`.\n\n### Local Development and Testing\n\n- [Configure your environment](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Cmacos#configure-your-environment)\n- Save the above settings to a `.env` file.\n  You can also add these to a `local.settings.json` file by [pulling them from Azure](https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-vs-code?tabs=csharp#download-settings-from-azure) and later push [push these to Azure when you deploy from VSCode](https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-vs-code?tabs=csharp#application-settings-in-azure).\n  **Don't commit either of these files to your repo unless you really don't like your money.**\n- Start the application: `make start`.\n\n## Similar Projects\n\n- [Starling Roundup (for AWS)](https://github.com/billglover/starling-roundup) - the origin of the fork of this fork.\n- [Starling CoinJar](https://github.com/cooperaj/starling-coinjar)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flildude%2Fstarling-sweeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flildude%2Fstarling-sweeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flildude%2Fstarling-sweeper/lists"}