{"repo":"dbos-inc/dbos-account-management","free":true,"listed":false,"github":"https://github.com/dbos-inc/dbos-account-management","clone":"git clone https://github.com/dbos-inc/dbos-account-management.git","description":"The production DBOS Cloud billing system, implemented on DBOS and completely open-source","language":"TypeScript","stars":24,"topics":["typescript","postgresql","dbos"],"license":"MIT","category":"databases-storage","readme_excerpt":"DBOS Cloud Account Management This repository contains code for the DBOS Cloud account management app, which is built with DBOS Transact (TypeScript), Fastify, and Stripe, and deployed on DBOS Cloud. Overview When a customer clicks \"Upgrade to Pro\" on the DBOS Console, 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. This repo demonstrates a complete production DBOS application, including cloud deployment and CI/CD, written in <600 lines of code. Specifically, it highlights: - Use of DBOS workflows, steps, and transactions for reliable, exactly-once execution - Asynchronous and reliable event processing for Stripe Webhook - Using Fastify for HTTP serving - Integration with Stripe Billing and the Stripe Customer Portal - Integration with Auth0 for authentication and authorization - Using Knex.js for schema management and queries - Automated testing and deployment with the DBOS CLI and GitHub Actions - Unit tests for individual functions and endpoints with jest. Code Layout The main source code files: - src/ - server.ts Main entrypoint for the HTTP server - subscription.ts Workflows, steps, transactions, and HTTP endpoints for subscriptions - subscription.test.ts U","default_branch":null,"files":null,"tree":[],"storefront":"/r/dbos-inc","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dbos-inc/dbos-account-management/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}