Skip to main contentSkip to main content
Andrés Morales

Autonomous WhatsApp Agents, 3D Hero in Next.js & Linux Hardening with Caddy HTTP/3

AM

Andrés Morales

AI & Full-Stack Systems Architect

•3 min
#Next.js#n8n#DevOps#Security#Linux#TailwindCSS

The Engineering Challenge: Latency, Conversational AI, and Infrastructure Resiliency

Building modern production platforms requires low latency and security at the host layer. Today's engineering sprint addressed three key pillars:

  1. Conversational Agent Architecture: Provisioning autoRex across WhatsApp and Web-Chat with direct calendar scheduling via n8n, eliminating manual email dispatch failures.
  2. High-Performance UI Engineering: Integrating TiltedGridHero, a 3D cylindrical gallery utilizing hardware-accelerated CSS transforms for flagship portfolio displays (BarrioTech, Dekambelleh, El Gato Colectivo).
  3. Host-Level Linux Hardening: Strict UFW firewalling, Fail2ban intrusion mitigation, Caddy reverse-proxying with HTTP/3 QUIC, and automated off-site backups directly to Telegram.

Desktop View


Conversational Intelligence: autoRex + n8n + Calendar Integration

To overcome unreliable SMTP deliveries and streamline inbound workflows, we refined autoRex's deterministic system prompts:

  • No Blind Quotes: Strictly directs prospects to interactive /audit reports or technical calls.
  • Direct Calendar Handshake: Queries Google Calendar availability in real-time, locking 30-minute technical sessions via Google Meet.
// n8n / Edge Function Handler - WhatsApp Lead Qualification
interface WebhookPayload {
  senderPhone: string;
  incomingMessage: string;
  source: 'whatsapp' | 'webchat';
}

export async function handleIncomingLead(payload: WebhookPayload) {
  const sanitizedPhone = payload.senderPhone.replace(/\D/g, '');
  
  const isAuditRequest = /audit|speed|ux/i.test(payload.incomingMessage);
  
  if (isAuditRequest) {
    return {
      action: 'REPLY_WHATSAPP',
      message:
        'Hi there! We can audit your website speed on Google Cloud 4G and UX friction immediately. Head to andresmorales.com.co/audit or send your URL here to get started.',
    };
  }

  return { action: 'ROUTE_TO_AGENT', agent: 'autoRex' };
}

Frontend Components: Cylindrical 3D Transformation with TiltedGridHero

We ported TiltedGridHero into Next.js using Tailwind CSS and TypeScript. Slicing images into geometric facets on a 3D cylinder creates continuous orbital movement with minimal JS overhead.

ROI Component

// components/ui/tilted-grid-hero.tsx
'use client';

import * as React from 'react';
import { cn } from '@/lib/utils';

interface TiltedGridHeroProps {
  images: { src: string; alt: string }[];
  className?: string;
  children?: React.ReactNode;
}

export function TiltedGridHero({ images, className, children }: TiltedGridHeroProps) {
  return (
    <section className={cn('relative overflow-hidden preserve-3d', className)}>
      <div className="absolute inset-0 pointer-events-none [mask-image:radial-gradient(ellipse_at_center,transparent_20%,black)]" />
      {children}
    </section>
  );
}

DevOps & Security: VPS Hardening, Caddy HTTP/3 and Telegram Snapshots

Production servers require strict perimeter defense and reliable disaster recovery:

  1. Caddy Reverse Proxy: Automatic TLS 1.3 issuance and native HTTP/3 QUIC transport over UDP.
  2. UFW Rules: Default inbound deny policy, limiting exposed ports strictly to 22 (SSH), 80, and 443.
  3. Fail2ban Jails: Continuous log evaluation actively blocking brute-force attempts on SSH and container runtimes.
  4. Automated Telegram Vault: Encrypted database dumps dispatched off-site via Telegram Bot API.
# Linux host hardening
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443
sudo ufw enable

# Automated snapshot replication to Telegram
DATE=$(date +%Y-%m-%d_%H%M)
BACKUP_FILE="/tmp/db_snapshot_${DATE}.sql.gz"
pg_dump -U postgres -d app_production | gzip > "${BACKUP_FILE}"

curl -F chat_id="${TELEGRAM_ADMIN_VAULT}" \
     -F document=@"${BACKUP_FILE}" \
     -F caption="📦 Production DB Snapshot - ${DATE}" \
     https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument

rm -f "${BACKUP_FILE}"

Mobile View


Wrap-Up & Actionable Next Steps

Pairing autonomous agent pipelines with resilient Linux infrastructure ensures dependable conversion channels without operational bloat.

Ready to assess your site performance or automate enterprise workflows? Try the live audit at /audit or schedule a technical call.

CONSULTING & ARCHITECTURE

Need to automate your business operations or ship high-velocity web products?

I architect AI pipelines, modernize stacks with Next.js, and harden Linux infrastructure. Let’s talk architecture, scalability, and measurable ROI.

AI Automation · UI/UX · Production

Ship the thing.Skip the boilerplate.

Independent practice based in Cali. Automation flows, hand-built UI, and end-to-end web — for teams that would rather have it done than debate it.

Let's talk
2,014Est. 2014

From intake to deploy, the studio keeps work in one place: scope, design, build, ship. Briefs land on the desk, deliverables land on the client.

Andrés Morales