Skip to main content
Glama

Controtto

by contre95

📊 Controtto

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:

  • Avg. Buy price
  • Current asset value
  • Transaction history
  • Import / Export transaction (see sample)
  • Profit & Loss

In order to fetch the price of an asset, Controtto relies on mainly 4 APIs (see code).

  • Binance - Public API, no token needed.
  • BingX - Public API, no token needed.
  • Alpha Vantage - Stocks, free but short rate limit. (get an token and set CONTROTTO_AVANTAGE_TOKEN)
  • Tiingo - Stocks, crypto and Forex. (create account/token and set CONTROTTO_TIINGO_TOKEN)

Demo

You can also check out the demo at demo.contre.io, the database resets every hour.

https://github.com/user-attachments/assets/28bf8782-6118-47c0-a94b-085e1a7045b2

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 '{}')

Build and Run

go run ./cmd/main.go # go build ./cmd/main.go to just build it

Development env

go install github.com/cosmtrek/air@latest # Download air air -c air.toml

and access localhost:3000

Run with Podman

A Container image is available on Docker's public registry. If you want to use Docker, simply replace podman with docker.

mkdir data podman container run --rm -p 8000:8000 -v $(pwd)/data:/data contre95/controtto

Run tests

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

TODO

  • More tests
  • Wrappers for logging and metrics would be nice as well.
  • Add Accounts to keep track of the total net worth.
  • Remove all the CSS and use custom style.css + Tailwind CDN.
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Sie sind in der Lage, Golang-Code zu interpretieren und ihn unter den strengsten DDD- und Clean-Architecture-Paradigmen zu beurteilen

  1. Demo
    1. Erstellen und Ausführen
      1. Entwicklungsumgebung
        1. Lauf mit Podman
          1. Führen Sie Tests durch
            1. ZU TUN

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            Provides deep source code analysis for Unreal Engine codebases, allowing AI assistants to understand C++ class structures, search code, and analyze subsystems.
            Last updated -
            88
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            Analyzes codebases to generate dependency graphs and architectural insights across multiple programming languages, helping developers understand code structure and validate against architectural rules.
            Last updated -
            11
            JavaScript
          • A
            security
            A
            license
            A
            quality
            A TypeScript-based MCP server providing a complete interface to the Delve debugger for Go programs, enabling debugging, tracing, and analyzing Go code through natural language commands.
            Last updated -
            19
            18
            TypeScript
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A server that automatically reviews code style and suggests improvements, with special focus on Flutter/Dart projects and general programming styles.
            Last updated -

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/contre95/controtto'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server