Subhransu27062007/fastapi-chat-application ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple chat backend API with FastAPI and PostgreSQL.

I want users to be able to sign up, log in, and then create, read, update, and delete both users and chat messages. The chat messages should store who sent it, who received it, the message text, and when it was created. Please include JWT based login, password hashing, and basic authorization so protected routes require a valid token.

Use proper request and response models, database integration with SQLAlchemy, and make the API clean and easy to test. I also want the usual Swagger docs to work automatically, so I can try the endpoints in the browser.

Please keep it organized in a small app with routers for auth, users, and chats, and make sure it runs smoothly with Uvicorn. If you need to check current FastAPI or SQLAlchemy docs online, go ahead and do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab