Latest Updates

Documenting code, one commit at a time.

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

Implementing a Unified Credit Conversion System for AI Services

Introduction

Managing costs associated with AI-powered features, such as text, image, and video generation, can be complex. Our platform needed a unified system to convert these costs into credits, manage profit margins, and track consumption effectively.

The Challenge

Previously, our credit system lacked a standardized approach. Calculating costs for various AI services (text, image,

Read more

Integrating fal.ai for Asynchronous Image Generation in Breniapp

The Breniapp project is integrating fal.ai to provide queue-based asynchronous image generation. This enhancement expands the platform's AI capabilities by introducing a new provider for image creation, offering a scalable and efficient solution for content generation.

The Need for Asynchronous Image Generation

Traditional synchronous image generation can be slow and resource-intensive,

Read more
PHP AI

Scaling AI Models in Breniapp: Adding Fal.ai Integration

Breniapp is enhancing its AI capabilities by integrating with Fal.ai to offer a broader range of image and video models. This update focuses on expanding the selection of available models and incorporating their pricing for credit consumption, enabling users to leverage advanced AI functionalities directly within the platform.

Expanding AI Model Selection

The update introduces several new

Read more

AI-Powered Localization: Streamlining Email Campaigns in Landing

Campaign emails often require localization for diverse audiences. The landing project recently tackled this challenge by automating the translation process using AI, significantly improving efficiency and reach.

The Challenge

Previously, translating campaign emails was a manual and time-consuming process. Each email subject and body needed to be translated into multiple languages, requiring

Read more
PHP AI

Enhancing AI Prompt Generation in Breniapp

Introduction

In the Breniapp project, we've been focused on improving the user experience through AI-powered content generation. A key part of this is crafting effective prompts for the AI. Recently, we enhanced how the system uses onboarding data to create these prompts, leading to more relevant and personalized outputs.

The Problem: Limited Context

Initially, the AI prompt generation

Read more

Enhancing Onboarding with AI-Powered Visual DNA Analysis

The Breniapp project focuses on streamlining brand development. A new feature enhances the onboarding process by incorporating AI-driven analysis of visual references. This allows users to define their brand's visual style through an intuitive, keyword-driven interface.

The Feature: Visual DNA Analysis

The new "Visual DNA" step in the onboarding process leverages AI to analyze uploaded

Read more

Refining Filament Page Layout for Enhanced User Experience

Introduction

In the Breniapp/brenia project, we're continuously working to improve the user interface and overall user experience. One recent focus has been on optimizing the layout of Filament admin panel pages, particularly in scenarios where a more compact design is desired.

The Challenge: Vertical Space Optimization

Filament, a PHP-based admin panel, offers a flexible and

Read more