Skip to content
Nguyen Thanh Tai
All projects

Mobile AI · Hackathon

HOICON

An iPhone app that helps elderly parents check scam messages, prescriptions and documents by photo or voice — and pulls their child in when something is dangerous.

Slide showing the parent's phone with a red scam warning and the child's phone receiving the alert.

A red result on the parent's phone alerts the child in the app and on Telegram.

backend tests, all passing
63
backend tests, all passing
lines across app, backend and pipeline
~4.4k
lines across app, backend and pipeline
from base code to working demo
1 day
from base code to working demo

Overview

HOICON ("Hỏi Con" — ask your child) was built for the Codex Community Hackathon – Hanoi, themed "AI in Your Palm". A parent photographs a message, a document or a prescription, or simply asks out loud, and gets a Red, Yellow or Green answer that is read aloud.

The safety rules live in code, not in the prompt: anything that looks like an emergency is forced to Red, and every Red result notifies the child — in the app and through a Telegram bot with one-tap replies.

The problem

Elderly parents get scam calls and messages every day, usually when their children aren't around — and the warning they trust most comes from their own child.

Who it's for

  • Elderly parents with low digital literacy, on the parent phone.
  • Their adult children, who install the app and receive alerts.

What it does

  • Photo and voice in, verdict out

    Camera or library photo, or on-device Vietnamese speech-to-text with auto-send. One structured call returns kind, risk, confidence, answer and actions.

  • Routing and racing

    Short text goes to a light model, images and long text to a heavy one. A racing analyzer starts the next model after a delay or an error and keeps the first success.

  • Code-enforced safety

    Emergency ⇒ Red; Red ⇒ the child is notified in a background task with retries. The prompt only allows 113/115, bans dose advice, and treats text inside images as data.

  • Natural voice

    Gemini TTS with a fallback chain and cache; the first sentence is synthesized first, and the device voice takes over on any error.

How it's built

Two Expo apps — parent and child — share one FastAPI backend. The parent posts a photo or question; the backend analyses it, stores the event, and fans out alerts; the child replies from the app or Telegram.

  1. 1

    Parent app

    Photo resized to 1280 px or speech transcript, sent as JSON to /ask-json.

  2. 2

    Analyzer

    Rule-based light/heavy routing, staggered racing across Claude and Gemini, Pydantic structured output.

  3. 3

    Hard rules

    Emergency forced to Red; Red notifies the family via the in-app feed and Telegram.

  4. 4

    Child & reply

    Child replies with one tap; the parent's phone shows and speaks it.

Engineering challenges

Providers that hang

Problem

Waiting for a timeout before failing over made answers too slow for a live demo.

Solution

Hedged, staggered parallel calls that return the first success and cancel the rest.

Structured output across providers

Problem

Newer Claude models rejected the forced tool-calling route.

Solution

Switched Anthropic models to native JSON-schema structured outputs behind one interface.

My role

  • Led team VCV and was the sole committer of the shipped codebase — mobile app, backend, LLM pipeline and deployment blueprint, built on hackathon day on top of a base I prepared beforehand.
  • Covered the backend with 63 pytest tests using fake LLMs; ran the full flow on two physical iPhones.

Current scope

A hackathon prototype: one demo family, no login, not on the App Store.

Real captures. Click to enlarge.

  • Parent home — large targets, an animated avatar, and the child's latest reply.
  • A Red verdict, read aloud, with clear next steps.
  • The child's alert feed with one-tap replies.
  • The child's reply appears — and is spoken — on the parent's phone.
  • Prescription reading with yes/no clarifying questions.
  • Checking a photographed message (staged demo sample).
  • Pitch slide: input → routing → failover → hard rules → voice.