Controtto

Controtto

You are capable of interpreting golang code and judge it under the most strict ddd and clean architecture paragidms

Category
Visit Server

README

📊 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. controtto screenshot

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured