virakthaka/Golang-Sample-CRUD ? reverse-engineered prompt

Reverse engineered prompt

Build me a sample CRUD backend in Go that feels like a real production API, but keeps the code easy to follow.

I want layered structure with clear separation between request handlers, business logic, data access, and models. It should have authentication with JWT, basic role based access control, and a simple resource like students that I can create, read, update, and delete. Please include validation for incoming requests, proper error responses, and middleware for things like auth and rate limiting.

Use a relational database setup with caching through Redis, and include support for background jobs with Redis streams so things like email sending can happen asynchronously. Add a few email templates and a basic SMTP sender. Make it runnable with Docker and environment variables, and include sensible sample config so I can start it quickly. If you need to check current docs for any library behavior, go ahead and look it up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab