diff --git a/.github/README.md b/.github/README.md index 8f63b6a..211f39e 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,97 +1,96 @@ -# 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 + + # Response + {"networkId": "localthreeMasterNodes"} + + # Request + curl -X POST /start/localthreeMasterNodes + + # Response + Network Started + ``` + +## 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 84b06ec..0000000 Binary files a/.github/project-logo.png and /dev/null differ diff --git a/README.md b/README.md deleted file mode 100644 index 3360547..0000000 --- a/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# networkHub - -## Introduction -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 -./networkHub api -``` -or -```bash -go run ./cmd/main.go api -``` - -## 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. - -```