Getting Started
This guide provides a step-by-step tutorial on how to start Re:Earth Visualizer locally.
Before Start
-
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.
-
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-directorygit clone https://github.com/reearth/reearth-visualizer
Setup Server and Database
Make sure Docker is properly installed and running on your machine.
-
From your cloned directory, navigate to the server folder and set up the database:
Terminal window cd servermake run-db -
Create and configure the
.env
file in the server directory to use mock authentication.Terminal window touch .envecho "REEARTH_MOCKAUTH=true" >> .env -
Start the backend server.
Terminal window make run-app -
Register a new mockuser.
Terminal window make mockuser
Setup Web
-
Navigate to the web directory of your visualizer project and set up local .env file.
Terminal window cd webtouch .env -
Add the following environment variables to the
.env
file:.env REEARTH_WEB_API=http://localhost:8080/apiREEARTH_WEB_PLUGINS=http://localhost:8080/pluginsREEARTH_WEB_CESIUM_ION_ACCESS_TOKEN=your_cesium_ion_access_token_hereREEARTH_WEB_AUTH_PROVIDER=mock -
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
.