Not the happy path.
SadPath is an open-source automated chaos testing tool for websites. Enter a public URL, and a real Playwright browser probes your site for broken links, layout failures, JS errors, accessibility issues, and more — then Google Gemini AI generates a developer-focused report.
Live demo: shubhransh-gupta.github.io/SadPath
Repository: github.com/shubhransh-gupta/SadPath
→ SETUP.md — full install, local run, deployment, and troubleshooting guide.
Quick local start:
git clone https://github.com/shubhransh-gupta/SadPath.git
cd SadPath
npm install
npx playwright install chromium
cp .env.example .env # add GEMINI_API_KEY (optional)
npm run devOpen http://localhost:5173 and click RUN SAD PATH.
Setup guide (web): /setup · SETUP.md
URL → Playwright (real Chromium) → Structured scan data → Gemini AI → Sad path report
- You enter a URL on the frontend
- The backend launches headless Chromium via Playwright and visits your site
- Real test vectors run: viewport overflow, broken links, JS errors, axe-core accessibility, slow resources, broken images, long text injection, and more
- Scan data is sent to Google Gemini (free tier), which generates a personality-driven summary and fix recommendations
- Results stream live to the UI via Server-Sent Events (SSE)
Demo mode works instantly with simulated results. Live mode requires running the backend locally.
| Test | What Playwright Does | Severity |
|---|---|---|
| Broken Links | HEAD-requests up to 8 same-origin links, reports 4xx/5xx | Warning / Critical |
| Viewport Overflow | Tests 320×480, 375×667, 768×1024, 1440×900, 2560×1080 for horizontal scroll | Warning / Critical |
| JavaScript Errors | Captures console errors and uncaught page exceptions | Critical |
| Broken Images | Detects images with 0×0 natural dimensions | Warning |
| Slow Resources | Flags resources taking >3s via Performance API | Warning |
| Accessibility | Runs axe-core (WCAG 2A/2AA) via @axe-core/playwright |
Critical / Warning / Notice |
| Long Text Injection | Injects 200-char strings into inputs, checks layout breakage | Warning |
| Missing Alt Text | Finds <img> tags without alt attributes |
Notice |
| HTTP Status | Reports if the main page returns 4xx/5xx | Warning / Critical |
SadPath/
├── src/ # React frontend
├── server/ # Express + Playwright backend
├── SETUP.md # Install & deploy guide
├── render.yaml # Render.com backend deploy
└── .github/workflows/deploy.yml # GitHub Pages auto-deploy
Server-Sent Events stream with live progress and final results.
Non-streaming scan — returns full JSON when complete.
curl http://localhost:3001/api/scan/health| Part | Platform | Cost |
|---|---|---|
| Frontend | GitHub Pages | Free |
| Backend | Render / Fly.io / Oracle VM | Free tier |
See SETUP.md for step-by-step deployment instructions.
- Blocks
localhost, private IPs, and internal hostnames (SSRF protection) - Only
http://andhttps://protocols allowed - 45-second scan timeout, max 8 internal links per scan
⚠️ Only test websites you own or have explicit permission to test.
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, Framer Motion |
| Backend | Express, Playwright, @axe-core/playwright |
| AI Reports | Google Gemini 2.0 Flash (free tier) |
| Streaming | Server-Sent Events (SSE) |
See CONTRIBUTING.md.
MIT — see LICENSE.
Built for developers who don't trust happy paths.
Setup help? See SETUP.md · Questions? Open an issue