zenxbattle/ApiGateway ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go API gateway for the ZenXBattle platform that acts as the single entrypoint for the frontend.

It should expose a REST API on port 8080, send requests to downstream gRPC services for auth, problems, challenges, leaderboard queries, and code execution, and handle routing cleanly so the frontend does not need to know about the internal services. Please include health and metrics endpoints, CORS, auth handling, and rate limiting per IP and endpoint. I also want structured logging, in memory caching for repeated lookups, and Prometheus metrics at /metrics.

Use environment variables for service addresses with sensible defaults, and make it easy to run locally with one command. If anything needs current library or framework details, look them up online first. Please make the project feel production ready, with clear config, clean middleware, and straightforward Docker support.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab