Skip to main content

Run the Repo Locally

Prerequisites

ToolVersionCheck
Node.js≥ 20node -v
pnpm≥ 9.12pnpm -v
Rustlatest stable (only for backend services)rustc --version
tip

If you only work on TypeScript apps or docs, you don't need Rust.

Step 1, clone and install

$ git clone https://github.com/CommandOSSLabs/MemWal.git
$ cd MemWal
$ pnpm install

Step 2, build the SDK first

warning

The apps depend on the SDK's compiled output. If you skip this step, apps fails to start with import errors.

$ pnpm build:sdk

This compiles packages/sdkpackages/sdk/dist/. The apps import from @mysten-incubation/memwal, which resolves to this compiled output through the workspace.

Step 3, run what you need

Run individual surfaces from the repository root:

# Docs site (Mintlify)
$ pnpm dev:docs

# Demo apps (pick one)
$ pnpm dev:app # Playground dashboard
$ pnpm dev:noter # Note-taking app
$ pnpm dev:chatbot # AI chatbot
$ pnpm dev:researcher # Research assistant

# SDK in watch mode (recompiles on changes)
$ pnpm dev:sdk

Step 4, backend services (optional)

The TypeScript apps talk to a managed relayer by default. You only need to run backend services if you're working on the relayer or indexer.

Relayer (services/server)

Requires:

  • PostgreSQL with pgvector extension
  • Sui RPC access
  • Walrus endpoints
  • Embedding provider credentials (OpenAI-compatible)

Quick start:

# Start PostgreSQL with pgvector
$ docker compose -f services/server/docker-compose.yml up -d postgres

# Configure environment
$ cp services/server/.env.example services/server/.env
# Edit .env with your credentials

# Install sidecar dependencies
$ cd services/server/scripts && npm ci && cd ..

# Run the relayer
$ cargo run

For the full relayer setup guide, see Self-Hosting.

Indexer (services/indexer)

$ cd services/indexer
$ cargo run

The indexer polls Sui events and syncs account data into PostgreSQL.

Monorepo structure

MemWal/
├── packages/
│ ├── sdk/ # @mysten-incubation/memwal — TypeScript SDK
│ └── openclaw-memory-memwal/ # @mysten-incubation/oc-memwal — OpenClaw plugin
├── apps/
│ ├── app/ # Playground dashboard
│ ├── chatbot/ # AI chatbot demo
│ ├── noter/ # Note-taking demo
│ └── researcher/ # Research assistant demo
├── services/
│ ├── server/ # Rust relayer (Axum)
│ ├── indexer/ # Rust Sui event indexer
│ └── contract/ # Move smart contract
├── docs/ # Mintlify documentation site
└── SKILL.md # Agent-first integration guide

Troubleshooting

ProblemCauseFix
Cannot find module '@mysten-incubation/memwal'SDK not builtRun pnpm build:sdk first
ERR_MODULE_NOT_FOUND in appsStale SDK buildRun pnpm build:sdk again
pnpm install failsWrong pnpm versionUse pnpm ≥ 9.12: corepack enable && corepack prepare pnpm@9.12.3 --activate
Docs site won't startMissing MintlifyRun pnpm install from the root
Relayer crashes on bootMissing pgvectorInstall the pgvector PostgreSQL extension
Sidecar timeoutMissing sidecar depsRun cd services/server/scripts && npm ci

See also