André Moleirinho · Projects

2026 · Creator & sole developer · Live

BTC Predictor

A real-time BTC higher/lower game on a fair, exactly-once serverless AWS backend.

Players call whether BTC/USD will be higher or lower when the round ends: +1 for a right call, −1 for a wrong one. The React 19 client streams live Coinbase prices over a WebSocket; the backend is serverless AWS - CloudFront, API Gateway, one Lambda per route, DynamoDB and SQS - all defined in a single CDK stack.

Most of the engineering goes into fair, exactly-once settlement: the server stamps the time and fetches the price itself, a delayed SQS message is the round clock, and conditional DynamoDB writes mean nothing the browser sends can change a result.

Highlights

  1. A delayed SQS message is the game clock - no cron, no polling.
  2. Exactly-once settlement through conditional DynamoDB writes; integer cents end to end.
  3. Least-privilege CDK with one Lambda per route; one CloudFront origin, so no CORS.
  4. A React 19 client on a live Coinbase WebSocket, charted with lightweight-charts.
  5. One zod wire contract shared by the client and the Lambdas.
  6. Three leaderboards, candle replays, queued calls and Shift + ↑ / ↓ shortcuts.

At a glance

Role
Creator & sole developer
Years
2026
Source
github.com/afmoleirinho96/btc-predictor
Live
d24sx7p5i55akg.cloudfront.net
BTC ticks over WebSockets
Real-time
serverless, all in CDK
100% AWS
HTTP routes + SQS resolver
12 + 1
Lambda per route
1

Stack

  • TypeScript
  • React 19
  • Vite
  • TanStack Query
  • Zod
  • WebSockets
  • AWS CDK
  • Lambda
  • SQS
  • DynamoDB
  • CloudFront
  • GitHub Actions

Built with TypeScript.