Selected work

Project / Case study

The Judge — AITA AI Chatbot

Personal project Production

Overview

A public AI courtroom app that turns everyday disagreements into humorous rulings, built with React, Python Azure Functions, Google GenAI, and PostgreSQL.

The application

Screenshots

Select an image to view it larger.

A completed courtroom ruling showing the conversation and YTA verdict badge.
A completed courtroom ruling showing the conversation and YTA verdict badge.
The Judge's main interface with service status, case count, and conversation entry point.
The Judge's main interface with service status, case count, and conversation entry point.
An out-of-role cake request treated as case material and returned as a normal courtroom ruling.
An out-of-role cake request treated as case material and returned as a normal courtroom ruling.
First-use privacy and entertainment disclosure shown before entering the application.
First-use privacy and entertainment disclosure shown before entering the application.

The need

Problem

Users submit disagreements and petty dilemmas for humorous courtroom rulings. Making that simple interaction reliable in a public serverless app meant handling variable model responses, bounded conversation context, input validation, provider failures, shared state, and verdicts that agree with the UI.

The build

Engineering approach

I built the React frontend on Azure Static Web Apps and a same-origin Python Azure Functions backend that calls Google GenAI. Credentials stay server-side; the backend validates input, bounds conversation history, and handles timeouts and provider errors. PostgreSQL holds the deployment-wide case counter outside serverless function memory.

After free-form replies proved brittle, I moved the model to structured verdict, ruling, and consequence fields. Python validates those fields and owns the final response structure; React derives the YTA/NTA badge from the validated verdict. User messages are treated as case material.

The result

Outcome

The app is live in production, turning submitted dilemmas into conversational courtroom rulings. Its validated verdict drives the displayed badge, and PostgreSQL keeps the case counter shared across serverless instances.

Looking back

Lessons & growth

Free-form model output is a poor application contract; validated fields are safer than parsing prose. External AI providers need validation and failure handling, and user content needs a clear boundary from system instructions. Shared serverless state belongs in persistent storage; optional features should not block a ruling.

Back to selected work