waqasahmed-jangla/role-based-login-MERN ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple role based login app with a frontend and a backend.

I want users to be able to sign up, log in, and be sent to the right area based on their role, like admin and normal user. After login, show different pages or dashboards depending on who they are, and keep the session working so they stay logged in when they refresh. Use a clean, basic design that is easy to test and understand.

Please set it up so the backend handles authentication and role checks, and the frontend has the forms and protected pages. If you need to look up current best practices for login or routing, go ahead and use the latest docs. Keep it simple, but make sure the whole flow works end to end, from creating an account to landing on the correct screen after sign in.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab