Skip to content

Development setup

This guide details how to set up Mercury Core for local development and modification.

For a guide on server installation and hosting for production, see Production setup.

You should already have the necessary dependencies and command line tools installed. If not, see Installation for an installation guide.

You will need:

  • Latest version of Git installed (expected as git, optional)
  • Latest version of Bun installed (expected as bun, installation guide)
  • Latest version of Go installed (expected as go, installation guide)
  • Latest version of SurrealDB installed (expected as surreal, installation guide)
  • A terminal
  • A modern web browser (Early 2024 onwards for most major browsers)
  • A computer, as it would be painful to live without one, wouldn't it?

If you wish to use containers instead of SurrealDB and Go, install the latest version of a container manager such as Docker (expected as docker, installation guide) or an alternative container manager like Podman (installation guide).

  1. Clone the tp-link-extender/MercuryCore repository to a directory of your choice on your local machine, and navigate to the root directory of the repository.

    Terminal window
    git clone https://github.com/tp-link-extender/MercuryCore
    cd MercuryCore
  2. If not using containers, navigate to the Economy directory, and run go build to compile the Economy service.

  3. Navigate to the Site directory, and run bun i to install all dependencies.

  4. Copy the Site/.env.example file to Site/.env and modify it to set up the environment variables.

  5. If using containers, run docker compose up -d to start the Database and Economy services.

  6. Run bun dev to start the development server and open the web interface in your default browser. This will start the Database and Economy services automatically if they are not already running.