MERN Auth + RBAC Starter Kit — JWT, Refresh Tokens & Role-Based Access

Stop rebuilding auth from scratch. This is a production-readyauthentication + role-based access control foundation for MERNapps — the exact pattern used in real client projects, cleanedup and packaged for reuse.WHAT'S INCLUDED- JWT authentication with access + refresh token rotation- Refresh tokens as httpOnly, secure cookies (not localStorage — mitigates XSS token theft)- Refresh token hash stored in DB (bcrypt) — a leaked database dump doesn't leak usable sessions- Configurable role-based access control (admin / manager / user — add your own roles in one line)- Protected routes on BOTH frontend (route guards) and backend (middleware) — never trust the client alone- Auto token refresh via axios interceptor — no random logouts on token expiry- Rate limiting on login/register — brute-force protection out of the box- Paginated, role-gated admin dashboard with a live user list- Full input validation, centralized error handling, bcrypt password hashingTECH STACKReact (Vite) + Tailwind · Node.js + Express · MongoDB (Mongoose)· JWT · bcryptWHAT YOU GET- Complete client + server source code, fully commented- Step-by-step README (local setup + deployment notes for Render/Vercel/Atlas)- Security notes on what to change before going to production- Free updates for this versionWHO THIS IS FORDevelopers who don't want to re-solve auth + RBAC for every newproject. Drop this in, connect your MongoDB URI, and you have aworking login system with role-gated pages in under 10 minutes.Not included: email verification, password-reset flow, andsocial login — this kit is scoped to core auth + RBAC, doneproperly, not a kitchen-sink template.