Skip to content

Project responsible for containing all the challenges of the FIAP software engineering course

Notifications You must be signed in to change notification settings

pangolin-do-golang/tech-challenge

Repository files navigation

Quality Gate Status Known Vulnerabilities

Miro Board: https://miro.com/app/board/uXjVKVoZwos=/?share_link_id=718027124865

Tech Challenge

Install

Go

Make sure you have Go 1.22.2 or higher

Execute

go mod tidy

Defining Envs

To correctly use the project, it is necessary to define a .env file, with the values for the envs:

  • DB_USERNAME
  • DB_PASSWORD
  • DB_HOST
  • DB_NAME
  • DB_PORT

We recommend using for development the following values:

DB_USERNAME=user
DB_PASSWORD=pass
DB_HOST=pgsql
DB_NAME=postgres
DB_PORT=5432

Executing with Docker Compose

docker-compose build

docker-compose up -d

curl --request GET --url http://localhost:8080/health

## Expected response
= Status Code 200

Accessing Swagger UI

Go to http://localhost:8080/swagger/index.html#/ after the application is running.

Stack

DDD with event storm

The team chose to use Miro to document this deliverable, available at the link.

The diagram contains:

  • System documentation in DDD with Event Storm
  • Caption for the ubiquitous language used
  • Additional details to understand the proposed resolution
  • Order fulfillment and payment flow
  • Order preparation and delivery flow

Architecture

This project follows the models proposed by Hexagonal Architecture

Source: https://making.ndd.tech/reflex%C3%B5es-sobre-o-uso-de-orms-em-dom%C3%ADnios-complexos-parte-2-d7f0ac937121

Swagger

This project makes use of the library swag to generate the swagger documentation.

Install

Follow the steps described in the official documentation

Generate

 swag init -g cmd/rest/main.go 

Access the documentation

The documentation can be founded at the path /docs/swagger.yaml or accessing this link.

Infrastructure

Requierments Infrastructure

About

Project responsible for containing all the challenges of the FIAP software engineering course

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published