Start by setting up the local environment variables.
cp .env.example .env
Create an account on mapbox. Once you have an account, create a token on mapbox. Update the .env file in the Cadastre folder with this line of code and your new token from mapbox:
NEXT_PUBLIC_REACT_APP_MAPBOX_TOKEN=your_mapbox_token
If you don't already have an account, create one at Infura. Once you have an account, create a project for GeoWeb and copy the API key. Update the .env file in the Cadastre folder with this line of code: (Note: you may need to activate the addon for Optimism):
NEXT_PUBLIC_INFURA_PROJECT_ID=your_infura_project_id
If you don't already have an account, create one at Web3 Storage. Once you have an account, create a new API Token and copy it. Update the .env file in the Cadastre folder with this line of code:
NEXT_PUBLIC_WEB3_STORAGE_TOKEN=your_web3storage_api_token
Install Node Version 16 if you don't have it but stay within LTS. If you have a Mac, you can use this command
brew install node@16
Otherwise download from node and stay within LTS.
Use yarn to download and install all your dependencies
yarn
OR
yarn install
To run locally
yarn dev
To deploy to production, you will need to install docker and run
docker build -t cadastre .
docker run -p 3000:3000 cadastre
During development cycles you will need Optimism Goerli ETH. There are two ways to obtain OP Goerli ETH.
-
Faucet Head over to the Paradigm Faucet and enter the address of the wallet you would like to fund.
-
Bridge If you already have Goerli ETH you can use the Optimism Bridge. Connect you wallet, select the Goerli Test net and the amount you would like to bridge.
TODO Add Branch strategy & link to conventional commits