This project ships a Dockerized development environment with AI coding assistants (Claude Code, GitHub Copilot CLI, OpenCode) pre-installed.
Three Docker Compose services:
devcontainer— the main development environment you attach to. Debian based, with Git, shells (bash/zsh/fish), editors, the Docker CLI (for Docker-from-Docker), and the AI assistant CLIs. Commands likenpm,nodeandnpxare thin wrappers that execute inside thenodecontainer.node— Node.js environment that runs the build and the webpack dev server (npm start), exposed onCOMPOSE_START_PORT(default8080).playwright— Playwright environment for browser automation and testing. Any npm script whose name starts withtest:playwrightis routed here automatically by thenpmwrapper. Its report server is exposed onCOMPOSE_PLAYWRIGHT_REPORT_PORT(default9323). The project must add its own Playwright config andtest:playwright*scripts to use it.
The devcontainer mounts the host Docker socket (/var/run/docker.sock) so
that the npm, node and npx wrappers and the AI assistants can run
commands in the other service containers (Docker-from-Docker). Access to the
Docker socket is equivalent to root on the host: anything running inside
the devcontainer — including the AI assistants — can start privileged
containers and mount host paths. Passwordless sudo inside the container is
limited to docker and chown for the same reason. Only use this environment
with code and tools you trust.
- Docker (Docker Desktop or native Docker Engine) with the Compose plugin.
- An editor that supports dev containers (VS Code, JetBrains) is optional — you can also use the stack directly from the command line.
ncat(packagenmap-ncatornmap) — only on native Docker Engine, and only for the Chrome-host bridge, which uses it to expose Chrome's loopback DevTools port to the container. Not needed on Docker Desktop. See ai-integration.md.
Run the setup script from the project root on the host:
bash ./setup.shIt:
- Creates
.envfrom.env.distand fills in the project name and your host UID/GID (and shell/editor if set). - Creates
docker-compose.ymlfromdocker-compose.yml.dist. - Configures the Chrome-host bridge networking on native Docker Engine (no-op on Docker Desktop).
- Builds the Docker images.
Dev-container-aware IDEs run setup.sh automatically via the
initializeCommand in .devcontainer/devcontainer.json.
Start the stack and attach:
docker compose up -d
docker compose exec devcontainer <your shell> # e.g. bash / fish / zshFrom inside the devcontainer:
npm ci # install dependencies
npm run build # build the library
npm start # start the webpack dev server on COMPOSE_START_PORT (8080)
npm test # ESLint + JestTo have the node container install, build and serve automatically on start,
set COMPOSE_AUTOSTART=true in .env.
All configuration lives in .env (created from .env.dist). Key variables:
COMPOSE_PROJECT_NAME— Compose project name (derived from the directory).COMPOSE_START_PORT— host port for the webpack dev server (default8080).COMPOSE_PLAYWRIGHT_REPORT_PORT— host port for the Playwright report server (default9323).COMPOSE_UID/COMPOSE_GID— host user/group IDs for correct file ownership in mounted volumes.COMPOSE_AUTOSTART— auto install/build/serve in thenodecontainer.PW_WORKERS/PW_CT_PORT— Playwright worker count and Component Testing port.EDITOR/VISUAL/SHELL— preferred editor and shell in the container.BLOCK_SSH_AUTH_SOCK— opt out of SSH agent forwarding into the container.CHROME_DEBUG_PORT/CHROME_BIN— Chrome-host bridge overrides (see ai-integration.md).
See ai-integration.md for the AI assistants and the Chrome-host MCP bridge that lets them drive Chrome on your host to verify the rendered component previews.