Chromia
Start Building

02 / 04Advanced

Set up your project

Complete the steps below to get the Chromia GOAT demo project running on your machine.

Prerequisites

  • Node.js: You need version 22 or later. Download it from the Node.js website.

  • MetaMask extension: Add the MetaMask extension to your browser. You use it to hold your EVM accounts and link them to Chromia.

  • Two Chromia accounts: In MetaMask, set up two distinct EVM accounts. For each one, open the Chromia testnet faucet and complete the steps shown there to fund it and create a new Chromia account.

Setup instructions

  1. Clone the repository: Run this command in your terminal:

    bash
    git clone https://bitbucket.org/chromawallet/chromia-goat-demo.gitcd chromia-goat-demo
  2. Install dependencies: Execute npm install to pull in every package the project needs.

  3. Set up your .env file: Make a copy of the repository's .env.template file and name it .env. Then swap the placeholder values for your real AI service credentials, as shown here:

    env
    VITE_AI_API_KEY=your-api-key-hereVITE_AI_BASE_URL=your-base-url-hereVITE_AI_MODEL_NAME=your-model-name-here
  4. Start the development server: Run npm run dev to start the Vite development server.

  5. Connect MetaMask: In your browser, go to the URL that the Vite development server prints (shown in your terminal). Then connect your EVM account through MetaMask.

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