A multi-user Notes REST API built using Node.js, Express.js, MongoDB Atlas, and JWT Authentication.
This project was developed as part of an Engineering Internship assignment.
https://people-notes-api.onrender.comGET /{
"message": "Notes API is running"
}GET /about{
"name": "Shivam Prasad",
"email": "prajapati2shivam@gmail.com",
"my features": {
"search": "Users can search their notes by keyword. I chose this because real notes apps need fast retrieval when users have many notes."
}
}GET /openapi.json- User Registration
- User Login with JWT Authentication
- Protected Notes Routes
- Create Notes
- Get All Notes
- Get Single Note
- Update Notes
- Delete Notes
- Share Notes with Another User
- Search Notes by Keyword
- MongoDB Atlas Integration
- Secure Password Hashing using bcrypt
- JWT Authorization Middleware
- RESTful API Design
- Hosted on Render
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- JWT (jsonwebtoken)
- bcryptjs
- Render
git clone https://github.com/shivam-js/people-notes-api.gitcd people-notes-apinpm installCreate a .env file in the root folder.
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_keynpm run devnpm startProtected routes require JWT token.
Add token in headers:
Authorization: Bearer YOUR_TOKENPOST /register{
"name": "Shivam",
"email": "shivam@example.com",
"password": "123456"
}POST /login{
"email": "shivam@example.com",
"password": "123456"
}{
"token": "jwt_token_here"
}POST /notes{
"title": "My Note",
"content": "This is my note"
}GET /notesGET /notes/:idPUT /notes/:id{
"title": "Updated Title",
"content": "Updated Content"
}DELETE /notes/:id204 No ContentPOST /notes/:id/share{
"share_with_email": "friend@example.com"
}GET /notes/search?q=keywordpeople-notes-api/
│
├── controllers/
│ ├── authController.js
│ └── noteController.js
│
├── middleware/
│ └── authMiddleware.js
│
├── models/
│ ├── User.js
│ └── Note.js
│
├── routes/
│ ├── authRoutes.js
│ └── noteRoutes.js
│
├── config/
│ └── db.js
│
├── server.js
├── package.json
├── .env
└── README.md- Password hashing using bcrypt
- JWT-based protected routes
- Authorization checks for note ownership
- Shared note access control
- Environment variables for secrets
Tested using:
- Thunder Client
- Browser API testing
- Render Deployment Logs
This API is deployed on Render.
Live URL:
https://people-notes-api.onrender.comEmail:
prajapati2shivam@gmail.comGitHub:
https://github.com/shivam-jsThis project was built to demonstrate:
- REST API Design
- Authentication & Authorization
- MongoDB Relationships
- Secure Backend Development
- API Deployment
- Clean Project Structure
- Real-world Note Sharing Logic