Bonds Calculator is a web service for tracking bond yields. Its functions include calculating current income, calculating current income and income statistics for your bond portfolio.
Latest release build with docker compose
docker compose -f docker-compose-release.yml up web-release -d
Dev build with docker compose
docker compose -f docker-compose.yml up web -d
Run tests with docker compose
docker compose -f docker-compose.yml up web-tests --exit-code-from web-tests
You can run project without docker using go run ./...
or run tests using go test -v ./...
but make sure you configured all dependencies by yourself:
- generate code using
go generate
commands - run postgres server
- run redis server
- move bonds_calculator_client build artefacts to ./public folder
You can change project settings by using Shell Enviroments:
- Moex client settings
- CONFIG_MOEX_CLIENT_QUEUE_SIZE - Number of concurrent connections to Moex API, default 10
- HTTP settings
- CONFIG_HTTP_PORT - default 8080
- CONFIG_REQUEST_TIMEOUT - default 100ms
- JWT settings
- CONFIG_ACCESS_TOKEN_TTL - default 15m
- CONFIG_REFRESH_TOKEN_TTL - default 168h (1 week)
- Database settings
- CONFIG_DB_USER - default bonds_calculator
- CONFIG_DB_PASSWORD - default bonds_calculator
- CONFIG_DB_HOST - default localhost
- CONFIG_DB_PORT - default 5432
- CONFIG_DB_NAME - default - default bonds_calculator
- Redis settings
- CONFIG_REDIS_HOST - default localhost
- CONFIG_REDIS_PORT - default 6379
- CONFIG_REDIS_PASSWORD - default ""
- CONFIG_REDIS_DB - default 0
- Add Calculator models
- Tests and Fuzz Tests
- Add Moex API support
- Add Static services/controllers
- Search
- BondInfo
- StaticCalsulator
- StaticStore
- TimerService
- Add Tests for they
- Use Docker and Docker Compose
- Add linters
- Add Redis and Postrges support
- Integration tests
- Setup GitHub Actions
- Add Auth/Register support
- JWT Token support
- Logins count/Tokens count limit
- Mail registration/change password notifications
- Add Tests
- Simplify wire config
- Add fuzz testing to ci
- Add coverage to ci
- Add User services/controllers
- UserCalculator
- UserStore
- UserBondsInfo
- UserStatistic
- Add Tests for they
- Add autotests