madhusamala-dev/spring-security-jwt — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a simple Java backend that demonstrates login with JWT using Spring Security. I want someone to be able to create an account, log in with their username and password, get a token back, and then use that token to access a protected test endpoint.

Keep it small and easy to understand, since this is mainly for learning and as a starter project. Add a public health or welcome endpoint, a protected user endpoint, and clear responses when the token is missing, expired, or invalid. Use a clean project structure and include enough comments so I can follow what each part does.

Please make sure it runs with Maven from the command line, and add a short README explaining how to start it and test the login flow with sample requests. Look up the current Spring Security docs online if you need to.

Want more depth? Deep Reverse