Task List Full Stack Project, using the MERN stack, where you can add, delete and update tasks. The project is built using the MERN stack, and is deployed on {add link to deployed site}.
To start with, you need to clone the repository to your local machine. You can do this by running the following command in your terminal:
git clone https://github.com/Ch3ssMaster/tasks-list
You need to have the following installed on your machine:
- Node.js
- MongoDB and MongoDB Compass, then create a database called
tasks-list
- VS Code (optional)
To install the dependencies, run the following command in the backend and frontent directories of the project:
npm install
Create a .env file in the backend directory, and add the following:
MONGO_URI = mongodb://localhost:27017/tasks-list
TOKEN_SECRET = 5745cd8ca6d25082500c1de070652c8a8e30f0fa4296d18cb05c4985746e7588
PORT = 8000
In case you want to mock tasks for the initial view, run the script:
npm run mock
This will generate a .mongodb file, in the path:
/backend/scripts/output/
That you can run with a click from the VS Code plugin playground.
Unit tests have been carried out with the JEST library, both on the front end and on the back end.
The libraries used for backend testing are:
- JEST - The testing framework used
- Supertest - The library used to test the API
- Cross-env - The library used to set the environment variables
To run the tests, execute the following command:
npm run test
To test the frontend, the libraries provided by create-react-app
have been used.
Additionally, version 0.6.5
of the jest-watch-typeahead
library has been installed. The current version is not compatible with react-scripts 5.0.1.
In case you want to manually install the library, run the following command:
npm i -D --exact [email protected]
To run the tests, execute the following command:
npm test
The API endpoints are the following:
Method | Endpoint | Description |
---|---|---|
GET | / | Get all tasks |
POST | / | Add a task |
PATCH | /:id | Update a task |
DELETE | /:id | Delete a task |
The option chosen to deploy the application has been Vercel.
The frontend is deployed directly through the scripts in the package.json
file, while the backend needs a vercel.json
file as additional configuration.
For the database, MongoDB Atlas has been used.
The application will be active from today 04/04/2023 until the token expires, 15 days, unless the frontend token is renewed.
To test the backend from another client such as Thunder or Postman, it is available at the URL:
Test the full application online!:
- React - The frontend framework used
- Node.js - The backend framework used
- Express - The backend framework used
- MongoDB - The database used
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use Semantic Versioning for versioning.
- Ch3ssMaster - Tasks List - Ch3ssMaster
This project is licensed under the MIT License