← All projects
Case study · Fintech · AI agents · Mobile and web
Spirex

A trading agent that reads the market, draws the trade and watches it for you.

Spirex started as an Arabic-first AI analysis app on Google Play. In 2026 I rebuilt it as an agent: it grades every setup A, B or C, draws the plan on the chart, says "wait" when there is no edge, and keeps watching until the trade is ready. A phone app, a web desk, ten edge functions and the sales tools around them, all built from scratch by one person.
RoleFounder: product, brand, full-stack, AI
TimelineDec 2025 → now, v8.10.0 (Oct 2026)
PlatformsAndroid, iPhone and iPad, web (spirex.app)
Core stackReact Native, Next.js, Supabase, Gemini on Vertex AI
Spirex web app home: live gold price, markets, trading agent and today's trades
The live spirex.app dashboard in English, 31 October 2026.
28,900+
registered users
4.8★
5.12K ratings, 10K+ downloads
10
Supabase Edge Functions
18
strategy playbooks

Overview.

Who it is for, what was broken, what shipped.
The audience

Retail traders, mostly in the Gulf

Arabic-speaking traders on gold, forex, crypto and US indices who live in MT4, MT5, TradingView and Telegram. The product is Arabic-first with a full English version.

The problem

Trading alone, without a plan

Moving the stop, chasing candles, asking a Telegram group and entering late. Signal channels sell win rates nobody can verify.

The product

A second opinion that doesn't flatter you

An agent that reads, grades, draws and explains, tells you to wait when there is no edge, and watches the condition for you. No profit promises, no win rate: the decision stays with the trader.

What changed.

From an analysis app to an agent, with a new brand.
Before · v1 to v8.3

A one-shot analysis app

  • GPT-4o turned a pair and a timeframe into one BUY, SELL or WAIT signal
  • Neon-green brand with a mascot
  • Coin economy and bank-transfer receipts
  • Android only, plus a real-time voice analyst
Now · v8.10

An agent that reads, grades, draws and watches

  • Facts computed in code, one Gemini call for the judgement, drawn on the chart step by step
  • A/B/C grades, "wait" with the exact trigger, watch and alert on Telegram
  • Every read graded afterwards; strategies backtested before they are shown
  • Monochrome brand; Android, iPhone, iPad and web on one backend; Stripe plus USDT

The agent.

What a trader sees, and what runs underneath.
It reads the chart the way a trader does, then shows its work
01 · The agent desk

It reads the chart the way a trader does, then shows its work

Pick a market, a timeframe, a playbook (or let the agent pick the best of 18) and a fast or strong read. The agent pulls live candles, the higher timeframes and the news, then draws its read on the chart one step at a time.

  • 1
    Facts computed in code, not guessedMarket structure, order blocks, fair-value gaps, liquidity pools, sessions and premium/discount are calculated in TypeScript on the main and higher timeframes before the model sees anything.
  • 2
    One model call for the judgementGemini on Vertex AI applies the chosen playbook, runs a confluence checklist and returns ordered drawings plus a trade plan. Candles are referenced by index, so a drawing can never point at a price that did not exist.
  • 3
    Live news and calendarA separate call with Google Search grounding returns the news and economic events for the symbol, with sources, so a read is never blind to a release.
  • 4
    Metered on the serverThe sidebar shows today's reads and the plan; every read is counted by the database, not the browser.
A clear call, with every reason
02 · The read

A clear call, with every reason

A real read from the desk: sell gold on the 5-minute chart, grade B. Every read has the same shape, so a trader learns to scan it in seconds.

  • 1
    Grade decides the sizeGrade B means one condition is missing, so the agent says to trade half the usual size with a limit order. Grade C means wait, with the exact trigger.
  • 2
    Conditions, counted"5/6 conditions" sits next to the confidence, so the user sees how much of the setup is really there.
  • 3
    Drawn on the chartThe structure break (CHoCH), entry, stop and three targets with their R multiples are printed on the live chart.
  • 4
    Explained, then exportableSummary, Why?, Plan, News and Explanation tabs show the reasoning; Partners can copy the read to TradingView as Pine Script.
It watches so you don't

It watches so you don't

Tap "Watch" on a wait-read. A job checks every 5 minutes, re-runs the full read near the entry and alerts by Telegram and Web Push when the trade is ready.

Signals Hunt

Signals Hunt

Daily trades the scanner picks only when several strategies tested on years of history agree. Closed trades stay listed with their wins and losses.

Spirex Vision

Spirex Vision

Upload a screenshot from MT4, MT5 or TradingView and get the same plan back. Moved from GPT-4o to Gemini on Vertex AI in October 2026.

Real screens from the live spirex.app web app, English interface, 31 October 2026. Some AI-written notes are in Arabic because those reads were made for Arabic-speaking users. Educational analysis, not financial advice.

A real read, recorded.

One minute on the live desk, in Arabic, with nothing edited.
The user picks the market and timeframe, chooses a fast or strong read, and the agent reads, grades and draws entry, stop and targets. Educational analysis, not financial advice.

Architecture.

Three clients, one Supabase project, ten edge functions.
Clients
React Native app, v8.10.0Android, iPhone and native iPad · web-parity "SPX" shell · agent, Vision, watches, plans, admin
Next.js 15 web desk (PWA)spirex.app in Arabic and English · agent desk with live charts · learn pages · notifications · admin
Telegram@spirexappbot alerts · Closer and Reach tools on the support account
→
Supabase (Deno Edge Functions + Postgres)
Agentspirex-draw (read and plan) · spirex-watch · spirex-grade · spirex-edge · spirex-agent (computer use)
Product and moneyspirex-vision · spirex-stripe · spirex-telegram · spirex-ai (chat and voice) · spirex-analyze (legacy signals)
PostgresRLS and plan-column guards · agent_entitlement / agent_consume RPCs · agent_analyses, agent_edge ledgers · pg_cron jobs · Vault for keys
→
External services
Google Vertex AIGemini Pro and Flash for reads and Vision · Google Search grounding for news · Gemini Computer Use
Market dataBinance · Twelve Data · Yahoo Finance fallback · economic calendar
Payments and deliveryStripe Checkout · USDT TRC20 receipts · Web Push · Telegram Bot API · Google Play
React Native 0.82
React 19
TypeScript
Next.js 15 (PWA)
Supabase Edge Functions (Deno)
PostgreSQL + RLS
pg_cron
Gemini on Vertex AI
Google Search grounding
Gemini Computer Use
OpenAI Realtime (voice)
Playwright
WebSockets
Stripe Checkout
USDT TRC20
Telegram Bot API
Web Push
Python
Telethon
Binance and Twelve Data feeds
Pine Script
Blender

Built from scratch.

The engines and tools around the product, written for Spirex.
spirex-edge

Backtester

Replays the live scanner's own detectors bar by bar over months of history and grades every signal with fixed rules. Each symbol, timeframe and strategy gets a trade ledger with win rate, average R, profit factor, max drawdown and worst streak. A detector that loses on a market is never shown there as an opportunity.

Deno · TypeScript · PostgreSQL ledger tables
spirex-grade

Track record

Every 15 minutes, a pg_cron job replays each saved buy or sell read against the candles that came after it. The rules are conservative on purpose: a candle that touches both stop and target counts as the stop, half the position closes at the first target and the stop moves to breakeven.

Supabase Edge Function · pg_cron · agent_analyses
spirex-watch + Telegram bot

Watch and alert engine

Turns a "wait" into a watch. A cheap candle check runs every 5 minutes; only when price reaches the entry zone does it re-run the full read. An A or A+ result goes out by Web Push and through the @spirexappbot Telegram bot, linked with a one-time code.

pg_cron · Web Push · Telegram Bot API webhooks
agent-runner + spirex-agent

Computer-use agent (preview)

An admin preview of "trade with a computer": a real Chromium opens TradingView, Gemini Computer Use on Vertex AI looks at the screen and drives the mouse, and the browser is streamed live to the page with every action announced first so the UI can animate the cursor.

Node.js · Playwright · WebSockets · Chrome screencast · Gemini Computer Use
Telegram sales assistant

Spirex Closer

Answers client DMs on the Spirex Telegram account. It waits until the client stops typing, reads the chat, photos and voice notes, then decides to reply, skip or hand off to me. Guards in code block any wallet address but the real one, block win-rate claims, never message first and cap replies per hour. Starts in draft mode: I approve with /ok.

Python · Telethon · Gemini · knowledge in editable Markdown
Inbox intelligence

Spirex Reach

A read-only scanner that sorts every private chat into subscribers, people who say they paid, people who say they will subscribe, and leads, cross-checked against paid accounts in the database. It never sends, never marks a chat as read and never downloads media.

Python · Telethon · SQLite · local web UI

Engineering deep dives.

Six problems that shaped the rebuild.

1. Facts in code, judgement in the model

Problem
A language model asked to "analyse the chart" invents levels and draws on prices that never traded.
Approach
Everything measurable is computed first in TypeScript (structure, order blocks, gaps, liquidity, sessions, premium/discount) on the main and higher timeframes. The model gets those facts plus the playbook and returns drawings that reference candles by index, a graded checklist and a plan. Each plan is stored so it can be graded later.
Trade-off
One large structured call per read; a guard repairs model JSON that gets cut off instead of failing the read.
Lives in: supabase/functions/spirex-draw (index.ts, facts.ts, signals.ts, core.ts)

2. Honest numbers instead of promises

Problem
Trading products sell win rates they cannot prove. Spirex's positioning is the opposite: no win-rate promises at all.
Approach
Two independent graders. spirex-grade replays every real read against later candles; spirex-edge backtests the detectors over months and hides any strategy that loses on a given market. Both use fixed, conservative rules so the numbers can be trusted internally before anything is shown.
Trade-off
Worst-case rules understate results, which is the right side to err on.
Lives in: spirex-grade, spirex-edge, agent_edge, agent_edge_trades

3. Watching markets without burning AI spend

Problem
Users want to be told when a setup is ready, but re-running a full AI read every few minutes for every watch is expensive.
Approach
Two speeds. A cheap check on fresh candles every 5 minutes (invalidated, expired, or inside the entry zone within ¼ ATR). Only inside the zone, at most every 10 minutes, or once an hour anyway, does it pay for the full read. Ready results go to Web Push and Telegram.
Trade-off
Alerts can arrive up to 5 minutes after the zone is touched.
Lives in: spirex-watch, spirex-telegram, pg_cron jobs check_agent_watches and telegram_agent_digest

4. Entitlements the client cannot fake

Problem
Plans, daily quotas and market locks have to hold on a phone app, an iPad and a web app at the same time.
Approach
Two Postgres functions, agent_entitlement and agent_consume, decide the plan, the counters and the market lock (free accounts read crypto only) on every read. Row-level security plus a guard on the plan columns stops a client from writing its own tier; disposable e-mail domains are rejected at sign-up and the free trial unlocks by linking Telegram.
Trade-off
Every read pays one extra round trip to the database.
Lives in: Supabase migrations, agent_entitlement / agent_consume RPCs

5. Two payment rails for markets cards don't reach

Problem
Many users cannot pay by card, while others expect instant card checkout.
Approach
Stripe Checkout for cards: nothing is written until Stripe says paid, and the phone app opens Checkout in the browser and verifies with the session id it kept. USDT (TRC20) stays the fee-free route: the user uploads the receipt and an admin approval grants exactly what was paid for.
Trade-off
The USDT route needs a human approval step.
Lives in: spirex-stripe, payment_proofs, admin payments screen

6. One backend, three clients

Problem
The Android app, the iPhone/iPad build and the web desk must show the same plan, quota and history for the same account.
Approach
One Supabase project for everything. The React Native app got a web-parity shell (src/spx) so the agent, home, sign-in and plans look and behave like the web; reads, history and payment state live in Postgres, never on the device.
Trade-off
Quota limits are mirrored by hand in the app, the web and the edge functions.
Lives in: spirexmobile/src/spx, spirex-web (Next.js 15)

The new brand.

Monochrome, chart-shaped, built to sit next to TradingView.
Spirex S markSpirex logo

From neon green to ink and paper

The old neon-green look and mascot read like a signal group. The new identity is an S drawn as a price chart, set in black and white, with green and red kept only for price moves on the chart. I made the full kit (logo, S icon, wordmark, app icons and favicons), the animated 3D logo used as the loader, and the Blender-rendered promo videos, and carried the same tokens into the app, the web and the bootsplash.

Business model.

Free on crypto, then a monthly plan or a one-time Partner plan.
Free
$0
  • 3 fast reads on Bitcoin, Ethereum and Solana
  • One active watch
  • Free trial unlocked by linking Telegram
Trader
$39 / month
  • 10 fast reads a day on gold, forex, indices and crypto
  • 3 active watches with alerts
  • One strong setup a day on Telegram
Partner · pay once
$299 / lifetime
  • 10 strong reads on the strongest model + 30 fast a day
  • Every market, 10 active watches, every strong setup on Telegram
  • Pine Script export, options trading first, 1:1 support
Card payments through Stripe activate instantly; USDT (TRC20) receipts are approved in the admin dashboard. Users who bought older plans keep Vision-only legacy access.