What can I do when I need to leverage gatsby to building web dApps?
forge-gatsby-starter is here to help!
forge-gatsby-starter is the go to solution if you want to build applications with gatsby that runs on forge powered chains.
forge-next-starter is based on the awesome
forge-gatsby-starter is a gatsby dApp template that have forge-sdk integrated, it consists of 2 core parts:
Built upon the application skeleton we got after running
create-react-app, dApps bootstrapped with this starter have several widely used react libraries integrated to make page composing easier:
- gatsby.js this project was bootstrapped with Create React App.
- styled-components as styling solution
- @material-ui/core as component library
- react-router-dom for client side routing
- @arcblock/forge-sdk for read and write onchain data
This starter needs some environment variables to work, which are stored in the .env file in the project root directory:
MONGO_URI: MongoDB connection string
APP_TOKEN_SECRET: JWT token secret
APP_TOKEN_TTL: APPTOKENSECRET token's TTL
APP_SK: dAPP's secret key
APP_PORT: Server port
GATSBY_CHAIN_ID: Chain ID of the chain
GATSBY_CHAIN_HOST: The graphQL API server host of the chain
GATSBY_APP_NAME: dAPP's name
GATSBY_APP_DESCRIPTION: dAPP's description
GATSBY_APP_ID: dAPP's ID
GATSBY_BASE_URL: Base url of server
forge-gatsby-starter can be start point for gatsby and forge powered dApp, you can built many blockchain powered apps, such as:
- Online store that sells digital assets and accept ABT as payments
- Online community application that authentication users through ABT Wallet
- Admin console for internal use that are protected by ABT Wallet
Here are the knowledge requirements to get you up to speed when using this starter blocklet:
- Basic react coding experience
- Basic knowledge of mongodb
- Basic knowledge of gatsby
And to get the starter blocklet up and running on first try, you should:
- A handy command line terminal
- Install latest version of forge-cli:
npm install -g @arcblock/forge-cli
- Spin up a forge-powered chain with forge-cli
- Have a running mongodb instance that the dApp can connects to
Besides, you need to have ABT Wallet installed to try out the application after bootstrapping.
Copyright 2018-2019 ArcBlock
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.