Chromia
Start Building

17 / 19Module 3 – FrontendAdvanced

Frontend: setup and run

Start the client application

The last step is to configure and launch the front end.

bash
cd client
bash
npm install

Create a .env file by copying .env_example.

bash
cp .env.example .env

Edit the configuration values.

.env
NEXT_PUBLIC_BLOCKCHAIN_RID=<DAPP_BRID> // the brid from the deploy the dapp stepNEXT_PUBLIC_NODE_API_URL=http://localhost:7740

DAPP_BRID - set this to the brid you got when you deployed the dapp.

Run the development server:

bash
npm run dev

Access the application

With the server running, open the application in a browser:

  1. Go to http://localhost:3000.
  2. Connect your MetaMask wallet.
  3. Log in, or register a new account.
  4. Set a wallet password, which is used to encrypt your private key.
  5. You can now make private transfers.

The following sections walk through each part of the application in more depth.

Written for this site from Chromia’s public course. Code samples are the course’s own.