mstrYoda/production-ready-microservice-example — reverse-engineered prompt
Reverse engineered prompt
Build me a production ready Go microservice for managing products.
I want a simple REST API where I can create a product and fetch a product by its ID. Store the product data in Couchbase. Include a health check so I can tell if the service is running.
Please make it easy to run locally with Docker Compose, including Couchbase and the monitoring tools. Add structured logging, basic Prometheus metrics, and OpenTelemetry tracing so requests can be viewed in Jaeger and dashboards can be used in Grafana.
Use config files or environment variables for things like the app port, Couchbase connection, and tracing settings. Include a Dockerfile, a clear README with setup steps, and tests that can be run with go test. Keep the code organized in a clean microservice style with separate areas for handlers, domain models, infrastructure, config, and logging.
Want more depth? Deep Reverse