
Alejandro Alvarado
Autonomous agents at $0.001/booking. Enterprise CRM that replaced InConcert at Movistar.
30-min call, free.
You tell me the problem. I tell you if I can help.
Spec with prices.
2–3 approaches with timelines and trade-offs. You choose what fits.
Milestone-based build.
You pay per delivery. Code review at every step. You see progress every week.
You own the code.
No lock-in. Optional retainer post-deploy. The system goes to production.
CASE STUDY 01 — METEOR
53%
Process time ↓
$0
License cost
< 2 mo
Payback period
100%
ROI achieved

01 — The Problem
Lead management and reporting depended on a third-party system (InConcert) that cost $1,000 USD/month in licenses. Each lead process took 169 minutes, and generating reports required 30 minutes of manual work daily.
Every custom report required a developer to write ad-hoc SQL queries — a bottleneck that delayed operational decisions by days. Agents had no self-service access to their own data.
02 — Approach
01
Replaced the monolithic InConcert UI with a Vue.js + Tailwind frontend and C# .NET backend, cutting process time by 53%.
02
All lead data migrated into a normalized SQL Server schema, eliminating the $1K/mo licensing cost entirely.
03
Built on-demand reports (Excel, PDF, CSV) with configurable validation rules. Eliminated 30 min/day of manual reporting and the developer bottleneck for custom requests.
03 — Impact
53%
Process time reduction
169 min
Before
79 min
After
15 → 13
Steps
2 process steps eliminated
3 → 1
Tools
Consolidated into single CRM
$1K → $0
Licensing
License cost eliminated
Stack: Vue.js · Tailwind CSS · C# .NET · SQL Server
04 — Deep Dive
JWT Authentication — stateless session management
Built a stateless auth flow with JWT and refresh tokens between the Vue.js SPA and the C# .NET API. Access tokens carried the user session in a signed claim, issued with short expiry. The middleware validated tokens on every protected route and returned 401 on expiration — the client then called a dedicated /auth/refresh endpoint to rotate the pair atomically inside a serializable transaction, eliminating race conditions inherent to middleware-side rotation.
public class JwtRefreshMiddleware
{
private readonly RequestDelegate _next;
public JwtRefreshMiddleware(RequestDelegate next) => _next = next;
public async Task InvokeAsync(HttpContext context)
{
var accessToken = context.Request.Headers["Authorization"]
.FirstOrDefault()?.Replace("Bearer ", "");
if (accessToken is null)
{
await _next(context);
return;
}
try
{
var principal = ValidateToken(accessToken);
context.User = principal;
}
catch (SecurityTokenExpiredException)
{
context.Response.StatusCode = 401;
return;
}
await _next(context);
}
}
// Refresh rotation moved to dedicated endpoint
// to avoid race conditions on parallel requests
// POST /auth/refresh
public async Task<IResult> RefreshEndpoint(
HttpContext context,
Database db)
{
var refreshToken = context.Request.Cookies["refresh_token"];
if (refreshToken is null)
return Results.Unauthorized();
await using var tx = await db.Connection
.BeginTransactionAsync(IsolationLevel.Serializable);
try
{
var stored = await db.RefreshTokens
.FindAsync(refreshToken);
if (stored is null || stored.ExpiresAt < DateTime.UtcNow)
return Results.Unauthorized();
db.RefreshTokens.Remove(stored);
var newPair = TokenIssuer.IssuePair(stored.UserId);
db.RefreshTokens.Add(new Pair
{
Token = newPair.RefreshToken,
UserId = stored.UserId,
ExpiresAt = DateTime.UtcNow.AddDays(7)
});
await db.SaveChangesAsync();
context.Response.Cookies.Append("refresh_token",
newPair.RefreshToken,
new CookieOptions
{
HttpOnly = true,
Secure = true,
SameSite = SameSiteMode.Strict
});
return Results.Ok(new
{ AccessToken = newPair.AccessToken });
}
finally
{
await tx.DisposeAsync();
}
}SQL Server Stored Procedures — parameterized report generation
All report queries lived in stored procedures with strict parameterized inputs, preventing injection and ensuring consistent execution plans. The frontend called a single .NET endpoint that executed the procedure, serialized the result into Excel/PDF/CSV on demand, and streamed it back — replacing 30 minutes of daily manual work per agent with a 5-second download.
CREATE PROCEDURE usp_GenerateLeadReport
@StartDate DATE,
@EndDate DATE
AS
BEGIN
SELECT
ClientName,
Status,
DATEDIFF(MINUTE, CreatedAt, ClosedAt)
AS ProcessingTime
FROM Leads
WHERE CreatedAt BETWEEN @StartDate AND @EndDate
ORDER BY CreatedAt DESC
ENDCASE STUDY 02 — SoffIA: Autonomous Agent for a Dental Clinic
< 8s
Response time
100%
Leads captured
< 8%
No-show rate

01 — The Problem
Dental and aesthetic clinics operate on a brutal conversion window: a lead unanswered for >8 minutes has a ~80% chance of booking with a competitor.
02 — The Architecture
The ingress pipeline: inbound WhatsApp messages hit Redis for rapid-fire coalescing, acquire a debounce lock within a 3-second window, then enqueue a deferred QStash job — all before the LLM is ever invoked. Duplicate message IDs are dropped at the idempotency gate.
03 — Architectural Patterns
01
Using Vercel AI SDK's prepareStep to inject tools dynamically mid-reasoning, eliminating deadlocks and hallucinated confirmations.
02
No cron, no persistent state. A JIT Guard checks appointment validity before each T-24h/T-2h send, killing race conditions cold.
03
The LLM only receives tools relevant to its current gate (Identity vs Booking), guided by strict Zod telemetry. Anti-hallucination by architecture.
04
Zero-token Noise Guard for IVRs. Strict regex interventions for Code Red, minors, and trolls — triggering instant human handoff.
Read: Deterministic AI →04 — Deep Dive
ARCHITECTURAL PRINCIPLE
DB-Fat, LLM-Light: state management and business logic live in PostgreSQL via a deterministic flow protected by mutex locks. The LLM operates purely as a semantic router — stateless, sandboxed, and cost-controlled by the Loop Shield.
PRODUCTION CONSTRAINT
The production agent handles multi-patient bookings concurrently. Atomic room locking via PostgreSQL FOR UPDATE SKIP LOCKED, payment voucher OCR validation, and Google Calendar bidirectional sync — all within a single Vercel serverless function (60s budget). Zero cold-start failures.
Loop Shield — forced tool termination
// LOOP SHIELD: From Step 4 onward, if tools appear in two consecutive
// steps, it's a cognitive loop. Tracks tool presence, not identity.
// Threshold is 4 because steps 1-3 are permitted critical transitions.
if (stepNumber >= 4) {
const prevStepHadTools = (steps[stepNumber - 1]?.toolCalls?.length ?? 0) > 0;
const prevPrevStepHadTools = (steps[stepNumber - 2]?.toolCalls?.length ?? 0) > 0;
if (prevStepHadTools && prevPrevStepHadTools) {
return { toolChoice: 'none' };
}
}Gate Refresh — mid-reasoning state injection
// If gate advanced to GATE_SCHEDULE or GATE_IDENTITY and transaction
// tools are not yet registered, inject them.
if (
(freshGate === 'GATE_SCHEDULE' || freshGate === 'GATE_IDENTITY') &&
!allowedTools['reservar_cita_sota']
) {
allowedTools['revisar_disponibilidad_sota'] = buildRevisarDisponibilidadTool(
identityContext.org_id,
identityContext.contact_id,
identityContext.min_hours_notice
);
allowedTools['reservar_cita_sota'] = buildReservarCitaTool(
identityContext.org_id,
identityContext.contact_id,
freshInterestId,
freshName,
freshDni,
dbMeta.resolvedDeposit || '0',
identityContext.bank_details_text,
identityContext.min_hours_notice,
activeOptionsArr
);
}05 — The Result
COST METRICS
Avg cost per booking: ~$0.001
LLM calls per booking: 3–5 (gate-gated, not open-ended)
Model: DeepSeek-V4 · ~2,400 tokens avg per booking
| Metric | Before | After |
|---|---|---|
| Response time | 47 min / ∞ (after hours) | < 8 seconds, 24/7 |
| After-hours leads | 0% (100% loss) | 100% captured |
| No-show rate | ~25% | < 8% |
| Booking deadlocks | Chronic (race conditions) | Zero (Reactive FSM) |
from $1,500
2h deep-dive + written report. Find the bug before it finds you.
from $3,000
Web apps, SaaS MVPs, integrations, automations. Fixed milestones.
from $1,500/mo
SLA <24h for bugs. Monthly review. Your system stays live.
Achievements
Antes perdíamos leads los fines de semana. Ahora SoffIA los convierte mientras dormimos. Mi equipo llegó el lunes con 4 citas nuevas ya pagadas.
— Dra. Jomara Herrera, Cirujana Dentista · Clínica Castro y Herrera
Trabajé con devs toda mi carrera. Alejandro es el único que entregaba antes de que el cliente lo pidiera. Eso no es desarrollo. Es anticipación.
— Abraham Mantilla Elorriaga, Socio Comercial · SoffIA
Available for projects
I help companies build production AI systems and replace legacy enterprise infrastructure.
If your AI-powered system handles something that can't fail, let's talk 30 minutes. If I have nothing to contribute, I'll tell you in the first 10.
Curious how I think about production risk? Read about the time I almost cost a client its tax audit trail →
¿Hablas español? Escríbeme directo: roddcode.dev@gmail.com· Response < 4h