backend-for-frontend @sushrutalgs.ai

See the full portfolio →

Built with

  • TypeScript
  • Hono
  • Cloudflare Workers
  • Supabase
  • Vitest

Links

  • live product↗
  • Email→

Source is private; sushrutalgs.ai is a live product. Happy to walk through the work in a conversation.

A Cloudflare Workers gateway between the sushrutalgs.ai web and iOS apps and the AI backend, giving both clients one trusted entry point for authentication, usage limits and streaming responses.

The problem

The product has two clients, a web app and a native iOS app, that reach the same AI backend. Letting each call the backend directly would mean shipping credentials inside an app binary and writing sign-in and usage-limit rules twice, in two languages, where they drift. The gateway exists so there is exactly one place that knows who the user is and what they are allowed.

What I built

A lightweight edge service that authenticates both clients, enforces each user's plan limits correctly even when requests arrive at the same instant, and streams the AI backend's answers straight through without buffering. It fails closed: anything that could go wrong is resolved before the first byte of a response leaves, so a user is never charged twice or given an answer outside their plan.

Where it stands

It is live in staging and production, serving both clients with low single-digit-millisecond overhead at the edge, and held 200 concurrent requests with zero errors under load testing. Staging and production deploy separately, so a web change cannot take the shipped iOS app down with it.

More case studies

  • sushrutalgs.ai web app: a cited RAG study assistant
  • HybridFlow: hybrid RAG with traceable citations
  • sushrutalgs.ai iOS app: streaming cited answers
  • Samhita: textbook PDFs to structured data
  • MACE-PINN: ensemble physics-informed neural networks
  • Yelp ML platform: 7M reviews, recsys and sentiment API
  • All projects →
  • Contact →