Clarity is a note keeping application designed to help you become more organise and productive.
-
Frontend:
- ReactJS
- Tailwind CSS
-
Backend:
- Node.js
- Express.js
- MongoDB
The project is organized into two main directories within the root folder:
- Frontend: Contains all the files related to the frontend development.
- Backend: Holds the backend codebase and configurations.
-
Set Up cd to both the directories Frontend and Backend and run the npm install command on each.
-
Run Backend
node server.js
or use nodemon server.js
- Run Fromtend
npm start
This API provides endpoints to manage text notes in a note-taking application. It allows users to create, retrieve, update, and delete notes stored in a MongoDB database.
Base URL: http://your-api-base-url.com
- URL:
/api/signup
- Method:
POST
- Request Body:
{ "email": "test@gmail.com", "fullname": "Jhon Doe", "password": "Jhonny@123" }
- Success: 201 Created
{ "success": true, "user": "{createdUser}", "token": "token", "message": "User Created Successfully" }
- URL:
/api/login
- Method:
POST
- Request Body:
{ "email": "test@gmail.com", "password": "Jhonny@123" }
- Success: 201 Created
{ "success": true, "user": "{createdUser}", "token": "token", "message": "Login Successful" }
- URL:
/api/notes/add
- Method:
POST
- Request Body:
{ "title": "Note Title", "content": "Note Content", }
- Success: 201 Created
{ "_id": "note_id", "title": "Note Title", "content": "Note Content", "createdAt": "timestamp", "updatedAt": "timestamp", "userid": "userid", "success": true, "message": "Note Added Successfully" }
- URL:
/api/notes/get/user
- Method:
GET
- Response:
- Success: 200 OK
{ "success": true, "message":"All Notes are returned" "notes": [ { "_id": "note_id", "title": "Note Title", "content": "Note Content", "createdAt": "timestamp", "updatedAt": "timestamp", "userid":"userid" }, // All notes... ] }
- URL:
/api/notes/update/:noteid
- Method:
PUT
- Request Body:
{ "title": "Note Title", "content": "Note Content" }
- Success: 200 Created
{ "_id": "note_id", "title": "Updated Note Title", "content": "Updated Note Content", "createdAt": "timestamp", "updatedAt": "timestamp", "userid": "userid", "success": true, "message": "Note Updated Successfully"
}
- URL:
/api/notes/delete/:noteid
- Method:
DELETE
- Success: 200 Created
{ "success": true, "message": "Note deleted successfully" }
- 200 Internal Server Error: All OK.
- 201 Internal Server Error: Created.
- 400 Bad Request: Bad Request.
- 401 Bad Request: Unauthorized.
- 403 Bad Request: Forbidden.
- 404 Not Found: Not Found.