github: https://github.com/hamster-shared/hamster-gateway
hamster is a blockchain-based blockchain infrastructure service. Any computing device can easily access the Hamster network.
Hamster-Gateway is a bootstrap node based on go-libp2p , which provides a public network-based node discovery service
Hi! Thank you for choosing Hamster.
Hamster is a blockchain that providers infrastructure service.
We are excited that you are interested in contributing to Hamster. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
-
Issues are exclusively for bug reports, feature requests and design-related topics. Other questions may be closed directly.
-
Before submitting an issue, please check if similar problems have already been issued.
-
Fork this repository to your own account. Do not create branches here.
-
Commit info should be formatted as
[File Name]: Info about commit.
(e.g.README.md: Fix xxx bug
) -
If your PR fixes a bug, please provide a description about the related bug.
-
Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
- main: 1.0.0 code, for prod
- develop: 2.0.0 dev code, for test
- node version > v16.0.0
- golang version >= v1.17
- IDE recommendation: Goland
# install package dependency
## centos
sudo yum install -y autoconf automake libtool git gcc
## ubuntu
sudo apt install -y autoconf automake libtool git gcc
# clone the project
git clone https://github.com/hamster-shared/hamster-gateway.git
# open frontend directory
cd frontend
# build frontend
npm run build
# go to root directory
cd ..
# use go mod And install the go dependency package
go mod tidy
# Compile
go build
# Run Daemon
./hamster-gateway daemon (windows The run command is hamster-gateway.exe)
- Frontend: using Vue-Vben-Admin based on Vue,to code the page.
- Backend: using Gin to quickly build basic RESTful API. Ginis a web framework written in Go (Golang).
- Config: using cobra and viper to implement
json
config file。 - Virtualization: linux using libvirt-go to manage virtual machines , windows using hyper-v
├─cmd (command line)
├─core
│ ├─context (server context)
│ ├─corehttp (gin route)
│ └─modules
│ ├─chain (chain transaction sdk)
│ ├─config (config)
│ ├─event (chain event impl)
│ ├─p2p (p2p util)
│ ├─time (state service )
│ └─utils tools
├─doc (doc directory)
├─frontend
│ ├─build
│ ├─mock (api mock)
│ ├─public (deploy templates)
│ ├─src
│ │ ├─api (frontend apis)
│ │ ├─assets (static files)
│ │ ├─components (components)
│ │ ├─design
│ │ ├─directives
│ │ ├─enums
│ │ ├─hooks
│ │ ├─layouts (layouts)
│ │ ├─locales (locale i18n)
│ │ ├─logics
│ │ ├─router (vue routers)
│ │ ├─settings
│ │ ├─store (vuex state management)
│ │ ├─utils (frontend common utilitie)
│ │ └─views (pages)
│ ├─tests
│ └─types
└─test (test utils)
- Configuration management: Provider parameters can be managed through configuration files and pages
- Blockchain communication: Register and establish a heartbeat
- p2p link management: coordinate the hamster client to establish peer-to-peer communication, so that the control side can access the created virtual machine
Thank you for considering your contribution to hamster!
If you use this project for commercial purposes, please comply with the Apache2.0 agreement and retain the author's technical support statement.