Skip to content
all work
Live· 2026-08Personal project

sagot

A multi-tenant AI shopping assistant that answers buyers in Taglish from each seller's own catalog.

Visit live Private repo. Walkthrough on request.
Proof
✓ Live in production
Proof
✓ Abuse and IDOR tested
Proof
✓ Bounded tokens per call

My role

Product, architecture, build and production operations, built with AI coding agents under my spec and review.

The problem

Small online sellers lose sales to unanswered questions. A chatbot that guesses is worse than none, so every answer has to come from the seller's own catalog, and the bot has to know when to hand over to a human.

What I built

  • Per-shop storefronts on their own subdomains, an embeddable chat widget, a seller dashboard with a buyer inquiry inbox, and an admin console.
  • Streaming replies (NDJSON: meta → delta → done), grounded on the catalog, with a confidence threshold that hands the chat to the seller and emails them.
  • Google sign-in and email-OTP signup; deployed on a VPS behind Caddy.

Hard parts

Bounding the cost of every call

Input is capped on both client and server, only the last 16 turns are sent, output is capped at 512 tokens, and free shops have a monthly ceiling, so the worst case is known before launch.

Abuse defense that mostly costs nothing

Burst, per-IP and per-shop rate limits, escalating IP lockouts, and cheap gibberish, repeated-phrase and off-topic guards stop most abuse before it reaches the model.

Tenant isolation

Auth and IDOR paths were tested across shops, so one seller can't read another seller's data.

Stack

  • Next.js
  • TypeScript
  • Tailwind CSS
  • OpenRouter
  • Gemini 2.5 Flash
  • Docker
  • Caddy

Skills shown: Next.js, TypeScript, React, Tailwind CSS, LLM apps (streaming, grounding), Auth & abuse defense, Docker, Linux servers