Local Development
Prerequisites
- Node.js 22+ and pnpm 12+
- Rust and Cargo (Edition 2021+)
- Docker (for PostgreSQL 17 with
pgvector)
Setup
# 1. Start PostgreSQL 17 + pgvectordocker compose -f deploy/docker-compose.yml up -d --wait postgres
# 2. Prepare environment and local folderscp .env.example .envmkdir -p data/inbox data/derivatives data/library
# 3. Install dependencies and apply SQL migrationspnpm installpnpm db:migrateRun Services in Dev Mode
# Terminal 1: Hono API (http://localhost:3000) and Vite React SPA (http://localhost:5173)pnpm dev
# Terminal 2: Rust geometry and archive workerpnpm dev:workerIf port 3000 is in use on your host, set PORT=3100, APP_ORIGIN=http://localhost:3100, BETTER_AUTH_URL=http://localhost:3100, and VITE_API_ORIGIN=http://localhost:3100 in .env. Vite reads VITE_API_ORIGIN automatically.
Build, Typecheck, and Test
pnpm build # Compiles @enmesh/shared, @enmesh/ui, @enmesh/api, and @enmesh/webpnpm typecheck # Runs TypeScript checks across all packagespnpm test # Runs Vitest unit testspnpm test:worker # Runs Rust unit testsSite and Docs Preview
pnpm --filter @enmesh/site devThis command opens the landing page at http://localhost:4321/ and Starlight docs at http://localhost:4321/docs/.