Latest Updates

Documenting code, one commit at a time.

Seeding Initial Data for Tenant-Specific Features

Introduction

This post details the process of seeding initial data, specifically post examples, for tenant-specific features in our application. This approach allows for features like auto-generated posts or random content display that is tailored to each tenant.

The Need for Seed Data

When building multi-tenant applications, providing default or example data for each tenant can greatly

Read more

Enhancing the Landing Page with a Promotional Video

Goal

To create a more engaging landing page experience by embedding a short, autoplaying promotional video.

Implementation

A dedicated video project was created using Remotion v4 to produce a 20-second promotional video. The video highlights key features and provides a call to action.

Video Production

The video was structured into five distinct scenes:

  1. Intro: A brief
Read more

Optimizing Product Ranking and Data Aggregation in SQL

Introduction

This post delves into optimizing SQL queries for product ranking and data aggregation, focusing on common pitfalls and effective strategies to enhance performance and accuracy. We'll explore techniques to address memory errors, improve query speed, and ensure data integrity when dealing with complex relationships and large datasets.

Addressing Memory Errors in Ranking

Read more

Implementing Localized Promo Videos for Global Audiences

The Challenge

Our application needed to support multiple languages for promo videos, ensuring a localized experience for users across different regions. This included translating video content and optimizing video formats for efficient delivery.

The Solution

We implemented a solution involving content localization, component updates for internationalization (i18n), and video format

Read more

Enhancing Data Retrieval Robustness in Data Processing Services

Introduction

This article outlines an approach to enhance the resilience of data processing components when interacting with database tables, specifically addressing scenarios where tables might be temporarily unavailable or not yet provisioned in certain environments.

The Challenge

In dynamic environments, data processing tasks sometimes encounter situations where expected database

Read more
PHP MySQL Laravel

Code Formatting and Database Schema Updates

Overview

Recent development activity focused on code style consistency and updates to the database schema.

Code Formatting

Applied automated formatting fixes using php-cs-fixer. This ensures consistent code style across the project, improving readability and maintainability. The tool automatically adjusts spacing, indentation, and other stylistic elements according to predefined rules.

Read more
PHP MySQL JavaScript

Dashboard Stability: Handling Missing Commits Table

Introduction

The application's dashboard was experiencing crashes for tenants that had not yet run the commits migration. This post details the solution implemented to gracefully handle the absence of the commits table in the tenant schema, preventing dashboard failures.

The Problem

When the dashboard attempted to query the commits table to display user activity and calculate API

Read more
PHP MySQL Laravel

Tenant-Based Billing: Fixing Cashier Customer Model

Introduction

After consolidating billing to a tenant-based system (Phase 3), we encountered an issue with the Cashier package. The default customer model was still set to User, causing errors when Stripe webhook events triggered.

The Problem

The stripe_id column, expected by Cashier, was not found because it was looking in the User model instead of the Tenant model.

Read more