📊 Controtto, a self-hosted P&L app to keep track of all your trading transactions.
50K+
A self-hosted, P&L tracker made with Go, HTMX and no JavaScript. Controtto, keeps track of your transaction saving it in a sqlite file, and returns all sorts of calculations including:
All configurations are set in the .env file and passed as environment variables. Variables CONTROTTO_PORT and CONTROTTO_DB_PATH are available.
# Install the dependencies
go mod tidy
# Set the .env
mv .env.example .env
# Source the env variables
. <(cat .env | grep -v -e '^$' | grep -v "#" | awk '{print "export " $1}')
go run ./cmd/main.go # go build ./cmd/main.go to just build it
go install github.com/cosmtrek/air@latest # Download air
air -c air.toml
and access localhost:8721
If you want to Docker, simply replace podman with docker.
podman container run --rm \
-p 8000:8000 \
-v $(pwd)/data:/data
contre95/controtto
go test -cover ./...
# Expected result
# ? controtto/cmd [no test files]
# ? controtto/src/app/managing [no test files]
# ? controtto/src/domain/pnl [no test files]
# ? controtto/src/gateways/markets [no test files]
# ? controtto/src/gateways/sqlite [no test files]
# ? controtto/src/presenters [no test files]
# ok controtto/src/app/querying 0.003s coverage: 40.7% of statements
style.css + TailwContent type
Image
Digest
sha256:4ba53ff1f…
Size
27.7 MB
Last updated
over 1 year ago
docker pull contre95/controtto