Dev Container
Open the monorepo in a fully configured development environment running inside a container. This is the fastest way to get started on any OS โ the container ships with Node.js 24, Yarn 4, PostgreSQL (with pgvector), Redis, Meilisearch, and Claude Code CLI pre-installed and pre-configured.
Prerequisitesโ
- Docker Desktop โ Windows ยท macOS ยท Linux
- Allocate at least 12 GB RAM in Docker Desktop โ Settings โ Resources (the build step is memory-intensive)
- Visual Studio Code โ download here
- Dev Containers extension for VS Code โ install here
Enable the WSL 2 backend in Docker Desktop (Settings โ General โ "Use the WSL 2 based engine") before opening the container.
Quick startโ
git clone https://github.com/saasframe/saasframe.git
code saasframe
In VS Code, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run:
Dev Containers: Reopen in Container
The first build takes 3โ5 minutes. VS Code will reopen inside the container when it is ready.
Once inside the container, start the app:
yarn dev
Open http://localhost:3000/backend and sign in with the credentials printed by the initialisation step.
What is includedโ
| Tool | Version | Notes |
|---|---|---|
| Node.js | 24 | Pre-installed in the container |
| Yarn | 4 | Pre-installed via Corepack |
| PostgreSQL | 17 + pgvector | Runs as a container service |
| Redis | 7 | Runs as a container service |
| Meilisearch | latest | Runs as a container service |
| Claude Code CLI | latest | Run claude inside the container |
All environment variables and service connection strings are pre-configured. You can start yarn dev immediately after the container finishes building.
Claude Code inside the containerโ
With a Max plan subscription (OAuth):
claude
Follow the OAuth login flow that opens in your browser.
With an API key:
Set ANTHROPIC_API_KEY in your host shell before opening the container:
# macOS / Linux
export ANTHROPIC_API_KEY=sk-ant-...
code saasframe
# Windows PowerShell
$env:ANTHROPIC_API_KEY = "sk-ant-..."
code saasframe
The Dev Container configuration picks up host environment variables automatically.
Custom environment variablesโ
Create apps/saasframe/.env.local inside the container (or on the host before opening). This file takes priority over .env, which is auto-generated:
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
SF_DISABLE_VECTOR_SEARCH_AUTOINDEXING=false
Use SF_DISABLE_VECTOR_SEARCH_AUTOINDEXING=false only if you want automatic vector embedding jobs inside the container. The default example env keeps auto-indexing disabled until you opt in.
Rebuilding the containerโ
If you need a fresh start (e.g. after updating the devcontainer config or pulling major changes):
Open the Command Palette and run:
Dev Containers: Rebuild Container
This rebuilds the image from scratch. Your source files are mounted from the host and are not affected.
Troubleshootingโ
Build fails or runs out of memory:
- Increase Docker Desktop memory allocation to at least 12 GB (Settings โ Resources โ Memory).
- After increasing, run "Rebuild Container".
Port conflicts:
The container forwards ports 3000 (app), 4000 (splash), 5432 (Postgres), 6379 (Redis), and 7700 (Meilisearch). If any of these are occupied on the host, stop the local service or change the forwarded port in .devcontainer/devcontainer.json.
Changes not reflected:
Source files are bind-mounted from the host, so changes appear immediately. If the app is not hot-reloading, restart yarn dev inside the container.