localdost
Always-on QA agents that watch every merge, ticket, and prod URL
Get started · Overview · Architecture · Features · Docs · Contributing

Self-hosted. Runs with no accounts in demo mode. Bring your own Claude login or Anthropic key for real verdicts.
Real runs on a demo shop, sped up and trimmed as captioned. Full walkthrough: localdost-walkthrough.mp4. Recording notes: docs/demos.
Overview
localdost gives your team a few QA helpers that never sleep. Each helper is a dot. A dot reads every pull request, every merge, every new ticket, and your health checks, runs your tests, and tells you on your phone when something needs you. Think of a colleague who reads every PR and every new Jira ticket, and texts you only when checkout breaks.
Every outward action, such as a PR comment, a check run, or a ticket comment, passes a rule gate first. You decide per action kind whether the dot acts, acts only when asked, asks first, or hands the job to you. Approvals wait in the Inbox of the phone app.
localdost is one Node process and one SQLite file on your machine or your server. Without credentials, every integration runs in demo mode: outward actions go to an outbox that you can read in the app, and a mock model writes canned verdicts.
Dots and Watches
A dot holds one Watch: a GitHub repo, a Jira or Linear project, the production URLs it is responsible for, and a test command. The Watch also carries the dot's mission, when to notify you, and what it must never do, in your own words. Role presets (product area, QA lead, release guard, ticket reviewer, prod watcher) fill in the mission and the rules for a common job and switch on the stages it needs. One server runs many dots, and each dot has its own memory, rules, and chat.
PR review with what to test
On every PR and every merge, the dot scopes the changed lines, maps them to impact areas, collects signals (untouched tests, removed assertions, changed routes, selector drift), and applies fifteen QA lenses such as money, auth, dates, migrations, performance, and privacy. A reviewer model pass and a verifier model pass then produce risks with code citations and a What to test checklist. The review lands in one sticky PR comment and in a check run with line annotations. Ticking a checklist item in the comment records a manual test result on the run. Details: docs/PR-REVIEW.md.
Live test runs
After a merge, the dot picks the Playwright specs that match the changed paths plus your smoke tests, runs them, and retries failures to separate flaky tests from real breaks. The run page streams each step live, shows browser frames during the run, and keeps screenshots, traces, videos, and the JSON report. Runs execute in your checkout, in a Docker container, or against the bundled sample shop. Details: docs/SANDBOX.md.
AI-Vision cases
A dot can also run natural-language browser cases next to Playwright, on an AI-Vision server (Veesan) or the open-source Midscene CLI. Each What to test item from the PR review that has no existing test becomes one case, and test ideas from a ticket review of a ticket the PR names fill the rest. The cases run on pr_check and post_merge, and their verdicts, screenshots, and report links merge into the same run and checklist as the Playwright results. Details: docs/SANDBOX.md.
Ticket review
A new Jira or Linear ticket gets a score for how ready it is. Tickets that score 30 or more get a review: risks, open questions, gaps in the acceptance criteria, test ideas, and existing tests that the change may break. The dot drafts a ticket comment, and by default the draft waits in your Inbox. It also checks the test cases and automated specs you already have, from any ticket, that the new ticket changes: a case that needs an update gets a draft version, a case the ticket makes obsolete gets a retire draft in your Inbox, and nothing is changed until you decide. Details: docs/TRACKERS.md.
Outage watch
HTTP probes and browser probes check your production URLs on an interval. Three failures in a row open an outage: the dot looks at merges from the last 24 hours, names a suspected cause, and pushes a high-urgency alert. A recovery notice follows when the probe passes again. Atlassian Statuspage URLs of your vendors feed the same flow. A daily digest sums up runs, flaky specs, tickets, and incidents.
Ask-first rules and the Inbox
Each action kind has one of four levels: act, act_when_asked, ask, or hand_off. The defaults let a dot run tests, post PR comments and check runs, and send pushes on its own. Ticket comments, new issues, MCP tools that change data, and report edits ask first. Reverts go to a person. An auto-review pass can move an act to ask when a draft looks risky. In the Inbox you approve, edit, or reject the exact draft. A pending approval expires after 24 hours.
Phone app with chat and calls
The app is a React PWA that you add to your Home Screen. It has Dots, Feed, Inbox, Chat, Reports, and Settings. Chat with a dot about its runs, ask it to rerun tests, or ask whether prod is up. Push-to-talk and read-aloud use browser speech. With OPENAI_API_KEY set, a call uses OpenAI Realtime over WebRTC instead. Details: docs/VOICE.md.
Slack
Mention the bot in a thread and the dot named in the message, or the dot that owns the channel, answers in the thread. Outage and digest notices post to the dot's channel. Slack connects over Socket Mode, so it needs no public URL. Details: docs/SLACK.md.
MCP connections
Connect any MCP server over HTTP or stdio and attach it to a dot. Read-only tools run directly in chat. A tool that changes data is an outward action and goes through the rule gate like a PR comment. Presets add an AI-Vision server (Veesan) or the open-source Midscene MCP server in one step, with only the env var names they declare, so a dot's chat can find cases, start a run after approval, and read the verdicts. Details: docs/CONNECTIONS.md.
Reports
Save any run or digest as a report page. Edit it in the app, or chat with the dot about the page and let it propose edits, which ask first by default.
Architecture
flowchart LR
subgraph Triggers
GHW[GitHub webhook]
GHP[GitHub poller]
TRW[Jira and Linear webhooks]
LNP[Linear poller]
PRB[HTTP and browser probes]
STP[Statuspage poller]
SCH[Digest scheduler]
end
GHW --> NRM[webhooks.ts: verify, normalize, dedupe]
GHP --> NRM
TRW --> NRM
LNP --> NRM
NRM --> Q[(SQLite job queue)]
PRB --> Q
STP --> Q
SCH --> Q
Q --> FL[Flows: pr_check, post_merge, ci_failure, ticket_review, outage, recovery, digest, rerun]
FL --> REV[Review prep: scope, signals, lenses, impact]
REV --> LLM[Model backend: claude-cli, codex-cli, anthropic, mock]
FL --> LLM
FL --> RUN[Test runner: local, docker, demo, AI-Vision]
RUN --> ART[(Artifacts in the data folder)]
FL --> GATE{Rules gate}
GATE -- act --> EXT[GitHub, Jira, Linear, Slack]
GATE -- ask --> INB[Inbox approvals]
GATE -- no credentials --> OUT[(Outbox)]
FL --> PUSH[Web push and ntfy]
FL --> BUS[Live event bus]
BUS --> SSE[GET /api/live]
SSE --> PWA[React PWA]
PWA --> CHAT[POST /api/chat]
CHAT --> LLM
CHAT --> MCP[MCP connections]
PWA --> CALL[POST /api/call/session]
Every trigger becomes a TriggerEvent with a dedupe key, so a webhook delivery and a poll of the same commit or ticket queue one job. The queue lives in SQLite and runs two jobs at a time. Each running job holds a lease. When the server stops mid-run, the run ends as interrupted and you can rerun it. The server code is in src/, the PWA in client/, and the build contract in SPEC.md.
Get started
localdost needs Node 24.
Demo in one command
git clone https://github.com/duonghaijoe/localdost && cd localdost && npm install && npm run demo
Open http://localhost:4319. The demo seeds a dot named "Checkout" that watches demo/shop-web, Jira project SHOP, and a sample shop on http://localhost:4320. In the app, open Settings and press a Simulate button: PR merged, PR opened, ticket created, outage, or CI failure. A simulated merge runs real Playwright tests against the sample shop. One spec passes and one fails on a seeded bug, and the dot reports the failure with a verdict. The same simulations work from a shell:
curl -X POST http://localhost:4319/api/simulate/pr_merged
Start a team server
One person sets a team server up, once. It takes four commands and ends in the setup flow of the app:
git clone https://github.com/duonghaijoe/localdost && cd localdost
npm ci
npm run build
LOCALDOST_TOKEN=$(openssl rand -hex 24) LOCALDOST_PUBLIC_URL=https://localdost.example.com npm start
LOCALDOST_TOKEN is the token every person needs to open the server. Keep it where you can read it again. LOCALDOST_PUBLIC_URL is the https address your team opens, and the address GitHub sends webhooks to. Leave it out and the dot polls GitHub instead, which works but misses CI failures, preview deployments, and /localdost review comments. With no preview of a PR, its tests run against the dot's base URL (a build of shared QA work), and the report says so; the dot setting prTestTarget can skip those tests instead, see PR tests without a preview. With a token set, npm start listens on all interfaces. Put https in front of it, or use a tunnel. docs/DEPLOY.md covers Railway, Docker Compose, and a tunnel to your own machine.
Back up the data folder before the pilot starts: the database, secret.key, and vapid.json. A backup without secret.key cannot decrypt the tokens saved in Setup. Back up and restore has the commands for Docker Compose, Node with a start script, Railway, and Kubernetes, and localdost doctor --restore-check <folder> checks a backup. Upgrade covers a new tag: pick it, read the CHANGELOG, wait until localdost doctor --idle exits 0, back up, switch, and roll back from that backup if needed.
Open the address. A new server shows the Join screen, which also asks Admin? Enter the server token: paste LOCALDOST_TOKEN and the setup flow opens: Welcome (a team server or your laptop, with a check of the token and the public URL), Event delivery, Model, GitHub, Repos with a role and a PR scope each, Tracker (GitHub Issues first), Tests per repo, Slack, Rules with a shadow week, Create dot, and a first review that posts nothing until you say so. A reload keeps you in the flow, and the Getting started link in the sidebar brings you back to it until you finish or close it. Each step is described in docs/SETUP.md.
Connect your services in the app
Start the server, open the app, and open Setup. Each service has a Connect button: sign in to the model with your Claude subscription or an Anthropic API key, connect GitHub with the GitHub CLI login, a GitHub App that Setup creates for you, or a token, and paste keys for Linear, Jira, Slack, and voice. Test checks each one before you save it. Saved keys are encrypted in the data folder and never sent back to the browser. Environment variables still work and win over saved values. The guides open inside the app: docs/SETUP.md.
Set up with a coding agent in one prompt
Open a coding agent (Claude Code, Codex, Cursor) in the repo you want a dot for, and paste:
Set up localdost for this repo. Clone https://github.com/duonghaijoe/localdost to ~/localdost if it is not there, then follow ~/localdost/AGENTS.md. Never ask me to paste a secret into the chat: tell me which command to run or which variable to export.
The agent follows AGENTS.md: it builds localdost, runs localdost init --yes in your repo, fixes what localdost doctor reports, and starts the server. It stops for you at each browser login (gh auth login, claude auth login). Add "and host it on Railway" to the prompt to deploy it too.
The same steps by hand:
cd ~/localdost && npm ci && npm run build && npm link # once
cd ~/code/your-repo
localdost init # detects the repo, tests, GitHub, Claude, tracker; writes .env.localdost with no secrets
localdost doctor # one line per service with a fix command; exits 1 until the required ones work
localdost start # http://localhost:4319
localdost init turns on poll mode, so GitHub and Linear work without a public webhook URL.
Docker or Railway
LOCALDOST_TOKEN=$(openssl rand -hex 24) docker compose up -d --build
The image listens on all interfaces, so it needs LOCALDOST_TOKEN and refuses to start without one. Keep the token in .env next to compose.yml so you can read it again. Railway, Docker Compose with test runs, and a cloudflared tunnel to your own machine are in docs/DEPLOY.md.
Network and token
Without LOCALDOST_TOKEN, the server listens on 127.0.0.1 only, whatever the default HOST would be. In that state /api also answers only requests whose Host header names a loopback address, so a tunnel or a DNS-rebinding page gets 403. A non-loopback HOST such as 0.0.0.0 without a token stops the server at boot. With a token set and HOST unset, the server listens on 0.0.0.0, and every /api call needs Authorization: Bearer <token>. Set the token before you open the server to your LAN, a tunnel, or the internet.
Docs
| Topic |
Doc |
| The setup flow of a team server, connecting services in the app, every setting, model backends, poll mode, troubleshooting |
docs/SETUP.md |
| GitHub App, PAT, or polling |
docs/GITHUB.md |
| Jira and Linear |
docs/TRACKERS.md |
| Slack |
docs/SLACK.md |
| MCP connections |
docs/CONNECTIONS.md |
| Test runners, live view, artifacts, fork safety |
docs/SANDBOX.md |
| Voice |
docs/VOICE.md |
| PR review for users |
docs/PR-REVIEW.md |
| Hosting |
docs/DEPLOY.md |
| HTTP API |
docs/API-V2.md and SPEC.md |
| PR review design |
docs/PR-REVIEW-QA.md |
Data and privacy
localdost sends no telemetry. It keeps its state in the data folder (LOCALDOST_DATA_DIR, default data/, or .localdost/data under localdost start): the SQLite database, the web push keys, run artifacts, review checkouts, and "Not a risk" eval candidates. Data leaves the machine only for the services you configure: