Work-in-progress
Token Curated Registries for Non-profit Organizations
As the digital world is overtaken by the mob, a solution may be found in the wisdom of the crowd. -George Li
- Install geth.
- (Optional) Install ipfs if you would like to push your build there.
- (Optional) Set up charity-management-serv. Three options:
- (Default) Using the shared instance: https://tcr.wetrust.info/api/v0/charities
- Set up on local: docker might be easier than setting up the whole go-lang dev environment
- Set up your own AWS instance using terraform: https://github.com/WeTrustPlatform/charity-management-serv/blob/master/staging.tf
- Install dependencies:
npm install
- Configure the
CMS_URL
pointing tocharity-management-serv
inwebpack.config.js
. The URL should end with/api/v0
, no trailing slash.
new webpack.DefinePlugin({
CMS_URL: JSON.stringify(process.env.CMS_URL || 'http://localhost:8001/api/v0'),
}),
- Start the dApp:
- Local network:
npm run dev
It will launch a private local testnet on your machine and deploy new set of contracts if this is your first time. Accounts are loaded with free test ETH so you can interact with the dApp. - Rinkeby:
npm run dev -- testnet
The contracts already deployed and specified inconfig/contract.js
. If you want to deploy your own, make sure youraccount[0]
has Rinkeby ETH and remove the contract addresses in thetestnet
config.
- Local network:
- Approach 1: Use pre-built image.
Checkout the latest release:
docker pull sihoang/charity-tcr:testnet-latest
Launch the container:
docker run -i --rm -p 8000:80 sihoang/charity-tcr
- Approach 2: Build docker image with the latest code on local.
docker build -t charity-tcr .
These images are built with these args as default:
ARG ENVIRONMENT=testnet
ARG CMS_URL=https://tcr.wetrust.info/api/v0
Feel free to overwrite them as you please.
Launch the container:
docker run -i --rm -p 8000:80 charity-tcr
The webserver is at http://localhost:8000
GPL-3.0 © WeTrustPlatform