Latest Updates

Documenting code, one commit at a time.

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
PHP Laravel

Streamlining Filament Panel Navigation in Reimpact Platform

Introduction

The Reimpact platform recently underwent a navigation update to improve user experience within the Filament admin panel. This update focused on ensuring consistent and correct redirection after login and impersonation actions.

The Problem

Previously, users logging in or utilizing the impersonate feature were being redirected to outdated Nova paths, specifically

Read more

PostgreSQL Type Casting for Data Consistency in Laravel

When developing applications using Laravel with a PostgreSQL database, maintaining strict data type consistency is crucial, especially when dealing with dashboard functionalities that aggregate data. PostgreSQL's strong type checking can lead to unexpected errors if data types don't match exactly between the database schema and the application's expectations.

The Problem: Type Mismatches

Read more

Refactoring Filament Dashboard Filters for Clarity and Efficiency

The Reimpact platform benefits from a well-organized and efficient admin dashboard. Recently, work has focused on refining the Packaging dashboard's filter system to improve both its appearance and initial data loading performance.

The Problem: Styling Inconsistencies and Delayed Data

Previously, the dashboard filters suffered from inconsistent styling, making the interface feel disjointed.

Read more