Skip to content

vinicius507/42labs-rampup

Repository files navigation

42labs-rampup


Logo Logo

CI Status
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
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgments

About The Project

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:

  1. 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
  2. Implement a database that:

    • Uses PostgreSQL as a DB
    • Uses TypeORM to establish a connection and interface with the DB
  3. Testing:

    • Implement unitary tests for the app services
    • Implement integration tests (e2e) for all API endpoints
    • Reach a test coverage of at least 80%
  4. Docker:

    • Create a Dockerfile for the application
    • Create a docker-compose.yml file that builds the application and the database.
  5. 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.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

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

(back to top)

Usage

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.

(back to top)

License

Distributed under the GNU General Public License version 3 (GPLv3).

(back to top)

Authors

(back to top)