Skip to content

Moonlight-Protocol/local-dev

Repository files navigation

Local Dev

Run the full Moonlight stack locally: Stellar network, smart contracts, privacy provider, consoles, and dashboards.

Prerequisites

Tool Install
Docker docker.com

Rust/Cargo, Stellar CLI, and Deno are auto-installed by up.sh if missing.

Repos

Clone all repos to ~/repos/:

~/repos/
├── local-dev/              # This repo (setup scripts, E2E infrastructure)
├── soroban-core/           # Smart contracts (channel-auth, privacy-channel)
├── provider-platform/      # Privacy provider server
├── provider-console/       # Provider dashboard
├── council-console/        # Council dashboard
└── network-dashboard/      # Network monitoring dashboard

If your repos live somewhere other than ~/repos/, set BASE_DIR:

BASE_DIR=~/projects ./up.sh

You can also override individual repo paths:

SOROBAN_CORE_PATH=~/other/soroban-core ./up.sh

Local Dev

Start everything

./up.sh

This runs through 9 stages:

  1. Checks prerequisites (Docker) — auto-installs Rust, Stellar CLI, Deno if missing
  2. Starts a local Stellar network if not already running
  3. Generates accounts (admin, provider, treasury) and funds them via Friendbot
  4. Builds and deploys contracts (SAC, channel-auth, privacy-channel)
  5. Starts PostgreSQL (Docker container on port 5442)
  6. Starts provider-platform (generates .env, runs migrations, port 3010)
  7. Builds and starts provider-console (port 3020)
  8. Builds and starts council-console (port 3030)
  9. Builds and starts network-dashboard (port 3040)

All configuration (.env files, config.js files) is generated automatically.

Stop everything

./down.sh

Run E2E tests

cd e2e && deno task e2e

Runs the full E2E test (fund, auth, deposit, receive, send, withdraw) against the local stack. Traces are exported to Jaeger automatically.

# Verify traces were captured
deno task verify-otel

# Open Jaeger UI to inspect traces
open http://localhost:16686

E2E in CI

See e2e/README.md for the Docker compose setup that runs E2E tests in CI without any host dependencies.

cd e2e && docker compose up --abort-on-container-exit

Releases and Versioning

See RELEASES.md for the versioning strategy and release workflows across all modules.

Troubleshooting

  • Friendbot timeout: The local Stellar node can take a few minutes on first start. Re-run ./up.sh, it will pick up where it left off.
  • Provider connection fails: Check provider.log in this directory for errors.
  • Contract deployment fails: Make sure the local Stellar container is running (docker ps).
  • No traces in Jaeger: Check jaeger.log and ensure OTEL_DENO=true is set (automatic with deno task e2e).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors