Skip to content

AIM Store

Hub is the monorepo for AIM Store, a combined e-commerce and fantasy-sports platform: shop a product catalogue paid from a wallet-credit balance, top the wallet up through CCAvenue or PhonePe, and play cricket fantasy contests and prediction markets — from an Android/iOS app or the web.

The problem

AIM Store's customers buy physical products with a prepaid store-credit wallet and play skill games (fantasy cricket contests, pick-one-player sets, Probo-style prediction orderbooks) against live match data. Running that needs a storefront app + website, a wallet with a verified money-in path, payment gateways, live sports-data ingestion, an operations back office, and observability — all deployable by a very small team.

The solution

One repository containing every part of the platform:

  • an Expo / React Native mobile app and a Vite React website for customers (the website also runs the Express payment server that fronts CCAvenue and PhonePe);
  • a Go 1.25 + Fiber backend — one API for auth (OTP + password), products/categories, wallet + verified top-up, server-authoritative checkout, support tickets, affiliates, account deletion, fantasy contests, and predictions, plus a large /api/v1/admin/* surface;
  • a Next.js 14 admin portal for operations, logging in through the backend's POST /api/v1/auth/admin/login;
  • a single-VPS Docker Compose stack behind Caddy, deployed by GitHub Actions → GHCR → SSH pull;
  • a Grafana/Prometheus/Loki/Tempo monitoring stack with provisioned alert rules.

Who it's for

  • Customers — via the mobile app and the website (aimstoreorg.com).
  • Operations/admin staff — via the admin portal (admin.aimstoreorg.com).
  • Developers — this repository; start with Getting Started.

Current status

The Go backend was restored from this repository's own git history after an earlier cleanup removed it (see ADR 0002); it compiles clean and carries the full route surface. What works end-to-end today:

  • Registration/login (password and SMS OTP), profile, session revocation.
  • The storefront: public catalogue → server-quoted checkout paid from wallet credits → order tracking/cancel.
  • Wallet: balance, transactions, daily spin, and top-up through the verified gateway flow (initiate → hosted payment page → HMAC-verified credit).
  • Fantasy: series/match sync from Entity Sport, contests, teams, scoring, leaderboards, pick-one-player sets, and the predictions orderbook.
  • Support tickets, affiliates, Google-Play-compliant account deletion, admin console, monitoring, and push-to-deploy CI/CD.

What is gated on configuration: payments return 503 until gateway credentials are set; OTP auth needs the SMS provider; the fantasy modules refuse to boot without ENTITY_ACCESS_TOKEN. Direct wallet crediting is intentionally not routed — money enters only through the verified gateway flow. See Features for the exact per-feature status, and the Changelog for how the platform reached its current state.

Production domains

aimstoreorg.com + www (website + payment API) · api.aimstoreorg.com (Go backend) · admin.aimstoreorg.com (portal) · monitor.aimstoreorg.com (Grafana) · docs.aimstoreorg.com (this documentation). All on a single VPS behind Caddy.