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.
Prerequisites
Section titled “Prerequisites”- Docker + Docker Compose
make- (optional) Go 1.21+ / Python 3.8+ to use the SDKs
1. Bring up the stack
Section titled “1. Bring up the stack”make up # Fabric network + API + MongoDB + Redis + dashboardmake status # list the running containersWhen it finishes:
| Service | URL |
|---|---|
| API | http://localhost:5001 |
| Health | http://localhost:5001/health |
| Swagger | http://localhost:5001/swagger/index.html |
| Metrics | http://localhost:9090/metrics |
| Dashboard | http://localhost:8088 |
2. Create a record
Section titled “2. Create a record”A record is any JSON payload under a client-chosen domain. The API computes
an integrity hash automatically.
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": "…" } }3. Anchor the batch
Section titled “3. Anchor the batch”Group the domain’s pending records into a Merkle tree and anchor the root on the blockchain.
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"}4. Verify integrity
Section titled “4. Verify integrity”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.
5. Verify it yourself (trustless)
Section titled “5. Verify it yourself (trustless)”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.
Next steps
Section titled “Next steps”- Core concepts — records, domains, batches, anchors, tenants.
- The integrity dashboard — do all of the above in a UI.
- API reference — every endpoint.
Tear down
Section titled “Tear down”make down # stop, keep datamake clean # stop and remove volumes