Please sign in to access this page
his is a user authentication dashboard built using Express.js, MongoDB, and EJS templating. It includes:
User signup and login functionality
Session-based authentication using express-session
Protected routes like /dashboard accessible only after login
Admin-only route (/admin) using role-based authorization
Light UI created using EJS and Bootstrap
Technologies used:
Node.js
Express.js
MongoDB
EJS for templating
Bootstrap for styling
This project helps me practice real-world Express concepts like session handling, middleware, route protection, and database integration.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Set up project structure using Express. Configured MongoDB and created a User model with Mongoose.
Built authentication routes for login and signup. Implemented session using express-session and connect-mongo.
Created a protected dashboard route that only works after login. Designed views using EJS templates.
Implemented role support in users and created a middleware to protect admin-only routes. Admins now have access to /admin while normal users are denied.