The backend handles users' requests to list their financial transactions and provide analysis. It connects to brokers selected by the users to retrieve their assets and transactions.
This project is using Docker. Get started here.
docker-compose up
Includes Air for hot-reloading.
docker-compose -f docker-compose.yml -f docker-compose.debug.yml up
Includes Delve for debugging on top of Air.
When using JetBrains Goland, learn how to attach the debugger to a Go process that is running in a Docker container here.
Work in progress.
Install goose
go install github.com/pressly/goose/v3/cmd/goose@latest
Install swag
go install github.com/swaggo/swag/cmd/swag@latest
To create a new migration file
goose create file_name sql
To apply the migrations
goose -dir migrations postgres "host=localhost port=5432 user=postgres password=postgres dbname=fihub sslmode=disable" up
Generate the swagger file.
swag init -ot yaml
Display swagger-ui with the generated swagger file at this local url
# Bash
docker run --rm -d -p 80:8080 -e SWAGGER_JSON=/tmp/swagger.yaml -v `pwd`/docs:/tmp swaggerapi/swagger-ui
# Powershell
docker run --rm -d -p 80:8080 -e SWAGGER_JSON=/tmp/swagger.yaml -v "$(pwd)/docs:/tmp" swaggerapi/swagger-ui
Generate the angular typescript client.
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/docs/swagger.yaml -g typescript-angular -o /local/docs/angular
# Powershell
docker run --rm -v ${PWD}:/local -v ${PWD}\..\fihub-ui\src\app\core\api:/local2 openapitools/openapi-generator-cli generate -i /local/docs/swagger.yaml -g typescript-angular -o /local2
# Bash
docker run --rm -v ${PWD}/GolandProjects/caisse-back:/local -v ${PWD}/PhpstormProjects/caisse-front/src/app/core/api:/local2 openapitools/openapi-generator-cli generate -i /local/docs/swagger.yaml -g typescript-angular -o /local2