|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +--- |
| 4 | + |
| 5 | +# Local Dev Quick Start |
| 6 | + |
| 7 | +Run **Postgres** and **Neo4j** in Docker, then start the core services and dev-sandbox with one script. |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +- **Docker** (for Postgres and Neo4j) |
| 12 | +- **Node.js 18+** and **pnpm** |
| 13 | +- **.env** in the repo root (copy from `.env.example` if present, or set the variables below) |
| 14 | + |
| 15 | +## Environment |
| 16 | + |
| 17 | +Create or edit `.env` in the repo root. Minimum for this stack: |
| 18 | + |
| 19 | +```bash |
| 20 | +# Postgres (used by registry) |
| 21 | +POSTGRES_USER=postgres |
| 22 | +POSTGRES_PASSWORD=postgres |
| 23 | +REGISTRY_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/registry |
| 24 | + |
| 25 | +# Neo4j (used by evault-core) |
| 26 | +NEO4J_USER=neo4j |
| 27 | +NEO4J_PASSWORD=your-password |
| 28 | + |
| 29 | +# So the sandbox and evault-core can talk to registry/provisioner |
| 30 | +PUBLIC_REGISTRY_URL=http://localhost:4321 |
| 31 | +PUBLIC_PROVISIONER_URL=http://localhost:3001 |
| 32 | +REGISTRY_SHARED_SECRET=dev-secret-change-me |
| 33 | +PUBLIC_EVAULT_SERVER_URI=http://localhost:4000 |
| 34 | +``` |
| 35 | + |
| 36 | +## One-command start |
| 37 | + |
| 38 | +From the repo root: |
| 39 | + |
| 40 | +```bash |
| 41 | +pnpm install |
| 42 | +pnpm dev:core |
| 43 | +``` |
| 44 | + |
| 45 | +Or run the script directly: |
| 46 | + |
| 47 | +```bash |
| 48 | +chmod +x scripts/start-dev.sh |
| 49 | +./scripts/start-dev.sh |
| 50 | +``` |
| 51 | + |
| 52 | +This will: |
| 53 | + |
| 54 | +1. Start **Postgres** (port 5432) and **Neo4j** (7474, 7687) via `docker-compose.databases.yml` |
| 55 | +2. Wait for Postgres to be ready |
| 56 | +3. Start **registry** (4321), **evault-core** (3001 provisioning, 4000 GraphQL), and **dev-sandbox** (8080) in parallel |
| 57 | + |
| 58 | +Stop with `Ctrl+C`. To stop only the databases: |
| 59 | + |
| 60 | +```bash |
| 61 | +pnpm docker:core:down |
| 62 | +``` |
| 63 | + |
| 64 | +## Ports |
| 65 | + |
| 66 | +| Service | Port(s) | Notes | |
| 67 | +|-----------------|------------|--------------------------| |
| 68 | +| Postgres | 5432 | | |
| 69 | +| Neo4j HTTP | 7474 | | |
| 70 | +| Neo4j Bolt | 7687 | | |
| 71 | +| Registry | 4321 | | |
| 72 | +| evault-core | 3001, 4000 | Provisioning + GraphQL | |
| 73 | +| **Dev sandbox** | **8080** | W3DS dev sandbox UI | |
| 74 | + |
| 75 | +Open **http://localhost:8080** for the dev sandbox (provision, W3DS flows, sign). |
| 76 | + |
| 77 | +## Optional: databases only |
| 78 | + |
| 79 | +To run only Postgres and Neo4j (e.g. you run the app services yourself): |
| 80 | + |
| 81 | +```bash |
| 82 | +pnpm docker:core |
| 83 | +``` |
| 84 | + |
| 85 | +Or: |
| 86 | + |
| 87 | +```bash |
| 88 | +docker compose -f docker-compose.databases.yml up -d |
| 89 | +``` |
| 90 | + |
| 91 | +Stop with: |
| 92 | + |
| 93 | +```bash |
| 94 | +pnpm docker:core:down |
| 95 | +``` |
| 96 | + |
| 97 | +## Troubleshooting |
| 98 | + |
| 99 | +**Neo4j "encryption setting" or connection refused:** The stack uses **Neo4j 4.4** (unencrypted Bolt by default). If you previously used Neo4j 5.x, remove the old data and recreate: |
| 100 | + |
| 101 | +```bash |
| 102 | +docker compose -f docker-compose.databases.yml down |
| 103 | +docker volume rm metastate_neo4j_data 2>/dev/null || true |
| 104 | +docker compose -f docker-compose.databases.yml up -d |
| 105 | +pnpm dev:core |
| 106 | +``` |
| 107 | + |
| 108 | +Otherwise ensure `.env` has: |
| 109 | + |
| 110 | +```bash |
| 111 | +NEO4J_URI=bolt://127.0.0.1:7687 |
| 112 | +NEO4J_USER=neo4j |
| 113 | +NEO4J_PASSWORD=your-password |
| 114 | +``` |
| 115 | + |
| 116 | +For full Docker setups and all platform services, see the main `README` in the repo root. |
| 117 | + |
0 commit comments