Skip to content

Getting Started

This guide provides a step-by-step tutorial on how to start Re:Earth Visualizer locally.

Before Start

  1. To set up and run the Re:Earth Visualizer frontend, server and database, ensure you meet the following prerequisites:

    • Go: Download and install Go from the official site: Download Go.
    • Docker: Install Docker by following these instructions: Install Docker.
    • Node.js: Download and install Node.js from the official site: Download Node.js.
    • Yarn: Install Yarn by following these instructions: Install Yarn. V4 is recommended.
    • Git: Download and install Git from the official site: Download Git.
  2. Clone the code:

    Open your terminal (or PowerShell if you’re on Windows) and navigate to your desired working directory.

    Terminal window
    cd your-working-directory
    git clone https://github.com/reearth/reearth-visualizer

Setup Server and Database

Make sure Docker is properly installed and running on your machine.

  1. From your cloned directory, navigate to the server folder and set up the database:

    Terminal window
    cd server
    make run-db
  2. Create and configure the .env file in the server directory to use mock authentication.

    Terminal window
    touch .env
    echo "REEARTH_MOCKAUTH=true" >> .env
  3. Start the backend server.

    Terminal window
    make run-app
  4. Register a new mockuser.

    Terminal window
    make mockuser

Setup Web

  1. Navigate to the web directory of your visualizer project and set up local .env file.

    Terminal window
    cd web
    touch .env
  2. Add the following environment variables to the .env file:

    .env
    REEARTH_WEB_API=http://localhost:8080/api
    REEARTH_WEB_PLUGINS=http://localhost:8080/plugins
    REEARTH_WEB_CESIUM_ION_ACCESS_TOKEN=your_cesium_ion_access_token_here
    REEARTH_WEB_AUTH_PROVIDER=mock
  3. Install dependencies and start the frontend server.

    Terminal window
    yarn && yarn start

Done!

You should now be able to access the Re:Earth Visualizer locally at http://localhost:3000.