From 3d74dc0935b29d94a05b0870cb927a992e15185c Mon Sep 17 00:00:00 2001 From: otherview Date: Thu, 2 May 2024 17:49:41 +0100 Subject: [PATCH] readme --- .github/README.md | 172 ++++++++++++++++++--------------------- .github/README.old.md | 97 ++++++++++++++++++++++ .github/project-logo.png | Bin 6784 -> 0 bytes README.md | 87 -------------------- 4 files changed, 178 insertions(+), 178 deletions(-) create mode 100644 .github/README.old.md delete mode 100644 .github/project-logo.png delete mode 100644 README.md diff --git a/.github/README.md b/.github/README.md index 8f63b6a..3360547 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,97 +1,87 @@ -# Project - - - -![Project Logo](project-logo.png) +# networkHub ## Introduction - -A brief description of your project, its purpose, and main features. - -This is a template repository, that allows you to quickly create new repos with the following templates: -1. [README.md](README.md) -2. [CONTRIBUTING.md](CONTRIBUTING.md) -3. [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) -4. [CODEOWNERS](CODEOWNERS) -5. [LICENSE.md](LICENSE.md) - -Consider turning on branch protection for `main` as follows: -1. Require a pull request before merging. - 1. Require 1 approval. - 2. Dismiss stale pull request approvals when new commits are pushed. - 3. Require review from Code Owners. - 4. Require approval of the most recent reviewable push. -2. Require status checks to pass before merging. -3. Require branches to be up to date before merging. -4. Require conversation resolution before merging. -5. Require deployments to succeed before merging. - -## Table of Contents - -- [Project](#project) - - [Introduction](#introduction) - - [Table of Contents](#table-of-contents) - - [Getting Started](#getting-started) - - [Prerequisites](#prerequisites) - - [Installation](#installation) - - [Configuration](#configuration) - - [Usage](#usage) - - [Documentation](#documentation) - - [Contributing](#contributing) - - [Roadmap](#roadmap) - - [Changelog](#changelog) - - [License](#license) - - [Credits](#credits) - -## Getting Started - -### Prerequisites - -List the required software, libraries, or tools needed to use or contribute to the project. - -### Installation - -Provide step-by-step instructions for installing the project, including any required dependencies. - +networkHub is a versatile framework designed to streamline the process of launching custom Vechain networks across various environments. It is tailored specifically for protocol and dapp development teams, providing a robust toolset to configure, start, stop, and manage blockchain networks with ease. + +## Purpose and Scope +networkHub enables teams to quickly deploy custom networks, facilitating development and testing in a controlled environment. This framework is especially beneficial for protocol and dapp teams looking to experiment with network configurations and behaviors without the overhead of setting up infrastructure from scratch. + +## Technical Requirements +- **Git**: For cloning the repository. +- **Golang**: Version 1.19 or higher. + +## Setup +To setup networkHub, follow these steps: + +1. Clone the repository: + ```bash + git clone https://github.com/vechain/networkhub + ``` +2. Build the application: + ```bash + go build -o networkHub ./cmd/main.go + ``` +3. To run networkHub, execute: + ```bash + ./networkHub + ``` + or + ```bash + go run ./cmd/main.go + ``` + This will display the available command-line options. + +### Running the API +To launch the framework in API mode, use the following command: ```bash -# Example installation commands +./networkHub api +``` +or +```bash +go run ./cmd/main.go api ``` -### Configuration - -Explain how to configure the project, if necessary. - -### Usage - -Include code examples or usage instructions to help users get started quickly. - -### Documentation - -Link to any additional documentation or tutorials, either within your repository or hosted externally. - -### Contributing - -Explain how others can contribute to the project. Include information on: - - How to submit bug reports or feature requests. - The process for submitting pull requests. - Any specific coding standards or guidelines. - The best way to get in touch with the maintainers, if needed. - -You may use [a separate `CONTRIBUTING` file](CONTRIBUTING.md) to keep your `README.md` short. - -### Roadmap - -Share the project's development roadmap, if available, including planned features and improvements. - -### Changelog - -Keep a log of all notable changes and updates in the project. - -### License - -This project is licensed under [the LICENSE](LICENSE.md). - -### Credits +## Usage Examples +Below are some example `curl` requests to interact with the networkHub via its HTTP API. +(Note: Replace `` with the actual URL where networkHub API is hosted.) + +- **Configure Network**: + ```bash + # Request + curl -X POST /config -d '{...}' # {...} is a network config json + + # Response + {"networkId": "8b38927893d1fc841b7bedcbaebb03821000908cfa1ee07a09002bc0e0ed3caf"} + ``` + + +- **Start Network**: + ```bash + # Request + curl -X POST /start/8b38927893d1fc841b7bedcbaebb03821000908cfa1ee07a09002bc0e0ed3caf + + # Response + Network Started + ``` + +- **Stop Network**: + ```bash + # Request + curl -X POST /stop/8b38927893d1fc841b7bedcbaebb03821000908cfa1ee07a09002bc0e0ed3caf + + # Response + Network Stopped + ``` + +- **Launch Pre-configured Network (ThreeMasterNodeNetwork)**: + ```bash + # Request + curl -X POST /preset/threeMasterNodesNetwork + ``` + +## Project Structure +- **Entrypoints**: Interface to interact with the framework. Currently implemented as an HTTP API server. +- **Actions**: Domain-specific language (DSL) that allows users to configure, start, stop, and request information on networks. +- **Environments**: Interface for running networks in different environments, with the Local environment currently implemented. -Recognize any significant contributors, sponsors, or organizations that have supported the project. +``` diff --git a/.github/README.old.md b/.github/README.old.md new file mode 100644 index 0000000..de326e0 --- /dev/null +++ b/.github/README.old.md @@ -0,0 +1,97 @@ +# Project + + + +![Project Logo](project-logo.png) + +## Introduction + +A brief description of your project, its purpose, and main features. + +This is a template repository, that allows you to quickly create new repos with the following templates: +1. [README.md](README.old) +2. [CONTRIBUTING.md](CONTRIBUTING.md) +3. [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) +4. [CODEOWNERS](CODEOWNERS) +5. [LICENSE.md](LICENSE.md) + +Consider turning on branch protection for `main` as follows: +1. Require a pull request before merging. + 1. Require 1 approval. + 2. Dismiss stale pull request approvals when new commits are pushed. + 3. Require review from Code Owners. + 4. Require approval of the most recent reviewable push. +2. Require status checks to pass before merging. +3. Require branches to be up to date before merging. +4. Require conversation resolution before merging. +5. Require deployments to succeed before merging. + +## Table of Contents + +- [Project](#project) + - [Introduction](#introduction) + - [Table of Contents](#table-of-contents) + - [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Installation](#installation) + - [Configuration](#configuration) + - [Usage](#usage) + - [Documentation](#documentation) + - [Contributing](#contributing) + - [Roadmap](#roadmap) + - [Changelog](#changelog) + - [License](#license) + - [Credits](#credits) + +## Getting Started + +### Prerequisites + +List the required software, libraries, or tools needed to use or contribute to the project. + +### Installation + +Provide step-by-step instructions for installing the project, including any required dependencies. + +```bash +# Example installation commands +``` + +### Configuration + +Explain how to configure the project, if necessary. + +### Usage + +Include code examples or usage instructions to help users get started quickly. + +### Documentation + +Link to any additional documentation or tutorials, either within your repository or hosted externally. + +### Contributing + +Explain how others can contribute to the project. Include information on: + + How to submit bug reports or feature requests. + The process for submitting pull requests. + Any specific coding standards or guidelines. + The best way to get in touch with the maintainers, if needed. + +You may use [a separate `CONTRIBUTING` file](CONTRIBUTING.md) to keep your `README.md` short. + +### Roadmap + +Share the project's development roadmap, if available, including planned features and improvements. + +### Changelog + +Keep a log of all notable changes and updates in the project. + +### License + +This project is licensed under [the LICENSE](LICENSE.md). + +### Credits + +Recognize any significant contributors, sponsors, or organizations that have supported the project. diff --git a/.github/project-logo.png b/.github/project-logo.png deleted file mode 100644 index 84b06ecc16b699c68751cc7daf71d5b1c6b05e15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6784 zcmV-`8h_=9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vG?Apig_Apr+l{Qm#|8Wl-IK~#8N<(&!K zJylu9v3;{WD_dMzOhq)!4N<@?gA@e8G*Lv6MO;!-7Sq)Jq-lV-M~Yx3YJnmyxln0{ z8W{?rrCC~5R<>HE+4B9~nR~m-dCr{K-h2P|{e3>qXJ+pE&N*l1Im>gNZLYV^F2z&c zd7~S0I0!lr+86qM$ltyS`e*2`pg)J+54{t*>N)rP)PHl_tFY@B3}f%W;W5xpL*MFe zg}55}b?5>Z{rSl+djWP0gJJCVaX1q?2I}+NpMcJQ$*-#}HygWx!7$g+`fJelPJS2$ z7eJ4O(f?juZYH*#!7%sH99~#m4UYFghr{I0R+pQHt!8is=KdG-KhW1erSImCp?kyR zf2b}u3tP+JdRl%{brs^v(C3U` zx(fQ9$q#8<0zC_+I08dZ);Du_DD(@^4g4*@Gbrm9>+_Alwlert93E0#t>BB0!qLmC z%Q8^r4{&%Tboa>*tN0Rh2g?0Wb-5Y%iu$-UfDw1*5Ha^Zq5HRGuHc@(*TbOm>+{Z_ z47FG%Ln(nuHK!e5W3X)__@0nL(J~x)&#F%Q117(hL!`+%gpMYoHv-$nV7E0XyaT3O zQ=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PCY68Ky%|ajCT^- zE=4bZm#_1JX?cg%59=#_uT5jF*i|EV3P!RX7)CAh-3zONRG{ko{o=8)D;YcmjCLPv zsHZu++GLH_JxSB4`Lm*&ARB>Q&EP3uw1IWH`lxo)9oR3x7{cTGk%3yo)G3>^TkY6Y iFm|mf$TIA+&;J2ER^js_G_q^}0000` with the actual URL where networkHub API is hosted.) - -- **Configure Network**: - ```bash - # Request - curl -X POST /config -d '{...}' # {...} is a network config json - - # Response - {"networkId": "8b38927893d1fc841b7bedcbaebb03821000908cfa1ee07a09002bc0e0ed3caf"} - ``` - - -- **Start Network**: - ```bash - # Request - curl -X POST /start/8b38927893d1fc841b7bedcbaebb03821000908cfa1ee07a09002bc0e0ed3caf - - # Response - Network Started - ``` - -- **Stop Network**: - ```bash - # Request - curl -X POST /stop/8b38927893d1fc841b7bedcbaebb03821000908cfa1ee07a09002bc0e0ed3caf - - # Response - Network Stopped - ``` - -- **Launch Pre-configured Network (ThreeMasterNodeNetwork)**: - ```bash - # Request - curl -X POST /preset/threeMasterNodesNetwork - ``` - -## Project Structure -- **Entrypoints**: Interface to interact with the framework. Currently implemented as an HTTP API server. -- **Actions**: Domain-specific language (DSL) that allows users to configure, start, stop, and request information on networks. -- **Environments**: Interface for running networks in different environments, with the Local environment currently implemented. - -```