A secure and scalable RESTful API for creating, reading, updating, and deleting notes. Users can also share their notes with others and search for notes based on keywords.
This project implements a secure and scalable RESTful API using Express and MongoDB for managing user notes. It includes user authentication, note sharing, and keyword-based note search functionality.
- Express.js
- MongoDB
- Authentication protocol (e.g., JWT)
- Rate limiting and request throttling
- Text indexing for high-performance search
- Testing framework (e.g., Mocha, Chai) {Ongoing work}
- Unit and integration tests {Ongoing work}
Ensure you have the following software installed:
- Node.js
- MongoDB
git clone https://github.com/rishav-eulb/assessment
Add your mongo-db connection string in app.js file
npm install
npm start
- POST /api/auth/signup: Create a new user account
- POST /api/auth/login: Login to an existing user account and receive an access token
- GET /api/notes: Get a list of all notes for the authenticated user
- GET /api/notes/:id: Get a note by ID for the authenticated user
- POST /api/notes: Create a new note for the authenticated user
- PUT /api/notes/:id: Update an existing note by ID for the authenticated user
- DELETE /api/notes/:id: Delete a note by ID for the authenticated user
- POST /api/notes/:id/share: Share a note with another user for the authenticated user
- GET /api/search?q=:query: Search for notes based on keywords for the authenticated user
Note: We are currently in the process of implementing tests for the API endpoints. Test coverage will be added shortly to ensure the reliability of the application. But in the mean time to ensure reliability we have crossed verified all endpoints using POSTMAN.