Skip to content

Cardinal87/FinTrack-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FinTrack-API

Description

Prototype of the financial system API

Features

  • Create and update user
  • User authentication and authorization
  • Create and manage multiple accounts for one user
  • Create transactions between accounts
  • Filter transactions by date/interval/account
  • Collect metrics to prometheus
  • Collect logs to loki

Documentation

Code documentation

Core: docs/FinTrack.API.Core.xml
Application: docs/FinTrack.API.Application.xml
Infrastructure: docs/FinTrack.API.Infrastructure.xml
API Layer: docs/FinTrack.API.xml

API

Swagger Spec (JSON): docs/swagger.json
Swagger UI: http://localhost:8080/swagger (when running in develop environment)

Quick start

Create .env file to configure environmental variables Possible options:

Variable Description Value example
POSTGRES_HOST PostgreSql host db
POSTGRES_PORT PostgreSql post 5432
POSTGRES_USER PostgreSql username postgres
POSTGRES_PASSWORD PostgreSql password password
ASPNETCORE_ENVIRONMENT runtime environment Development
GRAFANA_USERNAME admin username for grafana admin
GRAFANA_PASSWORD admin password for grafana password
LOKI_URI uri of the grafana/loki log aggregator http://loki:3100

Then run API with one of two possible ways:

Only API

Download docker image from Docker Hub using

docker pull cardinal87/fintrack:tagname

then run docker image with following command:

docker run --env-file path/to/.env -p 8080:8080 -v path/to/api/logs:/app/logs cardinal87/fintrack

Using docker-compose (Recommended)

download docker-compose.yml file with command:

curl -O https://github.com/Cardinal87/FinTrack-API/blob/main/FinTrack/docker-compose.yml

then, in the same directory, run docker containers with:

docker-compose --env-file path/to/.env up -d

Build from source code

clone repo with the next command

git clone https://github.com/Cardinal87/FinTrack-API.git

then change working dir to

cd FinTrack.API/FinTrack

and build docker image

docker build -f FinTrack.API/Dockerfile -t fintrack:tag .