{"id":23143764,"url":"https://github.com/digitalinteraction/accounts-officer","last_synced_at":"2026-05-07T01:08:20.161Z","repository":{"id":43425878,"uuid":"327938927","full_name":"digitalinteraction/accounts-officer","owner":"digitalinteraction","description":"A bot for pulling digital resources and merging them into an Airtable","archived":false,"fork":false,"pushed_at":"2022-09-29T09:31:27.000Z","size":632,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T12:14:59.100Z","etag":null,"topics":["airtable","aws","container","digitalocean","godaddy","got","lint-staged","nodejs","sendgrid","superstruct","typescript","yargs","yorkie"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/digitalinteraction.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}},"created_at":"2021-01-08T15:23:08.000Z","updated_at":"2024-11-08T12:31:49.000Z","dependencies_parsed_at":"2023-01-18T14:29:19.198Z","dependency_job_id":null,"html_url":"https://github.com/digitalinteraction/accounts-officer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/digitalinteraction/accounts-officer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Faccounts-officer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Faccounts-officer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Faccounts-officer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Faccounts-officer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalinteraction","download_url":"https://codeload.github.com/digitalinteraction/accounts-officer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Faccounts-officer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267804103,"owners_count":24146537,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["airtable","aws","container","digitalocean","godaddy","got","lint-staged","nodejs","sendgrid","superstruct","typescript","yargs","yorkie"],"created_at":"2024-12-17T15:14:09.933Z","updated_at":"2026-05-07T01:08:20.136Z","avatar_url":"https://github.com/digitalinteraction.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accounts Officer\n\n\u003c!-- toc-head --\u003e\n\n## Table of contents\n\n- [About](#about)\n- [Usage](#usage)\n- [Development](#development)\n  - [Frameworks](#frameworks)\n  - [Setup](#setup)\n  - [Regular use](#regular-use)\n  - [Irregular use](#irregular-use)\n  - [Formatting](#formatting)\n- [Releasing](#releasing)\n- [Ideas / Future work](#ideas--future-work)\n\n\u003c!-- toc-tail --\u003e\n\n## About\n\nAccounts Officer is a Node.js bot that queries platform APIs for account data\nand resources and pushes it into a Airtable base.\nIt's a Cloud Native CLI container designed to be deployed as a Kubernetes CronJob.\nThere are commands to run everything, each services or to show individual bits of data.\n\nAccounts Officer currently supports pulling data from:\n\n- DigitalOcean → Droplets, Volumes, Clusters, Volumes, Snapshots \u0026 Load Balancers\n- AWS → Buckets \u0026 Domains and single-region RDS \u0026 Lightsails\n- GoDaddy → domains\n- SendGrid → API keys\n\nAccounts Officer pulls in data from those services and merges records\nwith those already in Airtable.\nIt will try to update existing records or create new ones\nand if a record no longer exists it marks it as `unlinked`.\n\n## Usage\n\n### Configuration\n\n**environment variables**\n\nsee [.env.example](/.env.example)\n\n**config.json**\n\nMount into the container at `/app/config.json`,\nsee [config.example.json](/config.example.json)\n\n**command**\n\nset your containers arguments to be the command you want it run,\nit's set to `all` by default\n\n### Airtable structure\n\nYou need to have an Airtable base setup with the correct structure.\nThe bot will only touch known fields so you can have extra custom columns if you like.\nBut it will fail if the structure doesn't match what it is expecting.\n\nSetup `config.json` to map your Airtable base for the bot.\nSet the `base` value to link to a specific base\nand use `tables` to map each service to your table name.\n\nHeres what each table should look like:\n\n\u003e You can add whatever other custom fields you like!\n\n**DigitalOcean**\n\n| Field  | Type                                                                       |\n| ------ | -------------------------------------------------------------------------- |\n| Name   | Single line text                                                           |\n| Type   | Single Select - droplet, cluster, database, volume, snapshot, loadbalancer |\n| Status | Single Select - active, unlinked, new                                      |\n| Cost   | Currency                                                                   |\n\n**AWS**\n\n| Field  | Type                                                |\n| ------ | --------------------------------------------------- |\n| Name   | Single line text                                    |\n| Type   | Single Select - bucket, lightsail, domain, database |\n| Status | Single Select - active, unlinked, new               |\n| Cost   | Currency                                            |\n\n**GoDaddy**\n\n| Field        | Type                                  |\n| ------------ | ------------------------------------- |\n| Name         | Single line text                      |\n| Type         | Single Select - domain                |\n| Status       | Single Select - active, unlinked, new |\n| Expires      | Date                                  |\n| HttpResponse | Single line text                      |\n\n**SendGrid**\n\n| Field  | Type                                  |\n| ------ | ------------------------------------- |\n| Name   | Single line text                      |\n| Type   | Single Select - apikey                |\n| Status | Single Select - active, unlinked, new |\n\n## Development\n\nTo develop on this repo you will need to have Docker and Node.js installed on your dev machine\nand have an understanding of them.\nThis guide assumes you have the repo checked out and are on macOS,\nbut equivalent commands are available.\n\n### Frameworks\n\n- [yargs](https://yargs.js.org) for CLI parsing and commands syntax\n- [got](https://github.com/sindresorhus/got#readme) for http requests\n- [superstruct](https://docs.superstructjs.org) for validating javascript objects and structures\n- [puggle](https://github.com/robb-j/puggle#readme) was used to bootstrap this project\n\n### Setup\n\nYou'll only need to follow this setup once for your dev machine.\n\n```bash\n# Setup your dev environment\n# -\u003e Fill in the values in your favourite text editor\ncp .env.example .env\n\n# Setup your app config\n# -\u003e Fill in the values in your favourite text editor\ncp config.example.json config.json\n\n# Install node.js dependencies\nnpm install\n```\n\n### Regular use\n\nThese are the commands you'll regularly run to develop the API, in no particular order.\n\n```bash\n# Get CLI usage and help\nnpm run start -- --help\n\n# Run the CLI directly with a command\n# -\u003e Loads in the .env\n# -\u003e Runs TypeScript directly through ts-node\n# -\u003e -- seperator is needed for options\nnpm run start aws\n\n# Start a node.js debugger running the CLI\n# -\u003e It will break on the first line of code to allow a debugger to be attached (--inspect-brk)\nnpm run debug godaddy\n```\n\n### Irregular use\n\nThese are commands you might need to run but probably won't, also in no particular order.\n\n```bash\n# Manually run the TypeScript build\nnpm run build\n\n# Run TypeScript as a linter\nnpm run lint\n\n# Manually format all code using Prettier\nnpm run prettier\n\n# Generate the table-of-contents in this readme\nnpm run readme-toc\n```\n\n### Formatting\n\nThe code in this repo is automatically formatted using [Prettier].\nThis may run in your IDE automatically on-save already.\nIt is also setup to run the formatter on all git-staged code.\nThis uses the [yorkie](https://www.npmjs.com/package/yorkie)\nand [lint-staged](https://www.npmjs.com/package/lint-staged)\npackages which are configured in the package.json.\n\nYou can manually run the formatter with `npm run format` if you want.\n\n## Releasing\n\nReleases are automated using git tags,\nwhich should be generated using the `npm version` command.\nThis generates a `vX.Y.Z` git tag which, when pushed, runs a GitHub workflow\nto build a container that is pushed to\n[GitHub Container Registry](https://github.com/digitalinteraction/accounts-officer/pkgs/container/accounts-officer)\n\n## Ideas / Future work\n\n- Add tests to ensure stability\n- Refactor fixed logic into a functional data-based runner, see [services/airtable.ts#fetchAndMerge](/src/services/airtable.ts)\n- Add more services/resources\n- Pull in people too\n- Allow aws regions to be customised\n- Explore a \"billing\" sheet which pulls the monthly bill from each service\n- Opt-in to services rather than requiring all\n\n---\n\n\u003e This project was set up by [puggle](https://npm.im/puggle)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalinteraction%2Faccounts-officer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalinteraction%2Faccounts-officer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalinteraction%2Faccounts-officer/lists"}