Build with NestJS framework
This is a service to manage tasks.
It's necessary to create a user to use the system. A user can only manage his own tasks.
This project is a back-end application using REST API to allow user register, user authentication, and task management.
A Task has the following attributes:
Field name | Description | Type | Default |
---|---|---|---|
title | Name of task | string | |
description | Explanation about the task | string | |
status | Current status of the task | string, enum: OPEN, IN_PROGRESS, DONE | OPEN |
- NestJS a Typescript framework for Node.js
- Postgres as database
- Jest for unit tests
- JWT for Authentication
- ESLint and Prettier
- Husky to force syntax checking before commits
- 100% coverage with unit tests
- Be sure you have Docker and docker-compose installed.
- Run:
docker-compose up
- Use this base URL for API connection: http://10.12.0.2:3000
docker exec -it taskmanagement_tasks bash
Optionally, to use pgAdmin:
- Run:
cd extras && docker-compose up
- Use your browser and access http://10.12.0.4
- Login as [email protected], password 123456
- "Add New Server" using .env.example credentials
- Enjoy it!
Be sure to install the requirements. If using nvm, you can easily run:
$ nvm use
-
Create .env file:
$ cp -v .env.example .env
-
Edit .env file to provide database connection configs.
-
Install dependencies and start the application:
$ npm install # development $ npm run start # watch mode $ npm run start:dev # production mode $ npm run start:prod
Consult the API documentation available at swagger (OpenAPI 3.0)
- Open Postman application
- Import this collection
- Set the Postman Environments (use gear or eye buttons on top right):
- key: taskManagementBaseURL value: http://10.12.0.2:3000 (as default)
- key: taskManagementToken value: generated_token (generate it from /auth/signin)
npm run test:cov
npm run test
- Test files are located near the classes they test. This is recommended at Official Documentation.
- The modules of this project are represented in the image below: