How hyperledger-labs/cc-tools-demo works
Main Components
• Fabric Network: Illustrate the Fabric network environment as the blockchain platform. Note that there are configuration folders (fabric, fabric-private-chaincode) indicating setups for multi-org networks and private chaincode execution.
• Chaincode: Represent the chaincode as the backbone smart-contract layer. There are two main directories:
• The “chaincode” directory with the business logic, transaction definitions, asset types, events, and tests.
• The “ccapi” directory which acts as the gateway/REST API service to interact with the chaincode.
• Chaincode API Server (ccapi): Show this as a separate block that contains sub-components such as the routes, handlers, server, and web client (indicating a possible UI layer).
• Supporting Deployment & Management Scripts: You might include a deployment orchestration layer that shows the scripts (startDev.sh, upgradeCC.sh, generatePackage.sh, etc.) and CI/CD workflows (notably in the .github folder).
Relationships and Interactions
• The Fabric Network (block) should display its peers, orderer(s), Certificate Authorities (CAs), and the mechanisms (Docker Compose setups) that launch these components.
• Additionally, if the web-client is part of ccapi, show a directional relationship where an external client (e.g., a web browser or REST client) sends requests to the ccapi service.
Architectural Patterns/Technologies
• Microservice-like separation between the Chaincode (smart contract logic) and the REST API service.
• Use of Docker Compose and script automation for environment setup and upgrades.
• Integration with Fabric Private Chaincode for enhanced privacy – this might be indicated as an optional secure execution layer.
• Language and dependencies such as Go for both chaincode and API server, and configuration files for blockchain orchestration.
• Multi-organization capability (1 org for simple testing and 3 orgs for more advanced setups as indicated in the README).