From 8fcdae81ece64955266398777312c51431536748 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Thu, 15 May 2025 21:29:18 -0500 Subject: [PATCH] Initial commit --- .gitignore | 1 + Outline.md | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 7 ++++ 3 files changed, 102 insertions(+) create mode 100644 .gitignore create mode 100644 Outline.md create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d74e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/Outline.md b/Outline.md new file mode 100644 index 0000000..1045f29 --- /dev/null +++ b/Outline.md @@ -0,0 +1,94 @@ +# Project Outline: Playwright Dashboard v1 + +## Core Features (v1) + +### Dashboard UI + +- Submit a new scan job (manual URL entry, or import from sitemap) +- Choose from predefined scan profiles (fixtures) +- Show queued/running/completed jobs +- View summary results per scan (pass/fail counts, screenshot diffs, timestamp) +- Download or inspect full logs, JSON reports, etc. + +### Scan Runner (Worker) + +- Headless Playwright runner service +- Consumes scan jobs from a queue or task table +- Runs tests per scan profile +- Saves structured results and artifacts to DB/storage + +### Database + +- Users (optional for v1; could just be open if internal) +- ScanJobs: id, status, URLs, scanProfile, createdAt, startedAt, finishedAt, etc. +- ScanResults: per URL, with status, screenshot, log, metadata +- Fixtures: reusable definitions that map to Playwright test setups + +### Storage + +Store screenshots, JSON logs, reports (could use DO Spaces or local disk initially) + +### Authentication (Optional) + +Basic auth or DigitalOcean OAuth proxy if needed (internal access) + +## Suggested Tech Stack + +### Frontend + +- Framework: TBD +- Styling: Tailwind CSS +- Charts/Graphs: Chart.js or Recharts (for pass/fail summaries) + +### Backend / API + +- Language: Node.js (needed for Playwright) +- Playwright Integration: Separate worker or job processor using the Playwright API +- Job Queue: PostgreSQL-backed status tracking + +### Playwright Worker + +Node service that: + +- Polls DB for new jobs +- Runs Playwright with specified profile +- Uploads artifacts and writes results to DB + +### Database + +Postgres +Tables: users (optional), scan_jobs, scan_results, fixtures + +### File Storage + +DO Spaces or local volume + +Store screenshots, accessibility reports, raw output JSON + +## Deployment (DigitalOcean App Platform) + +- One service: Dashboard App +- One background service: Worker (Playwright runner) +- Shared Postgres DB and Spaces bucket + +## Flow Overview + +```plaintext +User → Web UI → Submit scan job + ↓ + Writes to DB + ↓ + Worker polls → finds new job + ↓ + Runs Playwright tests → stores results/screenshots + ↓ + UI polls for job status or gets WS update + ↓ + Displays results + logs +``` + +## Dev Considerations + +- Full local dev via docker-compose (Web UI + DB + Worker) +- Test fixtures in a tests/ folder, easy to map/override +- Webhook or CLI trigger support (so we could scan on deploy or PR merge) diff --git a/README.md b/README.md new file mode 100644 index 0000000..92c9987 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Playwright Dashboard + +A web-based dashboard for managing and viewing Playwright test results. + +Features, goals, etc TBD + +[Initial Project Outline](Outline.md)