Icon SunFilledIcon MoonStars

Icon LinkRunning locally

This is a guide that will show you how you can run this project locally if you want to test or make contributions to our Fuel Wallet SDK.

Icon LinkRunning the project

Icon LinkRequirements

This project includes frontend. To begin, install dependencies:

Icon LinkGetting the Repository

  1. Visit the Fuel Wallet Icon Link repo and fork the project.
  2. Then clone your forked copy to your local machine and get to work.
git clone https://github.com/FuelLabs/fuels-wallet
cd fuels-wallet

Icon LinkInstall Dependencies

pnpm install

Icon LinkSetup Environment Variables

cp packages/app/.env.example packages/app/.env

Icon LinkRun Local Node

In this step, we are going to;

  • launch a local fuel-core node;
  • launch a local faucet API;

Make sure you have docker installed and running, before running the command below

pnpm node:up

Icon LinkRun Web App

Start a local development frontend. After running the below command you can open http://localhost:3000 Icon Link in your browser to view the frontend.

pnpm dev

Icon LinkProject Overview

This section has a brief description of each directory. More details can be found inside each package, by clicking on the links.

Icon LinkUseful Scripts

To make life easier we added as many useful scripts as possible to our package.json . These are some of the most used during development:

pnpm <command name>
Script
Description
dev
Run development server for the WebApp packages/app
dev:storybook
Run storybook, which is the place we use to develop our components.
test
Run all units tests that are based on Jest.
test:e2e
Run all E2E tests that are based on Cypress.

Other scripts can be found in package.json .

Icon LinkRunning Tests

Please make sure you have done these steps first:

Icon LinkRun Tests in Development Mode

All tests are run against the local node configured in the files packages/app/.env (or packages/app/.env.test if the file exists).

Before running test, make sure a local test node is running:

pnpm node:up:test

Then, to run tests use:

pnpm test

Icon LinkRunning E2E Tests

To run E2E tests, follow these steps:

Icon LinkRun Tests E2E in Development Mode

pnpm node:up
pnpm dev:crx
pnpm test:e2e

Icon LinkRun Tests E2E in CI/TEST env Mode

pnpm node:up:test
NODE_ENV=test pnpm build:app
NODE_ENV=test pnpm test:e2e

Was this page helpful?