Skip to content

The backend project I had to do in my practice period

Notifications You must be signed in to change notification settings

hectorplinio/TeamDHA-Backend

Repository files navigation

logo

TeamDHA

The main goal is to create an API that emulates the workings of company. Where you have Workers and Companies. And it's working on our website

Table of contents


Getting started

First, clone the repo and install the dependencies. npm install.

Keep in mind that we use npm for managing Node packages. If you try installing the dependencies with yarn, it will generate a yarn.lock file that will likely cause problems with the existing package-lock.json.


Usage

First you will have to create a .env file with the information shown in .env.example

  • To run de production version image locally run docker compose up removing the docker-compose.override.yml.
  • To run de development version image locally run docker compose up which automatically will work with docker-compose.override.yml

Development

TBD

Architecture

While developing, we follow an Hexagonal Architecture.

If this is new for you, here are some useful links:

Testing

TBD

After finishing a task

Before pushing your changes, make sure to test and run the linter to ensure the code follows the rules, or the CI pipeline will throw an error and fail:

npm run test:prod

npm run lint:fix

Additional files

In the root folder of the project, you'll find several config files. Let's go over the most important ones:

  • Dockerfile: we need to replicate a given environment to work under the same conditions. With this file, we configure the Docker image we use.
  • docker-compose.yml: we need to work with a server and a database. With this file we configure both Docker containers
  • docker-compose.yml: to work with the image in the directory and not in the Docker hub and for more development aidance we override the settings with this file.
  • In the ADR folder there are the decissions of the technologies we have chosen for the project

Release

We use Gihub Actions as CI/CD service.

Codeship governance project

Every time you make a pull request to main or commit to a branch that has one, the steps .github/workflows/test.yml will run.

Every time a branch is merged to main, the steps .github/workflows/build-and-deploy.yml will run. And the new changes will be deployed.


Copyright and license

(c) Company.

Releases

No releases published

Packages

No packages published

Languages