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.
Requirements
Section titled “Requirements”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).
Instructions
Section titled “Instructions”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/MercuryCorecd MercuryCore- If not using Git, you can also download the repository as a compressed archive file (.zip) from the GitHub page and extract it to a directory of your choice.
If not using containers, navigate to the Economy directory, and run
go buildto compile the Economy service.Navigate to the Site directory, and run
bun ito install all dependencies.Copy the Site/.env.example file to Site/.env and modify it to set up the environment variables.
If using containers, run
docker compose up -dto start the Database and Economy services.Run
bun devto 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.