Controtto

by contre95
GPL 3.0
51
  • Linux
  • Apple

Integrations

  • Supports configuration through environment variables stored in .env files for simplified setup and configuration.

  • Fetches cryptocurrency price data from Binance's public API to calculate asset values and profit/loss metrics.

  • Provides a container image available on Docker's public registry for easy deployment and management.

📊 Kontrolle

Ein selbstgehosteter Gewinn- und Verlust-Tracker, der mit Go, HTML und ohne JavaScript erstellt wurde. Controtto verfolgt Ihre Transaktionen, speichert sie in einer SQLite-Datei und gibt alle möglichen Berechnungen zurück, darunter:

  • Durchschnittlicher Kaufpreis
  • Aktueller Vermögenswert
  • Transaktionsverlauf
  • Import-/Exporttransaktion (siehe Beispiel )
  • Gewinn und Verlust

Um den Preis eines Vermögenswerts abzurufen, verlässt sich Controtto hauptsächlich auf 4 APIs ( siehe Code ).

  • Binance – Öffentliche API, kein Token erforderlich.
  • BingX – Öffentliche API, kein Token erforderlich.
  • Alpha Vantage – Aktien, kostenlos, aber mit kurzer Kursbegrenzung. ( Holen Sie sich ein Token und legen Sie CONTROTTO_AVANTAGE_TOKEN fest)
  • Tiingo – Aktien, Kryptowährungen und Forex. (Konto/Token erstellen und CONTROTTO_TIINGO_TOKEN festlegen)

Demo

Sie können sich die Demo auch unter demo.contre.io ansehen, die Datenbank wird stündlich zurückgesetzt.

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

Alle Konfigurationen werden in der .env Datei festgelegt und als Umgebungsvariablen übergeben. Die Variablen CONTROTTO_PORT und CONTROTTO_DB_PATH sind verfügbar.

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

Erstellen und Ausführen

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

Entwicklungsumgebung

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

und greifen Sie auf localhost:3000 zu

Lauf mit Podman

Ein Container-Image ist im öffentlichen Docker-Register verfügbar. Wenn Sie Docker verwenden möchten, ersetzen Sie einfach podman durch docker .

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

Führen Sie Tests durch

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

ZU TUN

  • Weitere Tests
  • Wrapper für Protokollierung und Metriken wären auch schön.
  • Fügen Sie Konten hinzu, um den Überblick über das gesamte Nettovermögen zu behalten.
  • Entfernen Sie das gesamte CSS und verwenden Sie benutzerdefiniertes style.css + Tailwind CDN.
-
security - not tested
A
license - permissive license
-
quality - not tested

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
            Go server implementing Model Context Protocol (MCP) for filesystem operations.
            Last updated -
            228
            Go
            MIT License
          • -
            security
            A
            license
            -
            quality
            godoc-mcp is a Model Context Protocol (MCP) server that provides efficient access to Go documentation. It helps LLMs understand Go projects by providing direct access to package documentation without needing to read entire source files.
            Last updated -
            24
            Go
            MIT License
          • -
            security
            A
            license
            -
            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 -
            1
            TypeScript
            MIT License
            • Linux
            • Apple
          • -
            security
            -
            license
            -
            quality
            A Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.
            Last updated -
            Go
            Apache 2.0

          View all related MCP servers

          ID: 10z262ljps