This project implements a secure and scalable RESTful API that allows users to manage notes. Users can create, read, update, and delete notes, as well as share notes with other users. The application also features a search functionality based on keywords.
- Framework: ExpressJS
- Database: MongoDB
- Authentication Protocol:JWT based authentication with cookies
- Rate Limiting & Throttling: Implemented for handling high traffic.
- Search Functionality: Implemented with regex
- Testing Framework: Jest
src/
: Contains the source code for the API.tests/
: Includes tests for API endpoints.config/
: Configuration files or scripts.controllers/
: Main Logic of Endpoint.routes/
: Inclueds routes.middlewares/
: Consists of middlewares.model/
: Consists of database schemas.data/
: Consists of mock data.utils/
: Consists of external utilities like types, interfaces etc.
-
Clone the repository:
https://github.com/jogeshgupta963/Notes.git cd ./Notes/server
-
Environment Variables:
Already added for your convenience
-
Database Setup:
Already setup
-
Create Docker Image:
docker build -t notes_image .
-
Run application inside docker:
docker run -it -p 3001:3001 notes_image
-
Install dependencies(Optional, for running locally or testing):
npm install
-
Run Tests:
npm run test
Create a new user account.
Log in to an existing user account and receive an access token.
Get a list of all notes for the authenticated user.
Get a note by ID for the authenticated user.
Create a new note for the authenticated user.
Update an existing note by ID for the authenticated user.
Delete a note by ID for the authenticated user.
Share a note with another user for the authenticated user.
Search for notes based on keywords for the authenticated user.