Overview
Comeback is an optimized native-like Persian sports platform built from scratch that has served more than one million users. The application brings together a sports news feed, WebSocket live chat, WebSocket-backed live match scores, prediction flows, and personalized content in a single product. Its mobile-first PWA is engineered to feel like a real app — installable, fast under the thumb, and resilient during peak-traffic moments around live events.
Product engineering
The frontend is built with Next.js, while Go services support the product's backend integrations and delivery needs. Real-time surfaces — including live chat and live scores / match-state updates — travel over WebSockets so the UI stays current without polling during high-traffic games. The product integrates the Yeklist public APIs for sports content and live data, including separate client and server paths where they are appropriate for the experience.
The work also includes the supporting application integrations: sports data, authentication, push-notification preferences, analytics, and a Service Worker for the installable PWA behavior expected on mobile. Mobile delivery covers a Trusted Web Activity release that feels native on Android, plus Swift.
Delivery and observability
Comeback is delivered on Kubernetes behind load balancing, with Bazel for reproducible builds, Docker/OCI images, and HPA autoscaling to keep the service resilient under peak traffic. Prometheus and Grafana provide the monitoring surface for production health during live-event load. This production architecture keeps the deployment path repeatable while allowing the platform to scale with sports traffic at million-user volume.
AI and cost optimization
Comeback uses AI where it is cheapest and most measurable. Comment moderation moved from a general-purpose LLM prompt to Jev, Yektanet's cost-optimized classification model: each policy category is a separate yes/no probability question, severe bad words are caught by a deterministic filter first, and a circuit breaker fails open so an AI outage never blocks the chat. Prometheus tracks Jev cost, tokens, failure reasons, and per-category scores, so spend is visible and thresholds can be tuned.
A Python cron job labels every crawled sports article with a sport, tags, and an importance score using two Jev calls (about $0.00015 per article), under run budgets, chunked commits, and a watchdog. The labels build pre-ranked Redis feeds, so the news page filters by sport and tag, and high-importance stories are posted to Telegram automatically.
Automation and tooling
An MCP server in Go, protected by Keycloak OAuth with mandatory PKCE, token introspection, and confirmation-gated, audited write tools, lets editors run the admin panel from AI agents such as Claude Code. Comeback Studio uses Remotion templates and a render worker to generate pre-match and post-match Instagram story videos from live match data. A technical SEO pass added server-rendered pages, indexable-only sitemaps, canonicals, and cached Open Graph cards.