Local Development
Prerequisites
| Tool | Version | Install |
|---|---|---|
| Node.js | ≥ 20 | nodejs.org |
| pnpm | ≥ 9 | npm i -g pnpm |
| Rust | stable | rustup.rs |
| Stellar CLI | latest | cargo install stellar-cli |
The Rust toolchain and Stellar CLI are only required if you are working on the Soroban contracts in packages/contracts/. Frontend and API work does not require them.
Setup
git clone https://github.com/drydocs/meridian.git
cd meridian
pnpm installRunning the full stack
pnpm devTurborepo starts all dev tasks in parallel:
- Web at
http://localhost:3000/app/(Vite dev server with HMR) - API at
http://localhost:3001(Fastify withtsx watch) - Docs at
http://localhost:3000/docs/(VitePress, proxied from port 3002)
The Vite dev server proxies /api/* to http://localhost:3001 and /docs/* to the VitePress dev server at port 3002.
Running services individually
# Web only
pnpm --filter @meridian/web dev
# API only
pnpm --filter @meridian/api devHealth check
curl http://localhost:3001/health
# {"status":"ok"}Running tests
pnpm testTo run tests for a single package:
pnpm --filter @meridian/shared test
pnpm --filter @meridian/stellar-sdk-helpers testType checking
pnpm typecheckLinting
pnpm lintBuilding packages
If you edit a packages/ library, rebuild it before the apps pick up the changes:
pnpm buildOr build a single package:
pnpm --filter @meridian/shared buildWorking with the vault contract
cd packages/contracts/vault
# Build the WASM
stellar contract build
# Run Rust tests
cargo testSee Testnet Deployment for deploying the contract to testnet.
Freighter wallet
Install the Freighter browser extension and switch it to Testnet mode. Fund your testnet account using Stellar Friendbot.
The local API server is hardcoded to testnet (STELLAR_NETWORKS.testnet). Mainnet configuration is available via environment variables but is not the default for local development.