Skip to content
All projects

"Mal" — a Zero-Cost Grounded Chatbot for This Site

This website (you can pet him, bottom right) · 2026

Azure Static Web AppsAzure FunctionsReactGroq (GPT-OSS 120B)Gemini

Outcome

A working, grounded chatbot at exactly €0/month in running costs

"Mal" — a Zero-Cost Grounded Chatbot for This Site cover

The problem

A portfolio site answers questions in one direction: you read what I wrote. A chatbot can answer the question you actually have — but the usual builds either cost real money every month (hosted LLM APIs, vector databases) or hallucinate freely, which on a professional site is worse than no bot at all.

The brief I gave myself: a bot that knows my projects and experience cold, never invents facts, costs exactly nothing to run, and has enough personality to be worth clicking. Also, it should look like a robotic Belgian Malinois. Some requirements need no justification.

The approach

  • Grounded by construction — Mal's only source of facts is a knowledge pack compiled at build time from the case studies on this site, curated notes on the public repos, and a bio drawn from the About page. The system prompt is strict: if it's not in the pack, Mal says he doesn't know — in character.
  • Free-tier failover — an Azure Static Web Apps managed Function fronts two free LLM tiers: Groq's GPT-OSS 120B first (fast, generous limits), Google's Gemini Flash as failover. No SDKs — two fetch calls and an SSE parser, streaming tokens straight through to the widget.
  • Failure is a feature — when both free tiers are rate-limited (or the daily budget is spent), the API returns "asleep" and the dog visibly naps: ears droop, Zzz floats up, and the widget offers the projects page and contact links instead. An error state that stays in character costs nothing and reads as intentional.
  • Cheap tricks, literally — dog commands ("sit", "who's a good boy?") are matched client-side and answered from a script, with matching avatar animations. They never touch the API, so Mal performs tricks even while asleep.
  • Abuse control without infrastructure — origin checks, message length caps, a per-visitor hourly limit and a global daily budget, all in-memory in the Function. The free tiers' own quotas are the hard backstop; the widget treats any refusal as nap time.

The avatar is a hand-drawn SVG in the same thin-stroke geometric style as the rest of the site's visuals — upright Malinois ears, long muzzle, panel seams, sensor eyes — with state-driven micro-animations (idle blink, thinking head tilt) that switch off under reduced-motion preferences.

The result

A chatbot that answers real questions about my work, links you to the case study or the source code it just described, deflects off-topic questions with one joke, and runs at €0/month — the whole thing, widget and API, is open source. The failure mode gets more compliments than the happy path, which is probably a design lesson.

Want results like this for your business?

Start a project
NZNick Zivkovic

I build reliable web applications and practical AI integrations on .NET, React, and Azure — Microsoft certified, currently a Microsoft vendor working on the Azure platform itself and the AI being built into it.

Microsoft Certified · Current Microsoft vendor — working on the Azure platform itself

Get in touch

© 2026 Nick Zivkovic. All rights reserved.

Freelance .NET & AI Developer