guismoreira/desafio-votacao ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple voting API in Java with Spring Boot for a cooperative style meeting system.
I need endpoints to create a topic, open a voting session for that topic, accept votes from members, and return the final tally. Each member should only be able to vote once per topic, and votes are just yes or no. The voting session should stay open for a default of 1 minute unless a custom time is sent when it is opened. Please make sure topics and votes are saved so nothing is lost if the app restarts.
I also need the API to return JSON in a way that could be used by a mobile app to build screens, and I want Swagger or something similar so I can test the endpoints easily. If you can, add the bonus CPF check with a fake client that sometimes says the CPF can vote and sometimes says it cannot, returning 404 when it is invalid.
Keep it clean and simple, add tests, logs, and clear run instructions, and if you need current docs for any library, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit