Explore Fablo by example

Start with a small local network, then add collaboration, data privacy, external chaincode services, operational tools, and repeatable state. Every example below maps to a maintained sample or documented command.

Start with one local network

Scaffold a Fabric 3.1 network and a sample Node.js chaincode, inspect the generated Docker files, then start everything with one command.

Fabric 3.1TLSBFTNode.js chaincode

Try it

mkdir fablo-first-network && cd fablo-first-network
fablo init node
fablo generate
fablo up

fablo init node creates fablo-config.json plus a sample chaincode. generate writes the network artifacts to fablo-target, and up starts the network, creates its channel, and deploys the chaincode.

Terminal output showing the main configuration, Docker, connection profile, chaincode script, and topology files generated in fablo-target.
Representative generated files. The exact organization-specific files follow the organizations in your config.

Share a channel, keep selected data private

Model two peer organizations on one channel, set explicit endorsement policies, and give each chaincode the private collections it needs.

Fabric 2.52 organizationsendorsement policiesprivate data

Configuration excerpt

chaincodes:
  - name: or-policy-chaincode
    version: 0.0.1
    lang: node
    channel: my-channel1
    directory: ./chaincodes/chaincode-kv-node
    endorsement: OR('Org1MSP.member', 'Org2MSP.member')
    privateData:
      - name: org1-collection
        orgNames: [Org1]

Generate the network normally with fablo up. Fablo writes the collection configuration and uses the declared policy when the chaincode is deployed.

Network topology showing Org1 and Org2 peers connected to my-channel1, with one Org1-only collection and one collection shared by both organizations.
The sample combines an organization-only collection with a second collection available to both peer organizations.

Run chaincode as a service

Use a container image for CCaaS, store world state in CouchDB, and expose Fabric operations through Fablo REST for each peer organization.

Fabric 3.1CCaaSCouchDBFablo REST

Configuration excerpt

orgs:
  - organization: { name: Org1, domain: org1.example.com }
    peer: { instances: 1, db: CouchDb }
    tools: { fabloRest: true }
chaincodes:
  - name: chaincode1
    version: 0.0.1
    lang: ccaas
    channel: my-channel1
    image: ghcr.io/fablo-io/fablo-sample-kv-node-chaincode:2.2.0
    chaincodeStartCommand: npm run start:ccaas

The complete sample applies the peer and tool settings to both organizations and connects them through my-channel1.

Terminal output listing running peers, CouchDB databases, Fablo REST services, and a chaincode-as-a-service container.
Representative service groups after startup. Docker Compose service names can vary with the generated network.

Add Blockchain Explorer to Fabric v2

Enable the optional Explorer UI when you need to inspect channels, blocks, and transactions in a Fabric 2.5 development network.

Fabric 2.5 onlyExplorerTLSRAFT

Configuration excerpt

{
  "global": {
    "fabricVersion": "2.5.12",
    "tls": true,
    "tools": { "explorer": true }
  }
}

Explorer is supported for Fabric v2 and not Fabric v3. Keep the Fabric version explicit, then run fablo up to generate its connection material and start its containers with the network.

Terminal output showing generated Blockchain Explorer configuration and connection profile files for a Fabric version 2 network.
Fablo generates Explorer configuration and connection-profile material from the same network declaration.

Save state before the next experiment

Capture a complete local network state, including transactions and identities, then restore it after a test, upgrade, or destructive change.

Fabric 2.5 and 3.1network staterepeatable testing

Try it

fablo snapshot ./snapshots/before-upgrade
fablo down
fablo restore ./snapshots/before-upgrade

Use a snapshot path outside fablo-target if you plan to prune generated files before restoring the network.

Terminal workflow running fablo snapshot, fablo down, and fablo restore against a named local snapshot.
A compact snapshot workflow for repeatable integration tests and local upgrade experiments.