DiogoBrazil/nupevid-api ? reverse-engineered prompt

Reverse engineered prompt

Build me a Rust backend API for a police operations system for the Patrulha Maria da Penha.

I want it to manage victims, offenders, protective orders, work sessions, teams, and users, with everything separated by city so different municipalities can use the same system without mixing data. The app should support login with JWT access tokens and refresh tokens, logout, password reset, and role based access for root, city admin, and city user. It should also enforce the business rules around team composition, active work sessions before creating attendances, and the city level permissions for each user.

Please include CRUD for the main records, search and pagination, soft delete, and a health or system info endpoint. I also want Swagger docs, Postgres migrations, Docker support, and basic tests. Keep the code organized in layers so the business rules stay separate from the HTTP and database parts. If you need to check current crate or framework docs online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab