Getting Started
First-time setup, prerequisites, and running the platform locally.
Getting Started
The ./dev CLI Driver
All local orchestration, testing, database migrations, and telemetry dashboards are driven exclusively by the custom ./dev CLI tool located in the repository root. See the CLI Reference to get started!
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| Docker | Compose v2.20+ | Infrastructure services |
| Go | 1.25+ | wordloop-core |
| Air | latest | Go auto-reload (go install github.com/air-verse/air@latest) |
| uv | latest | wordloop-ml Python env |
| pnpm | latest | wordloop-app dependencies |
| ffmpeg | latest | ML audio processing |
The "Day Zero" Guided Walkthrough
Welcome to Wordloop! Instead of throwing a wall of terminal commands at you, this guide walks you through setting up your environment for an optimal local development experience, including hooking up your IDE debuggers.
Step 1: Environment Checks
Before starting, validate your local toolchain:
# Assumes you have cloned the repo and are at the root
./dev doctorIf doctor flags any missing dependencies (like Docker, Go, or Node) or occupied ports, follow its provided instructions to resolve them.
Step 2: Bootstrapping Config & Secrets
Generate and configure your local environment files:
./dev setup envThis scaffolds .env and .env.local files across the monorepo.
- wordloop-ml: Edit to add ML/AI API keys.
- wordloop-app & core: Add your Clerk frontend & backend keys for authentication.
Step 3: Install Package Dependencies
./dev setup installStep 4: Infrastructure & IDE Debugging
We use a Hybrid Development Model. Infrastructure (Postgres, PubSub, etc.) runs statically in Docker, allowing you to run your target application natively in your IDE.
If you are working on the App Frontend but want to run Core natively so you can step through Go code:
-
Start the dependencies in the background:
./dev start infra ml appThis starts the DB, Pub/Sub, the ML service, and the Next.js frontend.
-
Launch the Core service in your IDE:
- VSCode: Open the debug panel and run the "Launch Core API" configuration.
- GoLand: Run the
cmd/server/main.gofile with Debug context. Now, any frontend requests will hit your breakpoints in the Core API.
If you just want to run everything locally without IDE debugging (e.g., verifying a PR):
./dev start allThe Hybrid Development Model
Infrastructure runs in Docker (stable, rarely changes). Application services run natively for instant feedback:
| What runs | Where | Auto-reload? |
|---|---|---|
| Postgres, PubSub, Storage, OTel | Docker containers | n/a |
| Core API (Go) | Native via Air | ✅ Rebuilds on .go file change |
| ML API (Python) | Native via uv | ✅ Restarts on .py file change |
| App (Next.js) | Native via pnpm | ✅ HMR in browser |
Typical workflows
# Full stack (recommended for daily work)
./dev start all
# Infrastructure only (run services from your IDE)
./dev start infra
# Infrastructure + specific services
./dev start infra core # Debug ML from IDE
./dev start infra core ml # Debug App from IDE
# Force Docker containers (for integration testing)
./dev start core ml --dockerTailing logs
Native service logs are written to .dev/logs/ and can be tailed with the same CLI:
./dev logs core # Tail Core output
./dev logs ml # Tail ML output
./dev logs core ml # Multi-tail Core + ML simultaneously
./dev logs all # Tail everything (Docker)Full stack in Docker
For CI-like environments or full-stack integration testing:
./dev start all --docker # Everything in containers
./dev logs all # Tail all logs
./dev stop all # Stop everythingAuthentication
Authentication is handled automatically through JIT provisioning:
- Sign in via Clerk (Google, email, or test accounts) in the browser
- The Core API verifies the Clerk JWT
- If the user doesn't exist locally yet, they're auto-created from the Clerk API
- No webhook tunnels, no manual tokens, no database seeding
System tests use a separate APP_ENV=test mode with raw UUID tokens. See Testing for details.
Linting
./dev lint # Lints core (go vet), ml (ruff), and app (eslint)
./dev lint core # Go linter only
./dev lint ml # Python Ruff only
./dev lint app # TypeScript ESLint onlyChecking status
./dev status # Show nicely formatted dashboard of running servicesSee CLI Reference for the complete target list.