{"id":21307267,"url":"https://github.com/rubcv/hyperledger-fabric-basic-network","last_synced_at":"2025-09-20T07:58:49.923Z","repository":{"id":205277242,"uuid":"626539207","full_name":"rubcv/Hyperledger-Fabric-basic-network","owner":"rubcv","description":":wrench: Basic network for a Hyperledger Fabric project development","archived":false,"fork":false,"pushed_at":"2023-04-11T18:07:10.000Z","size":1311,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T19:48:50.808Z","etag":null,"topics":["hyperledger-fabric","network","template"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubcv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-11T17:07:55.000Z","updated_at":"2023-11-03T10:31:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8d7f40c-ab3e-4f2e-8d87-c53ca83fc4df","html_url":"https://github.com/rubcv/Hyperledger-Fabric-basic-network","commit_stats":null,"previous_names":["rubcv/hyperledger-fabric-basic-network"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rubcv/Hyperledger-Fabric-basic-network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubcv%2FHyperledger-Fabric-basic-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubcv%2FHyperledger-Fabric-basic-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubcv%2FHyperledger-Fabric-basic-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubcv%2FHyperledger-Fabric-basic-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubcv","download_url":"https://codeload.github.com/rubcv/Hyperledger-Fabric-basic-network/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubcv%2FHyperledger-Fabric-basic-network/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276064355,"owners_count":25578999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hyperledger-fabric","network","template"],"created_at":"2024-11-21T16:30:53.765Z","updated_at":"2025-09-20T07:58:49.869Z","avatar_url":"https://github.com/rubcv.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyperledger-Fabric-basic-network\nBasic network for a Hyperledger Fabric project development.\n\n## Table of contents\n\n- [Pre-requisites](#pre-requisites)\n- [Hyperledger Fabric network](#hyperledger-fabric-network)\n- [Deploy the network](#deploy-the-network)\n  - [Manually test the chaincode](#manually-test-the-chaincode)\n- [Web Application](#web-application)\n  - [Installation](#installation)\n  - [Running the app](#running-the-app)\n    - [Fabric CA user creation](#fabric-ca-user-creation)\n    - [Transactions](#transactions)\n\n## Pre-requisites\n\n1. Hyperledger Fabric v2.2\n1. Hyperledger Fabric CA v1.5\n1. Docker v20.10\n1. Docker-Compose v2.14.0\n1. NodeJS / TypeScript v16.13.0\n1. npm v9.2.0\n\n## Hyperledger Fabric network\n\nThe Hyperledger Fabric network consists of: \n* One orderer\n    * orderer.example.com\n* One organization\n    * MSPID: Org1MSP\n    * Two peers:\n        * peer0.org1.example.com\n        * peer1.org1.example.com\n    * One CouchDB state database deployment for each peer\n    * Fabric CA\n        * ca.org1.example.com \n* Fabric CLI\n\n![Network deployment](./img/topology.png)\n\n## Deploy the network\n\n1. Install Hyperledger Fabric latest docker images and binaries.\n    ```shell\n    ./install-fabric.sh\n    ```\n    this will generate a `fabric-samples` folder inside the project directory.\n    \u003e Note: The `fabric-samples` folder is not needed, as we will only be using the downloaded Docker images to deploy the network\n\n1. Generate the network artifacts.\n    ```shell\n    cd network-files\n    ./generate.sh\n    ```\n    ![Network deployment](./img/generate.png)\n\n1. Deploy the network.\n    ```shell\n    ./start.sh\n    ```\n    ![Network deployment](./img/start.png)\n\n1. Teardown the network\n    ```shell\n    ./teardown.sh\n    ```\n    ![Network deployment](./img/teardown.png)\n## Web Application\n\nA Web Application is made available using **Nest.js**\n\n```shell\ncd webapp/\n```\n\n### Installation\n\n```shell\nnpm install\n```\n\n### Running the app\n\n```shell\nnpm start\n```\n![Web Application](./img/webapp-start.png)\n\n### Using the Web Application\n\n#### Transactions\n\nTransactions can be submitted via the web application. The Nest.js webapp supports both invokes and queries to the blockchain.\n\nThe application listens on `localhost:3000` and has two endpoints:\n\n* http://localhost:3000/invoke\n\n  body:\n  ```json\n  {\n      \"function\": \"FunctionName\",\n      \"args\": [\"list\", \"of\", \"arguments\"]\n  }\n  ```\n\nAs mentioned before, this chaincode needs to be initialized in order to use it. Therefore, the `Initialize` function can be called via POSTMAN.\n![Web Application](./img/postinit.png)\n\nFurthermore, an `Invoke` can be made via POSTMAN to Mint some tokens\n![Web Application](./img/postmint.png)\n\n* http://localhost:3000/query\n\n  body:\n  ```json\n  {\n      \"function\": \"FunctionName\",\n      \"args\": [\"list\", \"of\", \"arguments\"]\n  }\n  ```\n  Similarly, a `Query` can be made via POSTMAN to get the account balance\n![Web Application](./img/getbalance.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubcv%2Fhyperledger-fabric-basic-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubcv%2Fhyperledger-fabric-basic-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubcv%2Fhyperledger-fabric-basic-network/lists"}