Fermin Perdomo

Senior Full Stack Engineer | PHP | JavaScript

Posts

Don’t Reinvent the Wheel — Use Built-in Utilities

I was working on adding a canonical URL structure in a project when I came across some old code that was manually parsing the query string.

How to Implement EF Core-Like Interceptors in .NET Framework with EF6

When working with .NET Core and EF Core, it's easy to plug in interceptors using the built-in AddDbContext and AddInterceptors methods:

services.AddDbContext<IApplicationDbContext, ApplicationDbContext>(
    (sp, options) => options
        .UseSqlServer(connectionString)
        .AddInterceptors(
            sp.GetRequiredService<UpdateAuditableInterceptor>(),
            sp.GetRequiredService<InsertOutboxMessagesInterceptor>()));

But what if you're working with a legacy .NET Framework 4.x project using Entity Framework 6.x?

In this post, I’ll show you how to implement similar behavior—using interceptors, dependency injection, and auditable logic—in a .NET Framework + EF6 setup.

Connect Laravel with Twilio + OpenAI voice assistant

1. What You’ll Build and Why It Matters

You’re going to Connect Laravel with Twilio + OpenAI voice assistant to let callers talk to an AI agent over a real phone line. The AI will listen and reply in real time, handle interruptions, and even hand off to a human when needed. Use this for after-hours support, appointment scheduling, lead capture, surveys, or intelligent IVRs. Twilio handles phone calls; Laravel handles the webhook logic; OpenAI’s Realtime stack handles speech+reasoning+voice replies. Recent releases added production-grade updates and SIP/telephony features that make this much smoother and lower latency than old “record → transcribe → respond” loops.


High-Level Architecture for Your Medicare AI Bot + Vicidial

How to create Medicare AI Bot integrated with VICIdial can automate and scale outbound calling campaigns, offering compliant, intelligent voice assistance for:

  • ✅ Medicare Part A, B, C, D inquiries
  • ✅ Eligibility screening
  • ✅ Plan comparisons
  • ✅ Enrollment assistance
  • ✅ Handoff to human agents when needed

Realtime dashboard with Firebase and Laravel API

Why a Realtime dashboard with Firebase and Laravel API matters

Building a Realtime dashboard with Firebase and Laravel API helps teams see changes the instant they happen. Think orders per minute, vehicles on a map, live inventory, or support tickets. Traditional reporting stacks batch data. That’s fine for end-of-day summaries, but not for reacting in seconds. Laravel gives you a familiar, productive backend with clean routing, validation, and queues. Firebase delivers low-latency streaming, scalable storage, and battle-tested auth. Together, they’re a practical pairing: Laravel handles business logic and integrations; Firebase pushes live updates to users without you writing socket servers from scratch.

You’ll also get portability. If your sources include webhooks (Stripe, Shopify), IoT publishers, or internal microservices, a Laravel API is an easy landing zone. From there, the API standardizes payloads, enforces rules, and publishes events to Firebase. On the client, a lightweight web app subscribes to Firebase listeners and renders charts, tables, and alerts in real time. This guide walks through architecture, modeling, security, performance, testing, deployment, and cost control—so your dashboard is fast today and still fast when traffic spikes tomorrow.

How to structure Laravel inertia with Spatie Data

Learn How to structure Laravel inertia with Spatie Data using battle-tested patterns for folders, DTOs, transformers, validation, and testing—ship faster with cleaner code.

How to structure Laravel API with Spatie Data

Why Spatie Data fits modern Laravel APIs

In modern Laravel apps, we want clear boundaries: controllers should coordinate, actions should do work, and data should move in and out in a predictable way. Spatie’s laravel-data package gives you Data objects (like DTOs) with helpful features: typed properties, validation, casting, and easy serialization. That means less glue code and fewer bugs from loose arrays.

Data classes help you:

  • Build explicit contracts for requests and responses.
  • Keep controllers thin by hydrating input into typed objects.
  • Serialize output in a consistent shape (including nested relations).
  • Add transformations and default values in one place.
  • Reduce drift between your docs, your code, and what clients actually get.

The result? A clean API that is easy to maintain, test, and scale.


How to render realtime record with firebase in react the right way

If you’ve ever worked with Firebase Realtime Database, you know how magical it feels to see data update instantly in your app. But here’s the catch: once your database starts growing to thousands or even millions of records, that magic can quickly turn into lag, unnecessary bandwidth costs, and frustrated users.

A common mistake is to subscribe to an entire node and dump everything into state. It works fine when your dataset is small — but at scale, you’ll end up trying to render way more than your UI (or your users) can handle.

The good news? You don’t have to choose between “realtime” and “performance.” With the right approach, you can keep your app fast, efficient, and responsive even as your database grows.

Simple way to create an api service with Laravel

1) New project + API mode

composer create-project laravel/laravel thirdparty-api
cd thirdparty-api
php artisan serve

In .env set your DB and APP_URL.


Outbound AI Agents with VICIdial + Ultravox

I’ve been experimenting with combining VICIdial (classic Asterisk-based dialer) with Ultravox (speech-language model for real-time voice AI). The goal: let the dialer place calls, route live answers to an AI bot, and then transfer to a human closer when needed.

Most call centers still run VICIdial, one of the most reliable dialers out there. But what if every live answer could be handled first by an AI agent—qualifying, answering FAQs, even delivering compliance lines—before a closer picks up?

Older articles