First Run
The first run should establish three things: the registry location, the sidecar health state, and whether PortBay can safely route hostnames on this machine.

Expected State
| Area | Expected result |
|---|---|
| Registry | Created under ~/Library/Application Support/PortBay/registry.json when the first project is saved. |
| Runtime file | Written under ~/Library/Application Support/PortBay/runtime.json once Process Compose and Caddy have live ports. |
| Sidecars | Process Compose and Caddy should report reachable once started. |
| Hostnames | Project hostnames are routed through Caddy. Exact hostnames resolve via the privileged /etc/hosts helper; wildcard *.test resolution is handled by the bundled dnsmasq sidecar, which ships with PortBay and needs no separate install. |
What To Check
- Launch PortBay (the installed app, or
pnpm tauri devfrom a source checkout). - Open Settings and confirm the UI theme, density, and sidecar status controls render.
- Open the Services view and confirm sidecar rows are visible.
- Open Projects and confirm the empty state renders without errors.
Data Directory
PortBay stores user data in the platform application support directory. On macOS, the active paths are:
| Path | Purpose |
|---|---|
~/Library/Application Support/PortBay/registry.json | Project registry |
~/Library/Application Support/PortBay/runtime.json | Live sidecar port assignments |
~/Library/Application Support/PortBay/certs/<project-id>/ | mkcert-issued project certificates |
~/Library/Application Support/PortBay/logs/<project-id>.log | Project logs |
~/Library/Application Support/PortBay/process-compose.yaml | Generated Process Compose config |
~/Library/Application Support/PortBay/caddy/autosave.json | Caddy-managed autosave |
