A REST Api built with Typescript, Express and MongoDB to track and manage users habits.
This project contains all the files for an API called TrackIt.
- /signup and /signin post endpoints to handle user creation and session.
- /habits route with post, get and delete endpoints to handle user habits.
- /daily-activities with get and put endpoints to handle user daily activities.
- /history get endpoint to retrieve user history.
- /users/update post endpoint to update users data (habits and history).
The project is deployed on https://trackit-api.cyclic.app/
- NodeJS as the Javascript Runtime.
- ExpressJS for api structure, error handling and limiting requests.
- MongoDB for data persistance.
- String-strip-html to prevent XSS attacks.
- JWT and Bcrypt to handle user session token and password encryption.
- Joi to validate body on post endpoints;
- Make the https requests to https://trackit-api.cyclic.app/ or run the project locally.
- Get information about all routes on Postman: https://documenter.getpostman.com/view/28914967/2s9XxwxF2j.
- To run the project locally, clone or download the repository. Run a MongoDB server.
- Set the .env file using the .env.example as model. Run the following commands on the root of the project and then you will be able to make the http requests to your local server.
npm i
npm run dev
All the routes are documented on Postman: https://documenter.getpostman.com/view/28914967/2s9XxwxF2j
This project is currently not open for contributions. However, you are welcome to fork the repository and make modifications for personal use.
This project is released under the MIT License.
This project was created as a practice project by Marcus Dantas.