{"id":24555449,"url":"https://github.com/dbos-inc/dbos-account-management","last_synced_at":"2025-06-28T13:38:01.482Z","repository":{"id":239499941,"uuid":"776191465","full_name":"dbos-inc/dbos-account-management","owner":"dbos-inc","description":"The production DBOS Cloud billing system, implemented on DBOS and completely open-source","archived":false,"fork":false,"pushed_at":"2024-12-05T18:44:50.000Z","size":444,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T23:48:24.982Z","etag":null,"topics":["dbos","postgresql","typescript"],"latest_commit_sha":null,"homepage":"https://www.dbos.dev/pricing","language":"TypeScript","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/dbos-inc.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}},"created_at":"2024-03-22T21:39:39.000Z","updated_at":"2025-03-29T14:25:43.000Z","dependencies_parsed_at":"2024-05-12T23:23:37.027Z","dependency_job_id":"67245274-0e7a-43d0-837d-25398fd2ed44","html_url":"https://github.com/dbos-inc/dbos-account-management","commit_stats":null,"previous_names":["dbos-inc/dbos-account-management"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbos-inc%2Fdbos-account-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbos-inc%2Fdbos-account-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbos-inc%2Fdbos-account-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbos-inc%2Fdbos-account-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbos-inc","download_url":"https://codeload.github.com/dbos-inc/dbos-account-management/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317722,"owners_count":21083528,"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":["dbos","postgresql","typescript"],"created_at":"2025-01-23T04:01:34.817Z","updated_at":"2025-04-10T23:48:28.932Z","avatar_url":"https://github.com/dbos-inc.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# DBOS Cloud Account Management\n\nThis repository contains code for the DBOS Cloud account management app, which is built with [DBOS Transact](https://github.com/dbos-inc/dbos-transact) and [Stripe](https://stripe.com/) and deployed on [DBOS Cloud](https://www.dbos.dev/).\n\n## Overview\nWhen a customer clicks \"Upgrade to DBOS Pro\" on the [DBOS website](https://www.dbos.dev/pricing), this app redirects them to a customized Stripe checkout page, where they enter payment information. After they pay, Stripe sends a notification to a webhook endpoint on this app. The webhook retrieves the customer's updated subscription status from Stripe, maps their Stripe customer ID to a DBOS Cloud account ID, and updates their subscription status in DBOS Cloud.\n\nThis repo demonstrates a complete production DBOS application, including cloud deployment and CI/CD, written in \u003c500 lines of code. Specifically, it highlights:\n\n- Use of DBOS workflows, transactions, and communicators for reliable, exactly-once execution\n- Asynchronous and reliable event processing for [Stripe Webhook](https://docs.stripe.com/webhooks)\n- Integration with [Stripe Billing](https://stripe.com/billing) and the [Stripe Customer Portal](https://docs.stripe.com/customer-management)\n- Integration with [Auth0](https://auth0.com/) for authentication and authorization\n- Using [Knex.js](https://knexjs.org/) for schema management and queries\n- Automated testing and deployment with the DBOS CLI and [GitHub Actions](https://github.com/features/actions)\n- Unit tests for individual functions and endpoints with [jest](https://jestjs.io/).\n\n## Code Layout\n\nThe main source code files:\n- `src/`\n  - `endpoints.ts` HTTP endpoints\n  - `subscription.ts` Workflows, transactions, and communicators for subscriptions\n  - `subscription.test.ts` Unit tests\n- `dbos-config.yaml` DBOS configuration file\n- `migrations/` Schema definition in Knex.js format\n\nFiles for CI/CD:\n- `scripts/`\n  - `dbos_deploy.sh` Script that deploys this app to DBOS Cloud\n  - `subscription_integration_test.py` Automated integration test for subscription that runs against staging and prod\n- `.github/workflows/` Github Actions for deployment and testing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbos-inc%2Fdbos-account-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbos-inc%2Fdbos-account-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbos-inc%2Fdbos-account-management/lists"}