Back to Projects

XiaoxingAI

xiaoxingai

A Gmail assistant that classifies and summarises email, sends Telegram notifications, and prepares replies for confirmation.

Role: Solo Developer

Highlights

PythonFastAPIReactTypeScriptViteTailwind CSSPostgreSQLRedisllama.cppOpenAI API
  • Built per-user Gmail polling with OAuth, configurable filters, and processed-message deduplication.
  • Separated classification and summarisation from Telegram message rendering using validated AI output.
  • Added reply confirmation, encrypted draft storage, expiry, and action logs.
  • Built a React dashboard with worker status, live logs, prompts, and user settings.

Problem

Reading and prioritising email requires repeated attention, but automatically sending replies introduces a different level of responsibility.

A multi-user assistant also needs to keep credentials, message records, and worker settings separated.

Approach

Split the workflow into Gmail ingestion, AI analysis, storage, Telegram delivery, and optional reply confirmation.

Keep credentials and processing state scoped to each user, with logs and controls available through a dashboard.

Support local llama.cpp inference and OpenAI-compatible APIs through a shared client.

Result

Built a Gmail-to-Telegram workflow with persistent records, configurable workers, and confirmed replies. The project is offline while its product direction is being redesigned.

Implementation

Email analysis and delivery

  • Implemented configurable Gmail polling workers with query, interval, priority, and mark-as-read settings.
  • Classified and summarised messages before rendering Telegram notifications from validated output.
  • Tracked processed email records to avoid duplicate notifications during repeated polling.

Replies and user isolation

  • Added Telegram confirmation and cancellation actions for outgoing drafts.
  • Stored draft bodies with encryption, expiry, status tracking, and action logs.
  • Scoped Gmail credentials, Telegram bindings, prompts, and worker state to individual users.

Backend and operational controls

  • Used FastAPI and PostgreSQL for application records, with Redis for short-lived cache and tracking state.
  • Added model routing, retries, response caching, and structured-output handling.
  • Built React dashboard views with WebSocket status updates and structured logs.

Lessons

  • Notification rendering is easier to check when it is separate from model-generated analysis.
  • Credentials, retries, deduplication, and draft lifecycle handling need as much attention as the prompts.
  • Building more features does not resolve uncertainty about which user problem is worth solving.