Engineering case study · AI & automation

Alpha AI Trader

A trading-journal coaching prototype with shared browser/server analytics and optional AI providers.

Working prototypeSource inspected · Independent project
Repository (opens in a new tab)Explore demo (opens in a new tab)
Alpha AI Trader dashboard with sample trading statistics, an equity chart and a browser-local mode indicator.
Actual demo capture. Figures are seeded example trades, not real financial results.

The problem

A journal records trades, but making sense of risk, repeated habits and changing results requires a separate analysis step.

The implementation

A JavaScript engine turns journal data into statistical reports and explainable coaching. A Hono API shares the same engine, with optional LLM wording and a deterministic fallback.

System structure

Architecture in practice.

  1. The same dependency-free analytics modules run in the browser and the server.

  2. Hono routes expose trade journals, history, chat sessions and coaching behind validation and request limits.

  3. Storage selects Cloudflare D1 when bound, otherwise a nonpersistent memory store. The Vercel dashboard keeps journal data in the browser.

  4. Optional Groq and Cloudflare Workers AI providers can polish a grounded engine answer. Provider failure falls back to the engine.

Engineering decisions

  • Share domain calculations instead of maintaining separate frontend and API scoring implementations.
  • Calculate an answer before invoking an optional provider, keeping the prototype usable without credentials.
  • Bound chat history and accept only user/assistant roles when constructing model context.
  • Keep a client-local mode available when durable server storage is absent.

Challenges & tradeoffs

  • The UI must explain the difference between a statistical estimate, a detected journal pattern and a guaranteed financial outcome.
  • Serverless and browser-only deployments have different persistence guarantees.
  • Optional provider failures must not erase the deterministic result.

What the project teaches

  • A pure domain layer can support several runtimes without tying analytics to a deployment platform.
  • Fallback behavior and visible storage state are part of the product experience.
  • AI integration benefits from grounded inputs, bounded context and explicit provider status.

Current scope & limits

  • Educational prototype; no verified trading returns, prediction quality or live trade execution.
  • The inspected live deployment reported engine-only alpha mode and memory server storage. Optional AI-provider wiring exists in source; live LLM use was not verified.
  • Repository tests exist, but this portfolio audit did not rerun them or independently reproduce README performance claims.

Contribution & source evidence

Independent, AI-assisted project published and merged by Zahid Hasan. The public history records both owner merges and Claude-assisted implementation.

The case study reflects inspected source. External project test suites and business outcomes were not independently evaluated.

Let's talk about practical engineering.

Contact Zahid