- ExpressJS : a framework for building backend applications
- MongoDB: NoSQL database for storing user data.
- Jest : used for testing
- Node.js, npm, mongo installed on your machine.
-
Clone the repository:
git clone https://github.com/Ujjwal-Gupta-web/note_making_app.git
-
Installing dependencies
npm i
-
Running the app
node index.js
-
Running tests
npm test
-
Access the application at http://localhost:8000.
root/
|-- __test__/
|-- controllers/
|-- middlewares/
|-- models/
|-- routes/
|-- utility/
|-- .env
|-- .gitignore
|-- index.js
|-- jest.config.js
|-- package.json
|-- package.lock.json
|-- readme.md
AUTH APIS
|-- /api/auth/login # POST API, {email,password} sent in body
|-- /api/auth/signup # POST API, {email,password} sent in body
|-- /api/auth/getRandomUser # GET API, gets a random user, used in testing
NOTES APIS (All apis are protected)
|-- /api/notes/ # GET API, getAllNotes
|-- /api/notes/ # POST API, create note send {title,desc} in body
|-- /api/notes/:id # GET API, getNoteById
|-- /api/notes/:id # PUT API, updateNoteById
|-- /api/notes/:id # DELETE API, deleteNoteById
|-- /api/notes/:id/share # POST API, shareNote, send {email} in body, email of receiver
SEARCH APIS (All apis are protected)
- indexing is used here
|-- /api/search?q={query} # GET API,
- create, read , update , delete of notes can only be done be authenticated user
- login, signup of user
- one authenticated user can share notes with other authentic user
- when fetching all notes user gets all notes created by him and all notes shared with him
- rate limiting of requests is acheived (if more than 100 requests, server will not respond for time)
- logging for all apis is acheived for naviating errors
- Indexing is used to enable effient search