Skip to content

Latest commit

 

History

History
109 lines (74 loc) · 3.46 KB

GETTING_STARTED.md

File metadata and controls

109 lines (74 loc) · 3.46 KB

Getting Started

Requirements

This project includes both frontend and contracts. To begin, install dependencies:

Running Project Locally

📚 1. Getting the Repository

  1. Visit the Fuel Explorer 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/fuel-explorer
cd fuel-explorer

📦 2. Install Dependencies

pnpm install

📒 3. Run Local Node

This command will start essential development services;

  • L1 local node (to handle ethereum blockchain);
  • Fuel local node (to handle L2 chain);
  • Postgres database (that we use to index data);
pnpm node:start

You can check more details in docker-compose.yml file.

💻 4. Run Web App

Now that you have the local node running, you can start the frontend.

  1. Create a .env file based on the provided example in the packages/app-explorer directory
cp packages/app-explorer/.env.example packages/app-explorer/.env
  1. Start the frontend with the following command:
pnpm dev

After running that command, you can open http://localhost:3000 in your browser to view the explorer working.

🧪 Run E2E tests

  1. Use the following command to install Playwright along with its dependencies, including Chromium
pnpm exec playwright install --with-deps chromium
  1. Create a .env file based on the provided example in the packages/graphql directory
cp packages/graphql/.env.example packages/graphql/.env
  1. Start local node server
pnpm node:start
  1. Finally, you can run the E2E tests with the following command:
pnpm test:e2e

🧰 Useful 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 the development server (frontend only)
node:start Run the local network with fuel-core and the faucet API.
node:stop Stop all containers without removing data
node:clean Stop and remove all development containers that are running locally.
node:restart Restart all containers without removing data
test:e2e Run the E2E tests
ts:check Run the TypeScript compiler

Other scripts can be found in package.json.