Browser Automation Runner
Build a service that runs browser automation jobs, such as checking that your website's sign-up flow still works or taking screenshots of pages after a release, in a controlled and safe way. Jobs are written as Playwright scripts and must be approved before they can run; each run gets a fresh, isolated browser with time and resource limits, is allowed to visit only its approved websites, and stores its artifacts (screenshots, video, a trace for debugging and logs) with its result. A queue in Node.js runs jobs a few at a time and retries flaky failures, and a React dashboard built with Vite shows runs, results and artifacts. Only automate sites you own or have permission to test. You'll learn Playwright, sandboxing and limits, job queues, storing artifacts, and building an operations dashboard.
- Estimate
- ~15.5h
- Steps
- 7
- Completed by
- 0
- Proposed by
- codeseed.app
Node.js · Playwright · SQLite · Vite · React
Project roadmap
- 01
Design the runner
~2.5hWrite DESIGN.md: a job has a name, a Playwright script, the allowed domains, a timeout, a retry count and an approval status; a run has a status (queued, running, passed, failed, timed out or cancelled), the attempt number, timing, logs and artifacts. Describe the isolation (a new browser context per run, no access to other runs' data, network requests limited to allowed domains, and scripts run in a separate process), limits, and how artifacts are stored and cleaned up. Done when: DESIGN.md covers jobs, runs, isolation and limits.
- 02
Run one job with Playwright
~2.5hWrite a runner that launches Chromium with Playwright, creates a new context with video and tracing on, blocks every request to a domain not on the job's list (with page.route), runs the job's script with the page, and saves screenshots, the video and the trace to the run's folder. Enforce the timeout and always close the browser. Done when: a sample job against a local test site produces artifacts, and requests to other domains are blocked.
- 03
Isolate job scripts
~2hRun each job in a child process (or a worker thread) with a memory limit and a hard kill after the timeout, so a stuck or misbehaving script can't affect the service. Only approved scripts can run, and scripts are stored with a hash so a changed script needs approval again. Done when: an infinite loop in a job is killed at the timeout, and an unapproved or changed job is refused.
- 04
Queue and retry runs
~2hBuild a queue stored in SQLite that runs at most N jobs at once, retries failures up to the job's retry count (marking a run flaky when it passes on retry), and records every attempt. Add scheduled runs (for example every hour). On restart, mark runs that were running as interrupted and requeue them. Done when: several queued jobs run with the concurrency limit, and flaky jobs are retried.
- 05
Build the API and dashboard
~3hAdd a REST API to create and approve jobs, trigger runs, list runs and fetch artifacts, protected with a token and approval restricted to an admin role. Build a React dashboard with Vite showing jobs and their recent results, a run's details with logs, screenshots, the video player and a link to download the trace (to open in the Playwright trace viewer). Done when: jobs can be managed and runs inspected from the dashboard.
- 06
Manage storage and alerts
~1.5hDelete artifacts older than a retention period, limit total storage, and keep only screenshots for passing runs (videos and traces for failures). Send a webhook alert when a scheduled job starts failing and when it recovers. Done when: old artifacts are cleaned up, and alerts are sent on state changes.
- 07
Test it
~2hWrite tests with a local test site: a passing job, a failing job, a flaky job passing on retry, a timeout, blocked domains, unapproved and changed scripts, recovery after a restart, and artifact cleanup. Done when: all tests pass.
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack