Keep Data Safe in Multi-Tenant Systems: A Case for Supabase and Row Level Security

When managing multi-tenant systems, one common anxiety is that a coding error can unintentionally expose user data. Incorrectly routing a user’s data to the wrong tenant, or even distributing it to another user within the same tenant, is a very real fear. Additional precautions are necessary to safeguard against human errors. Supabase is an open-source platform that offers a viable alternative to Firebase. Similar to Firebase, it provides a frictionless user authentication process. Due to its integration with Postgres, it supports sophisticated access controls at a row level, aptly referred to as Row-Level Security (RLS). In this article, we’ll explore a concrete example of leveraging this feature and provide step-by-step implementation guidelines.

Featured image

Stripe Payment Links and Custom Parameters

As of now, Stripe’s Payment Links don’t offer the flexibility of adding custom fields beyond those available in the API. The fields that you can directly pass into the Payment Links endpoint are complementary identifiers like prefilled_email or client_reference_id. This post shows some of the workarounds you can use to enrich your payment links with additional custom parameters.

Banner image

Asynchronous Webhook Handling with WebFlux, Kotlin Coroutines And Kafka

Webhooks offer a robust integration with third-party services, facilitating complex and time-consuming processes asynchronously. Yet, they present a high risk of missed events due to high latency or performance issues. In this blog post, I’ll guide you through a reliable and scalable solution for handling webhooks. The toolkit consists of Spring Boot, WebFlux, Kotlin coroutines, and Apache Kafka. I’ll show you how to build a system that efficiently enqueues incoming requests into an internal queue for background processing. So let’s delve into it!

Branch pruning

Keeping Your Git Garden Pruned: Safely Removing Orphaned Local Branches

Are you drowning in a sea of ghost branches? Have you ever scrolled through your local Git repository only to be overwhelmed by a convoluted tangle of orphaned branches? You’re not alone. Unused, stale, or obsolete branches can quickly amass in our workspace, creating a breeding ground for confusion and chaos. As developers, maintaining a clean and organized local repository is essential for efficient and error-free work. This blog post offers easy-to-follow steps on how to safely prune those redundant local Git branches that have lost their ties to the remote upstream. It’s time to trim away the excess, and clear the path for cleaner code and smoother collaboration.

Featured image

Optimizing Eager Fetch with Spring Data and EntityGraph Annotation

The LazyInitializationException is a common occurrence when using Hibernate. It typically happens when you access a lazy-loaded association outside of the persistence context in which it was loaded. I will show you how to prevent this exception without compromising the performance of your application. Through the lens of Spring Data, I will explain how to resolve this challenge with a handy annotation: @EntityGraph. Implementing this strategy allows you to optimize both for efficiency and effectiveness, avoiding one of the common pitfalls in Hibernate.