Stellar blockchain token explorer for MTLAP (Persons) and MTLAC (Companies) tokens. Provides a web interface to browse token holders and view detailed account information including balances, metadata, and trustlines.
Lore is a specialized explorer for the MTL Association ecosystem on the Stellar network. It tracks:
- MTLAP (Persons) - Individual membership tokens
- MTLAC (Companies) - Company/organization tokens
- Browse all MTLAP and MTLAC token holders
- View detailed account information (name, about, websites, trustlines)
- Council voting status and delegation tracking
- Reputation scoring with weighted calculations
- Portfolio valuation in XLM
- Relationship graph visualization
- Dark/light theme with responsive design
The MTL ecosystem implements a social network layer on Stellar using ManageData operations:
- Identity: Name, About, Websites stored as base64-encoded ManageData
- Relationships: 27 relationship types (Employee, Employer, Partner, Family, etc.) linking accounts
- Delegation: Council voting power delegation chains
- Association Tags: Programs and Factions for categorizing members
cmd/lore/ - CLI entry point (serve, sync commands)
internal/
├── config/ - Configuration constants (tokens, issuer)
├── database/ - PostgreSQL connection + goose migrations
├── handler/ - HTTP handlers (Home, Account, Search, Init, Token, Transaction, Reputation)
├── logger/ - Structured logging (slog/JSON)
├── model/ - Data models
├── repository/ - Data access layer (Squirrel query builder)
├── reputation/ - Weighted reputation scoring system
├── service/ - Stellar Horizon API client + XDR generation
├── sync/ - Data synchronization from Horizon to PostgreSQL
└── template/ - Embedded HTML templates
- Go 1.24+
- PostgreSQL 16+
- Docker & Docker Compose (recommended)
Use Docker Compose for local development with fast iteration:
# Quick start: build, start services, sync data
make dev
# After making code changes, rebuild and restart:
make dev-restart
# View logs
make dev-logs
# Stop everything
make dev-down
# Reset database and re-sync
make db-reset && make devImportant: Docker containers run Linux. The Makefile handles cross-compilation automatically. Never run go build manually before make dev-restart — always use Makefile targets.
# Start only PostgreSQL
make db
# Build
go build -o lore ./cmd/lore
# Sync data from Stellar
./lore --database-url "postgres://lore:lore@localhost:5432/lore?sslmode=disable" sync
# Start server
./lore --database-url "postgres://lore:lore@localhost:5432/lore?sslmode=disable" serve# Run tests
go test ./...
# Format and lint
go fmt ./...
go vet ./...
# Generate mocks
mockery| Flag | Env Var | Default | Description |
|---|---|---|---|
--database-url |
DATABASE_URL |
(required) | PostgreSQL connection URL |
--port |
PORT |
8080 |
HTTP server port |
--horizon-url |
HORIZON_URL |
https://horizon.stellar.org |
Stellar Horizon API URL |
--log-level |
LOG_LEVEL |
info |
Log level (debug, info, warn, error) |
See CONTRIBUTING.md for guidelines on how to contribute to this project.
MIT