How t0b1as/fnd works
Fundus is a decentralized marketplace node for goods, services, certificates, energy tokens, and jobs. A browser request reaches the Go REST API through OpenResty; API handlers serve marketplace operations and publish some records to the peer network. The node also supports replicated file hosting, messaging, wallet identity, blockchain-backed swaps, topology, local LLM analysis, and optional smart-meter input. The README documents the main runtime layout; sampled excerpts confirm API routes, listing persistence and publication, and meter-token publication. Several subsystem links are left out because their callers were not shown.
Main entry points: server.go REST API · reader.go Smart-meter reader · node.go P2P network · store.go Marketplace records
Components 23
User interface
- OpenResty
- Messenger UI
lua/static/messenger.js - Partner UI
lua/static/partner.js - Upload UI
lua/static/upload.js - Wallet UI
lua/static/walletauth.js
Marketplace services
- REST API
go/internal/api/server.go - Listings and orders
go/internal/api/server.go - Marketplace search
go/internal/api/search.go - Wallet identity
go/internal/identity/identity.go - Messaging
go/internal/messenger/messenger.go - Partner profiles
go/internal/partner/search.go - FND–SOL swaps
go/internal/api/swap_orchestrator.go
Peer network
- P2P network
go/internal/p2p/node.go - Grid topology
go/internal/topology/manager.go
Storage and ledger
- Blockchain
go/internal/chain/blockchain.go - Marketplace records
go/internal/storage/store.go - Replicated file hosting
go/internal/filestore/filestore.go
Node capabilities
- Smart-meter reader
go/internal/meter/reader.go - LLM analysis
go/internal/llm/analyzer.go - Privileged helper
go/cmd/fundus-helper/main.go - Node updater
go/internal/update/updater.go
Other components
- Browser
- Ollama
Connections 12
- Browser → OpenResty: requests pages
- OpenResty → REST API: proxies requests
- REST API → Listings and orders: routes requests
go/internal/api/server.go - REST API → Marketplace records: writes records
go/internal/api/server.go - REST API → P2P network: publishes records
go/internal/api/server.go - Smart-meter reader → Marketplace records: stores tokens
- Smart-meter reader → P2P network: publishes tokens
- LLM analysis → Ollama: analyzes locally
- Messenger UI → Browser: runs in
- Partner UI → Browser: runs in
- Upload UI → Browser: runs in
- Wallet UI → Browser: runs in