This is a Task List web app to manage the tasks and related notes. The database is hosted at MongoDB Atlas. There is a mobile version for the app built in React Native - the repo for the Mobile App is mkchahal/bb_RN_taskList.
demo.mov
Clone source code locally:
$ git clone git@github.com:mkchahal/bb_taskList.git
Install dependencies:
$ npm install
$ cd frontend
$ npm install
Set up env variables in the .env file.:
PORT = 4000
MONGODB_URI = 'your mongoDB uri'
Start running the server and then the client:
$ cd ../
$ npm start
$ cd frontend
$ npm start
The client will be running at port 3000 and the server will be running at port 4000. Note: If you are running the server at different port, please make sure to update the proxy in the package.json file in the frontend folder.
- to get an array of all the tasks
- response body example
[ { "_id": "631565cb5d99fd6551772bd0", "title": "Do Laundry", "content": "Do laundry on Sunday morning.", "createdAt": "2022-09-05T02:58:19.324Z", "updatedAt": "2022-09-05T08:32:54.463Z", "__v": 0 }, { "_id": "631566195d99fd6551772bd2", "title": "Dishes", "content": "Finish dishes before sleeping today.", "createdAt": "2022-09-05T02:59:37.201Z", "updatedAt": "2022-09-05T07:16:39.865Z", "__v": 0 }, ... ]
- to create a new task
- request body example (both feilds are required)
{ "title": "Another Task", "content": "This is a note for another task which needs to completed this week." }
- response body:
{ "title": "Another Task", "content": "This is a note for another task which needs to completed this week.", "_id": "6316543c8cb0ba8fcd0ccc46", "createdAt": "2022-09-05T19:55:40.138Z", "updatedAt": "2022-09-05T19:55:40.138Z", "__v": 0 }
- get a single task from the tasks list by
taskID
- response body example:
{ "_id": "6316543c8cb0ba8fcd0ccc46", "title": "Another Task", "content": "This is a note for another task which needs to completed this week.", "createdAt": "2022-09-05T19:55:40.138Z", "updatedAt": "2022-09-05T19:55:40.138Z", "__v": 0 }
- update the task fields for the given task by
taskID
- request body example:
{ "title": "Another Revised Task", "content": "This is a revised note for testing." }
- response body example:
{ "_id": "6316543c8cb0ba8fcd0ccc46", "title": "Another Revised Task", "content": "This is a revised note for testing.", "createdAt": "2022-09-05T19:55:40.138Z", "updatedAt": "2022-09-05T20:02:43.451Z", "__v": 0 }
- delete a task from the tasks list by
taskID
- response body example: removed task
{ "_id": "6316543c8cb0ba8fcd0ccc46", "title": "Another Task", "content": "This is a note for another task which needs to completed this week.", "createdAt": "2022-09-05T19:55:40.138Z", "updatedAt": "2022-09-05T19:55:40.138Z", "__v": 0 }