Skip to content

Quickstart

This brings up the full stack — a Hyperledger Fabric network plus the API (Go + MongoDB + Redis) — and runs the whole tamper-evident flow: create a record, anchor it on the blockchain, and verify its integrity.

  • Docker + Docker Compose
  • make
  • (optional) Go 1.21+ / Python 3.8+ to use the SDKs
Terminal window
make up # Fabric network + API + MongoDB + Redis + dashboard
make status # list the running containers

When it finishes:

ServiceURL
APIhttp://localhost:5001
Healthhttp://localhost:5001/health
Swaggerhttp://localhost:5001/swagger/index.html
Metricshttp://localhost:9090/metrics
Dashboardhttp://localhost:8088

A record is any JSON payload under a client-chosen domain. The API computes an integrity hash automatically.

Terminal window
curl -s -X POST http://localhost:5001/api/v1/audit/records \
-H 'Content-Type: application/json' \
-d '{"source":"payments","payload":{"event":"charge","amount":1200}}'
{ "status": "success", "data": { "domain": "audit", "id": "…", "hash": "…" } }

Group the domain’s pending records into a Merkle tree and anchor the root on the blockchain.

Terminal window
curl -s -X POST http://localhost:5001/api/v1/audit/records/batch
{
"batch_id": "default-audit-3290b38d",
"merkle_root": "20e1a987…",
"num_records": 1,
"tx_id": "1d96e697…",
"anchored": true,
"channel": "logchannel"
}
Terminal window
curl -s -X POST http://localhost:5001/api/v1/audit/records/verify/default-audit-3290b38d
{ "is_valid": true, "integrity": "VALID", "anchor_status": "ANCHORED",
"on_chain_merkle_root": "20e1a987…", "recalculated_merkle_root": "20e1a987…" }

If any record had been altered, integrity would be CORRUPTED and the recomputed root would differ from the anchored one.

You don’t have to trust the API’s answer. The Go and Python SDKs recompute the hashes and Merkle root locally and compare them with the root read from the blockchain.

Terminal window
make down # stop, keep data
make clean # stop and remove volumes