How hyperledger/fabric-samples works
• Fabric Network Infrastructure – include the ordering service, peers, certificate authorities (CAs), and optionally the components for admin and fabric-network configuration. Note that this is represented in the “test-network”, “test-network-k8s”, and “test-network-nano-bash” directories.
• Chaincode (Smart Contracts) – show the various chaincode implementations used for asset transfers, private data, state-based endorsement, events, auctions, token services (ERC-20, ERC-721, ERC-1155, UTXO tokens, etc.). Since there are multiple asset transfer samples (asset-transfer-basic, asset-transfer-ledger-queries, asset-transfer-private-data, asset-transfer-secured-agreement, asset-transfer-sbe, asset-transfer-events, asset-transfer-abac), make it clear that these chaincodes encapsulate business logic on the ledger.
• Application Gateways and Client Applications – indicate the client-side or gateway applications that interact with the Fabric network. There are implementations in various languages (Go, Java, JavaScript, TypeScript) showing how external applications engage with the network using Fabric SDKs. For instance, directories like asset-transfer-basic/application-gateway-* or full-stack-asset-transfer-guide/applications are examples.
• Full-Stack / Frontend Applications – Incorporate the full-stack asset transfer guide sample which not only covers chaincode and backend but also a complete frontend (Angular-based in this case) to interact with the blockchain.
• Infrastructure/Deployment Configurations – the repository holds numerous infrastructure-related files such as those for Kubernetes ("test-network-k8s", “infrastructure/”), Docker Compose files (e.g., in “test-network”, “compose”), and playbooks for chaincode deployment. Represent these elements to show how the environment is bootstrapped and managed.
• Auxiliary Tools and Scripts – represent CI/CD pipelines (GitHub workflows in .github/workflows, CI scripts in the ci folder), testing scripts, and utilities for enrollment, chaincode packaging and network management. Although not the core application logic, these components support the overall system.
Relationships and data flow
• That chaincode is installed on peers within the network and that smart contracts interact with the underlying ledger.
• That chaincode and client applications are versioned and that some components (like use of private data collections or state-based endorsement) require additional communication and policy enforcement.
Architectural patterns and design principles
• Separation of concerns: Clearly differentiate transaction processing (chaincode on peers) from application logic (client applications) and external orchestration (deployment scripts and network configuration).
• Multi-language support: Represent that the same underlying business logic is implemented in multiple languages to support varied developer ecosystems.
• Extensibility and modularity: Show that separate modules (asset transfer, auctions, token models, off-chain data) can be added or substituted while sharing the core Fabric network infrastructure.
• Use of external configuration and CI/CD pipelines that manage deployment and testing across environments.
Relevant technologies, frameworks, and libraries
• Fabric SDKs and CLI tools.
• Docker and Kubernetes (for containerization and orchestration).
• Programming languages and build tools (e.g., Go modules, Java Gradle/Maven, Node/npm, TypeScript configurations).
• CI/CD workflows (GitHub Actions, shell scripts in the “ci” folder, playbooks in the “infrastructure” folder).
Directions to include the following elements
• Clear, distinct labels for each major component – for example, “Fabric Network (Orderer, Peer, CA)”, “Chaincode – Asset Transfer (Basic, Private Data, ABAC, etc.)”, “Frontend Application (Angular, Full-stack Guide)”, “API Gateway” and “Deployment Infrastructure (Docker/K8s)”.
• Annotations for key integration points (e.g., “Chaincode endorsement” between peers, “Fabric CA” for identity management, “CI/CD pipelines” that automate testing and deployment).