System design on miro.com
Example config file configs/config.yml
:
TelegramBotToken: "<token>"
ServiceName: "spending-bot"
botRestPort: 8080
reportRestPort: 8090
Test:
Telegram:
BotToken: "<test_token>"
ChatId: 123456789
UserId: 123456789
Example environment file .env
:
POSTGRES_HOST=localhost
POSTGRES_PORT=5433
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB_NAME=postgres
POSTGRES_SSL=disable
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=redis
KAFKA_URL=localhost:9092
GRPC_URL=localhost:50051
- /categories
/categoryadd Food
- where Food is category name/spendingadd 100
- where 100 is price- /report7 - report by current week
- /report31 - report by current month
- /report365 - report by current year
- /currency - change currency
/limit 100
- limit category by sum spending on month
make docker-run
Before first exec:
make goose-up
docker compose up
go test ./... -tags integration
Prometheus: http://localhost:9090/
Grafana: http://localhost:3000/ (admin/admin)
Jaeger: http://localhost:16686/
Use make buf
to build protobuf files