hackthur-organitzation/iot-microservice ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Go microservice for an IoT app, with a clean structure for controllers, models, database, and server setup. I want it to run as a backend API that can store and read simple device related data, like sensors, readings, or device status, and be easy to extend later.

Make it feel like a real service I could run locally and in Docker, with the main entry point in place and sensible defaults for configuration. Keep the code organized and straightforward, with separate layers so the API logic, data models, and database access are not all mixed together.

If anything is unclear, make reasonable choices and keep it simple. I’d also like basic error handling, a few useful endpoints, and a structure that would make it easy to add more IoT features later. If you need to check current Go docs or best practices for anything, go ahead and look them up.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab