A simple to-do app written in Javascriptm using the NestJS framework. Developed as the ramp up project for the Soulloop Labs.
Table of Contents
The project was developed as an introdutory project with the goal of teaching us concepts and technologies that will be used during our time working at Soulloop during the Labs project.
The project requirements were:
-
Build a NestJS api with the following endpoints:
- GET /tasks: List all tasks
- POST /tasks: Create a new task
- PUT /tasks/:id Update an existing task
- DELETE /tasks/:id Delete an existing task
-
Implement a database that:
- Uses PostgreSQL as a DB
- Uses TypeORM to establish a connection and interface with the DB
-
Testing:
- Implement unitary tests for the app services
- Implement integration tests (e2e) for all API endpoints
- Reach a test coverage of at least 80%
-
Docker:
- Create a Dockerfile for the application
- Create a docker-compose.yml file that builds the application and the database.
-
Setup GitHub Actions so that it:
- Executes all unitery and integration tests
- Verifies test coverage
- Build and test the application Docker image
Besides the aforementioned mandatory requisites. We could also implement the following bonus features:
- Implement JWT authentication
- Add data validation using class validators
- Setup automatic deploy and staging for a live enviroment using Heroku or DigitalOcean.
Make sure you have Node.js and Docker installed on your machine. Follow the instructions on Nodes and Dockers website or download them using your Linux distribution package manager.
Use Node's package manager to install NestJS:
npm i -g @nestjs/cli
Then simply run docker-compose to build the app image and deploy it locally to your machine:
docker compose up --build
This project do not contain a front-end aspect to it. Because of it, you need to use a Rest API client like Postman or Thunder Client to interact with it. The appication will be listening to port 3000.
Alternativaly, you may access the http://localhost:3000/docs
endpoint view Swagger documentation and interact with the API through it.
Distributed under the GNU General Public License version 3 (GPLv3).