Latest Updates

Documenting code, one commit at a time.

PHP Laravel

Tenant Migrations and the Perils of Implicit State

The Reimpact/platform project involves managing multi-tenant applications. One subtle issue arose related to running migrations within these tenants. The original approach, while seemingly straightforward, introduced an unexpected dependency on implicit state, leading to incorrect migration behavior.

The Problem

Initially, tenant migrations were executed using Laravel's

Read more

Tenant Migrations: Ensuring Data Consistency in Multi-Tenant Applications

When building multi-tenant applications with Laravel, ensuring each tenant's database schema is correctly migrated can be a challenge. In the Reimpact platform, we encountered issues with tenant schemas either re-running all migrations on each deploy or skipping them entirely. This led to potential data inconsistencies and application instability.

The Problem

Without a dedicated migration

Read more
PHP Platform

Improving Report Filtering in Reimpact Platform

Introduction

Have you ever encountered a situation where a dropdown list displays irrelevant data, hindering user experience and efficiency? This post delves into a scenario within the Reimpact platform where a seemingly minor oversight in filtering generated reports led to precisely that issue, and how it was resolved.

The Problem: Unfiltered Reports

In the Reimpact platform, users rely

Read more
PHP Laravel

Tenant Schema Migrations in Laravel: Automating Database Management

This post discusses automating tenant database migrations within a Laravel application, focusing on maintaining separate database schemas for each tenant.

The Challenge

In multi-tenant applications, managing database migrations across numerous tenants can be a complex and time-consuming task. Manually executing migrations for each tenant is prone to errors and inefficiencies.

Read more

Enhancing Real-Time Updates in Reimpact Platform: Implementing Polling for Packaging Uploads

Introduction

In the Reimpact platform, keeping users informed about the status of long-running packaging uploads is crucial. To improve the user experience, we've introduced a polling mechanism to the massive uploads table. This enhancement ensures that users receive near-real-time updates without needing to manually refresh the page.

The Problem

Previously, users had to rely on manual

Read more
PHP Serde

Improving Job Reliability in Reimpact/platform with Property Serialization

Introduction

This post discusses a recent enhancement to the Reimpact/platform project focused on improving the reliability of background jobs. Specifically, it addresses issues encountered during the serialization and deserialization of model properties, and error handling during Excel data processing.

The Problem: Private Properties and Silent Errors

When working with background jobs

Read more
PHP

The Perils of Premature Optimization: Removing Arbitrary Limits

In the Reimpact/platform project, a recent update highlights a common pitfall in software development: premature optimization. Specifically, the removal of arbitrary row limits during the processing of large Excel uploads underscores the importance of understanding real-world data constraints before imposing artificial restrictions.

The Problem: Arbitrary Limits

Initially, the platform had

Read more

Ensuring Tenant Context for Filament Uploads in Laravel

Introduction

When building multi-tenant applications with Laravel and Filament, it's crucial to ensure that operations are performed within the correct tenant context. This post addresses a common issue encountered when using Filament's massive upload feature where the tenant context was not active during Livewire form submissions, leading to data integrity violations.

The Problem: Tenant

Read more