Latest Updates

Documenting code, one commit at a time.

PHP Stripe

Adding Payment Flexibility with Multiple Gateways

In the fast-evolving landscape of e-commerce, limiting payment options can be a barrier to customer acquisition, especially in diverse markets. Integrating multiple payment gateways can significantly enhance user experience and broaden market reach.

Expanding Payment Options

Supporting only one payment gateway can restrict your application's accessibility to users who prefer or require

Read more

Code Style Consistency in Breniapp/brenia with php-cs-fixer

Introduction

Maintaining a consistent code style is crucial for any project, especially when multiple developers are contributing. This post delves into how the Breniapp/brenia project enforces code style using php-cs-fixer, focusing on Livewire dispatch calls.

The Importance of Code Style

Consistent code style improves readability, reduces cognitive load, and minimizes merge

Read more

Localizing the Breniapp: From Session to User Database

The Breniapp project aims to streamline [description]. Recently, we tackled an issue with the locale switcher that was causing inconsistencies in how user locales were being handled.

The Problem

Previously, the locale selected by a user was only being saved in the session and a cookie. This approach relied on a two-step redirect chain through a LocaleController.

Read more
PHP

Improving Gemini Compatibility with System Prompts in Landing

Introduction

The landing project focuses on creating streamlined user experiences. A recent update ensures compatibility with the Gemini provider by correctly implementing system prompts within the InterviewSimulatorService.

The Problem: System Messages vs. System Prompts

Older Large Language Models (LLMs) often handle system messages as part of the overall message array.

Read more

Improving Job Reliability with Time-Based Retries in Landing

In the landing project, we've been focusing on improving the reliability of background jobs, especially when dealing with rate limiting and throttling exceptions. Previously, we used a fixed number of retry attempts, but this approach proved to be problematic.

The Problem

When jobs are released back to the queue due to rate limiting or throttling middleware, each release counted towards the

Read more
PHP CSS

Unifying Email Styling with Brand Colors in Landing Project

Introduction

The landing project is focused on creating a consistent and appealing user experience. A key aspect of this is ensuring a unified brand identity across all communication channels, including email. This post details how we standardized email styling to align with the project's brand guidelines.

The Challenge

Previously, email templates used per-template color overrides,

Read more
PHP Livewire

Serving Files Directly: Migrating from Livewire AJAX to HTTP Routes

This post details a recent optimization in the landing project, focusing on how we transitioned file downloads from a Livewire AJAX implementation to a more robust HTTP route. This change addresses issues with file corruption and improves overall reliability.

The Problem: Corrupted File Downloads

Initially, we used a Livewire method, downloadCv(), to serve dynamically generated DOCX files.

Read more

Mitigating XSS Vulnerabilities in Livewire/Alpine.js with @js()

The Problem

In the landing project, we encountered a subtle but significant security issue related to how data was being passed from PHP to JavaScript within our Blade templates. Specifically, when using Livewire and Alpine.js, values containing special characters (like apostrophes in names such as "O'Brien") could break the JavaScript context, leading to unexpected behavior or, worse,

Read more

Refactoring PostgreSQL Dashboard Functions in Reimpact/platform

The Reimpact/platform project is focused on [description]. Recent work has concentrated on improving the reliability and accuracy of PostgreSQL dashboard functions. A key area of focus was addressing data type mismatches and sequence issues that could lead to errors and inconsistencies in the displayed data.

The Problem

One specific issue involved the product_ranking function, where a

Read more

Don't Wake Me Up: Scheduled Reminders for Mentorship Sessions

The landing project focuses on creating a user-friendly experience. A new feature has been added to send timely reminders for scheduled mentorship sessions.

The Goal: Prompt and Prepared Participants

The primary goal of this feature is to ensure that both mentors and mentees are well-prepared and punctual for their scheduled sessions. Automated email reminders, delivered 24 hours and 1 hour

Read more