MENU

GET IN TOUCH

shahzadalibalti216@gmail.com
Back

Revio

A device subscription platform, like Apple's iPhone Upgrade Program

Year

2026

Tech & Technique

Next.js 16, Anthropic API, Firestore, TypeScript, Tap Payments, Tailwind v4, GSAP, Playwright

Description

A device subscription platform for the Qatari market. Customers subscribe to a phone on a 24 month term instead of buying it outright: they pass identity checks, sign a contract, pay by card or instalment, and later upgrade, buy out or return the device. One Next.js codebase serves three audiences: a bilingual public storefront, a signed in customer portal and a capability gated admin console. Everything customer facing exists in English and Arabic, with right to left layout from the first commit.

At a Glance

  • ~94,500 lines of strict TypeScript across 102 pages, 108 API route handlers and 152 components
  • 32 Arabic twin routes with full RTL support
  • 37 admin screens
  • 54 executable verification scripts, including 853 pure logic assertions

What It Does

  • Storefront Catalogue with category, brand and condition filters, live subscription pricing per capacity and finish, a trade in valuation wizard, deals and comparison
  • Subscription Flow Eligibility, QID identity capture and review, credit decision, contract generation, e-signature, payment authorisation and fulfilment
  • Customer Portal Active subscriptions, invoices and receipts, payment methods, upgrade and buy out quotes, returns, support and referrals
  • Admin Console Catalogue and variants, pricing tiers, order pipeline, KYC queue, contract archive, refunds, logistics, leads, activity log and reporting
  • AI Concierge A retrieval grounded pre sales assistant that answers policy questions from Revio's own material, narrows a visitor to one device and hands over a product link with capacity and finish already selected. Every conversation is captured as a lead

My Role

Full Stack AI Engineer

The headline decision: a sales assistant that is structurally incapable of quoting a price it was not given, proved by an eval suite graded by code.

  • No Invented Prices The reply schema has no price field. The model returns a structured recommendation and the server renders every figure from live catalogue data. All prose passes a numeric allowlist built from that turn's inputs, and any figure outside it swaps the answer for a hand off to a person
  • Safe Streaming A pure release module holds any token containing a digit until it is whole, so "QAR 1" never appears on screen before ",299" arrives. It is tested by replaying replies chunk by chunk exactly as the network delivers them
  • Evals as a Release Gate 31 scripted scenarios in both languages, covering price invention, prompt injection, out of catalogue requests and abuse. Facts are graded by deterministic code, and only tone goes to an advisory LLM judge. Each run records the corpus hash and model id, so a copy edit or model swap invalidates the last green result. Final state: 31/31 on three consecutive live runs
  • Claude Integration Structured outputs, prompt caching and SSE streaming, with retrieval grounding over a ~30k token corpus and no vector database
  • Firestore Without Composite Indexes Every query uses at most one where() and filters the rest in code, so deploys stay a push with no console step and no index drift
  • Money Correctness Fees, terms, proration and buy out arithmetic live in one module covered by pure tests
  • Server Only Data & Auth Firestore through firebase-admin with no client SDK, and custom jose JWT sessions with role and capability checks on the server
  • Contracts Generated and signed in app with pdf-lib and QR codes, with payments through Tap covering cards, saved instruments and instalments

SHAHZAD ALI

shahzadalibalti216@gmail.com