bun-templates/bun-chat ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple realtime chat app where people can sign up, log in, join chat rooms, and send messages that appear instantly for everyone else in the same room.

I want a home page with login and signup, a list of rooms, and a chat page for each room showing recent message history and who is online right now. Make it work with sessions in a cookie, password hashing, and basic form protection so it feels safe enough for real use.

Please make it work with Bun and keep it lean, with the server handling both normal pages and WebSocket chat updates. Messages and users should be saved so they persist after refresh, and if I run more than one server instance they should still share messages and presence correctly. Add the environment setup, a Docker compose file for the database and Redis or Valkey, and a few tests so I can run it locally and verify it works.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab