A full-stack Notes Application with secure authentication, role-based authorization (Admin/User), and complete CRUD operations, built using Node.js, Express, MongoDB, and EJS.
- Register & Login using JWT Authentication
- Create, Edit, Delete Posts
- Like / Unlike Posts
- Upload Profile Picture
- View all user posts
- Delete any post
- Role-based access control
- Input Validation using express-validator
- Secure cookies (JWT stored in cookies)
- API Documentation using Swagger UI
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose)
- Frontend: EJS, CSS
- Authentication: JWT + Cookies
- File Upload: Multer
- API Docs: Swagger
UserPostApp/
│── models/
│── config/
│── views/
│── public/
│── screenshots/
│── app.js
│── package.json
│── .gitignore
Create a .env file in the root directory:
JWT_SECRET=your_secret_key
npm install
node app.jsOpen in browser:
http://localhost:3000
Swagger UI available at:
http://localhost:3000/api-docs
- Pagination & search functionality
- RESTful API improvements
- Deployment (Render / Railway)
- UI enhancements (modern design, dark mode)
Sunidhi Srivastava
If you like this project, give it a ⭐ on GitHub!



