Latest Updates

Documenting code, one commit at a time.

Scaling with Schemas: Multi-Tenancy Migration in Laravel

The Reimpact platform is undergoing a significant architectural shift, moving from a MySQL row-level multi-tenancy model to a more robust PostgreSQL schema-per-tenant setup. This post dives into the key considerations and steps involved in this migration, leveraging Laravel and Filament.

The Motivation for Schema-Based Tenancy

Row-level multi-tenancy in MySQL, while initially simpler to

Read more

Modernizing Platform Components with Laravel, Filament, and PostgreSQL

The platform project is undergoing a series of updates to enhance its architecture and developer experience.

Streamlining Panel Providers

Component registration is now more organized. The PackagingPanelProvider has been registered, ensuring that necessary components are readily available throughout the application. This centralizes the management of UI elements, improving maintainability.

Read more

Improving Application Stability and User Experience in Landing

The devlog-ist/landing project focuses on creating a smooth and reliable user experience. Recent work has addressed several critical production errors to enhance stability and prevent disruptions.

Addressing Production Errors

Production errors can significantly impact user satisfaction and overall application performance. A proactive approach to identifying and resolving these issues is

Read more
PHP Laravel

Improving Tenant Data Synchronization in Laravel Applications

Introduction

When building multi-tenant applications with Laravel, managing and synchronizing data across tenants is a common challenge. Ensuring data integrity while performing updates or synchronizations requires careful consideration. This post explores how to improve data synchronization processes in a Laravel multi-tenant environment, focusing on maintaining tenant schema data.

Read more

Enhancing Tenant Schema Population in Laravel

Introduction

When building multi-tenant applications with Laravel, managing database schemas for each tenant can become complex. We recently improved our tenant schema population process in the platform project to handle various edge cases and ensure data integrity across companies.

The Problem

Our initial schema population process had several limitations:

  1. PostgreSQL's
Read more

Multi-Tenancy in Laravel with PostgreSQL Schemas: A Migration Story

Introduction

Row-level filtering is common for multi-tenancy, but what if you need stronger isolation? At Reimpact's platform, we're migrating towards PostgreSQL schemas to achieve true tenant separation, leveraging Laravel, Filament, and the middleware pattern.

This post details our approach to dynamically setting the PostgreSQL search_path for each tenant, ensuring data isolation and

Read more
PHP Laravel

Enhancing Code Quality in the Reimpact Platform with Type Hinting

The Reimpact platform focuses on delivering streamlined and efficient solutions. Recently, we've been focusing on improving code maintainability and reducing potential runtime errors. One key area has been ensuring code adheres to strict typing.

The Improvement

A recent update focused on adding a type hint to the enforceSingleSession parameter. This seemingly small change has a significant

Read more
PHP Laravel

Battling Ghost Migrations: A Midnight Cleanup on the Platform

Working on the Reimpact platform often involves juggling multiple moving pieces. Recently, we encountered a peculiar issue: the lingering presence of duplicate migration files.

The Phantom Menace

Our deployment process began failing intermittently. After some digging, we discovered the root cause: duplicate migration files for key components like warehouses, brands, and massive uploads.

Read more

Multi-Tenancy with PostgreSQL Schemas in Laravel

Introduction

When building multi-tenant applications, choosing the right architecture is critical. This post explores how to leverage PostgreSQL schemas within a Laravel application to achieve tenant isolation, enhance security, and improve scalability.

The Multi-Tenant Challenge

Traditional multi-tenant approaches often involve sharing a single database and distinguishing tenants by a

Read more