I've spent the past few days experimenting with Platformatic DB, a new open-source project that can generate REST and GraphQL APIs from your database. Platformatic's goal is to remove all friction for back-end development. After initializing a new project, the first thing you'll have to do is write SQL migrations. I come from a background of using ORMs such as Prisma where migrations are automatically taken care of for you so it's not something I'm used to doing. I also think writing your own migrations introduces risk for user error like forgetting to create a foreign key. So let's take a look at how we can use a Prisma schema to generate up and down migrations!
While implementing a Stripe Connect integration, I repeatedly came across the tedious task of onboarding Express accounts to test the integration, whether that be manual or automated testing. Creating an Express account using Stripe's API is an easy task, but in order for the account to be verified to accept payments and transfers, the account needs to manually complete onboarding forms on a Stripe hosted page. Let's take a look at how I automated the onboarding process.
I'm working on a project that relies heavily on Stripe webhooks and while implementing the webhook handler, I noticed the lack of type safety increases the risk of error in my implementation. This could be something simple like misspelling the event name or trying to access the event's
data.object fields incorrectly. For this reason, I built a way to generate typings for all webhook events to strongly type the event object.