Table of Contents
Combined with https://github.com/KelvinCYDev/marvelous_todo_kelvin_frontend, this is a simple full-stack todo app with the following features:
- User can create, update, and delete each To Do tasks.
- Both lists are alphabetically sorted
- User can check and uncheck tasks. The tasks will appear in the corresponding columns ('To Do', 'Done')
- The 'To Do' list is unlimited
- The 'Done' list only shows 10 most recently completed tasks
- Users can select the auto syncing period for the ToDo list (5 sec, 15 seconds, 30 seconds, 1 minute)
- As the user enters text in the search box, both columns are filtered to display only tasks matching the text entered thus far
- User can delete all the tasks at once by pressing 'Delete all tasks'
To get a local copy up and running, please follow the following steps.
-
Docker and Docker Compose
Please refer to https://docs.docker.com/get-docker/
-
yarn
npm install npm@latest -g npm install --global yarn
-
Clone the repo
git clone https://github.com/KelvinCYDev/marvelous_todo_kelvin_backend.git
-
Copy .env file from .env.example and make changes if needed
cp .env.example .env
-
Docker compose up. Both the API server and MongoDB will be ready
docker compose up -d
-
To test the project with mocha and chai
yarn test
-
This is just the backend, the frontend part is here:
https://github.com/KelvinCYDev/marvelous_todo_kelvin_frontend
The REST API usage is described below.
'GET /'
{
"todo": [
{
"_id": "64c62615ff3bf83770958fad",
"text": "Task 1",
"done": false,
"createdAt": "2023-07-30T08:57:57.526Z",
"updatedAt": "2023-07-30T08:57:57.526Z",
"__v": 0
}
],
"todoDone": [
{
"_id": "64c62617ff3bf83770958fb0",
"text": "Task 2",
"done": true,
"createdAt": "2023-07-30T08:57:59.523Z",
"updatedAt": "2023-07-30T08:58:03.567Z",
"__v": 0
}
]
}
'POST /save'
{
"text": "Task B"
}
{
"_id": "64c603d76a157c1e54f45039",
"text": "Task B",
"done": false,
"createdAt": "2023-07-30T06:31:51.229Z",
"updatedAt": "2023-07-30T06:40:51.885Z",
"__v": 0
}
'PUT /save'
{
"_id": "64c603d76a157c1e54f45039",
"text": "Task B",
"done": false
}
{
"_id": "64c603d76a157c1e54f45039",
"text": "Task B",
"done": false,
"createdAt": "2023-07-30T06:31:51.229Z",
"updatedAt": "2023-07-30T06:40:51.885Z",
"__v": 0
}
'POST /delete'
{
"_id": "64c603d76a157c1e54f45039",
}
'DELETE /delete'
- Connect a local docker MongoDB database with Mongoose
- Develop CRUD APIs for ToDo tasks
- Dockerize the API server with MongoDB
- Unit test using mocha and chai
See the open issues for a full list of proposed features (and known issues).
Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Kelvin - kelvincyca@gmail.com
Project Link: https://github.com/KelvinCYDev/marvelous_todo_kelvin_backend
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!