Running Unicove in development mode leverages make
and bun
. To setup a local development environment, clone this repository and perform the following actions.
Run make install
to install the same version of the dependencies used in production builds (or bun install --frozen-lockfile
).
Run make dev
to start a local development environment running at:
The make check
command will run through Svelte checks, eslint, and prettier. All PRs submitted against the repository will also automatically run these checks to ensure functionality and consistent code formatting.
The .env
file contains the minimal configuration required for Unicove to operate and is included in the root of this repository. This file shouldn't be modified for local changes, and instead a .env.development
file should be created to selectively override the defaults in the .env
.
To override the more complex JSON stored in PUBLIC_CHAINS
and PRIVATE_BACKENDS
, a specific build process has been setup to generate an .env.local
automatically based on the contents of the JSON files in scripts/env/local
. These files can be created and updated using the steps below.
- If this is the first time altering these values, run
make config
to generatebackends.json
andchains.json
in./scripts/env/local
. - Edit the
chains.json
file to alter which chains are supported along with their features/endpoints. - Edit the
backends.json
file to alter how the SSR backend retrieves data about each chain defined inchains.json
. - Run
make config
to write a copy of your modified config files into.env.local
.
Anytime changes are made to either scripts/env/local/backends.json
or scripts/env/local/chains.json
, run make config
again to regenerate the .env.local
file and update the values.
With Unicove running, the current configuration can be viewed in the Debug State section: