loading...

What is higan and how I build it

daoleno profile image daoleno ・3 min read

What is higan

https://higan-bana.com/

Higan is a public, trustable, and unforgotten database for people who needs to be remembered.

For people who died because of COVID-19.

What does that mean?

Until now, there are 248,811 people who died because of COVID-19. Many people lost their families, friends, and heroes in this disaster. I think we need a place to remember these people.

  • Public - You can submit some information about people you know. And that information will be public, which means anyone can access it.

  • Trustable - The project is open source, you can build your own service and synchronize all the data.

  • Unforgotten - This is a blockchain project where all data is tracked and recorded. When more people are involved, the data is harder to tamper with and less likely to be lost.

In addition to COVID19, you can also record those people you love and respect. You can think of Higan as an Internet tombstone.

Higan is a Japanese word(Chinese: 彼岸) for another place where the dead are going.
Higan Bana is a Japanese word(Chinese: 彼岸花). It's a flower that is described in Chinese to guide the dead into the next reincarnation.

How I built it.

There are two separate projects, Higan and Higan-ui.

Higan

GitHub logo daoleno / higan

A public, trustable, and unforgotten database for people who needs to be remembered.

Higan · GitHub license PRs Welcome

Higan is a blockchain project for building online tombstone for the dead.

Higan-ui - the front end of higan.

Why Higan?

People will forget, higan will not.

For one you love, for the people who died because of the COVID-19.

  • Data can be accessed by anyone.

  • Data can not be changed.

  • Anyone can setup his own higan.

Build

make install

Run local test node

sh init.sh

License

Higan is MIT licensed.




Higan is a blockchain project based on cosmos-sdk.

The Cosmos-SDK is a framework for building blockchain applications in Golang. It's like ruby-on-rails for ruby.

Tendermint stack

Higan is a cosmos-sdk application. So as shown in the figure.

  • higancli(command line tool of higan) will start a rest server that accepts API requests.
  • The rest server sends a request message to higand (ABCI APP developed through cosmos-sdk) via tendermint.
  • higand will validate the message, handle it, and store the transaction in multistore, which is multiple key-value databases built into cosmos-sdk.
  • Status and transactions will be synchronized in the P2P network via tendermint.

Here, cosmos-sdk has developed many modules such as auth, bank, etc. that allow you to easily develop a PoS-based blockchain.

Tendermint does the very heavy work of pBFT-based consistency layer, p2p layer, etc. and can easily synchronize the state between nodes

So what I need to do is develop a module called tombstone.
This module handles my custom messages and writes the record to the multistore.

Eventually, there will be two programs, higand to run the blockchain and higancli to send or query transactions to higand.

Higan-ui

GitHub logo daoleno / higan-ui

Front-end of the project Higan

Higan UI · Netlify Status GitHub license PRs Welcome

The front end of the project higan.

Requirment

Run higan, and ensure rest-server is ok.

Config cors in Nginx or anything similar.

Install

yarn install

Run project

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

License

Higan is MIT licensed.




It is a very simple front end of the higand server. It can display the records that have been stored on the blockchain, submit a record, show the height of the block, and show the number of records. It also has a very rudimentary search feature.

I use react, react-hooks, and tailwindcss to build it.

I really hate CSS, thanks tailwindcss and tailwindui. Saved my life. Helped me build my first front-end project.

How I deployed it

Deploy higand and higancli rest-server to aws

I started an EC2 instance on AWS.

I use ansible to manage higan projects. If anyone is interested, I can open source it.

The ansible script performs some initialization work, creating a systemd service for higand and a systemd service for higancli rest-server.

Then there is an nginx that forwards the request to the REST service. Nginx configures some cors header and turns on https.

I use cerbot to configure let's encrypt. It's very simple.

Deploy higan-ui to netlify

Just let netlify connect to my gitHub, and netlify will perform an automated deployment and provide free let's encrypt based encryption. I applied for my domain on godaddy. Then I switched to netlify's DNS resolution.

Finally

Welcome to contribute.

Discussion

pic
Editor guide