A responsive web app that scans publicly accessible websites for accessibility violations and usability issues. It combines specialized JavaScript libraries with the Gemini API to explain findings in plain English, generate contextual test scenarios, and export a downloadable PDF report.
- Accessibility scanning via
@axe-core/playwright - Usability checks via Cheerio (missing alt text, unlabelled inputs, buttons with no text)
- Performance metrics via Playwright (DOMContentLoaded and full load time)
- Broken link detection on the submitted page via
broken-link-checker - AI enrichment via Gemini (plain-English explanations and generated test scenarios)
- PDF report export
- Node.js 20+
- A Google Gemini API key
- Install dependencies:
npm install- Install Playwright Chromium (required for accessibility scans):
npm run install:browsers- Configure environment variables:
cp .env.example .env.localAdd your Gemini API key to .env.local:
GEMINI_API_KEY=your_gemini_api_key_here
- Start the development server:
npm run devOpen http://localhost:3000 in your browser.
- Enter a public
httporhttpsURL. - Click Scan.
- Review accessibility, usability, and broken-link findings.
- Read Gemini-generated explanations and test scenarios.
- Click Download PDF Report to export results.
This app uses Playwright and can take 30–120 seconds per scan. Deploy as a Docker container on a VM or web service (not a static site or serverless function).
Dockerfile— multi-stage build with Chromium for accessibility scans.dockerignore— keeps the image leanrender.yaml— optional Render Blueprint
docker build -t ui-test-generator .
docker run --rm -p 3000:3000 -e GEMINI_API_KEY=your_key ui-test-generatorOpen http://localhost:3000 and run a scan against https://example.com.
- Push this repo to GitHub or GitLab.
- In Render, choose New → Web Service and connect the repo.
- Set Environment to Docker (Render auto-detects the
Dockerfile). - Add environment variable
GEMINI_API_KEYwith your production key. - Use at least the Starter plan (512 MB); Standard (1 GB+) is recommended for Chromium.
- Set Health Check Path to
/. - Deploy.
Alternatively, use the Blueprint: New → Blueprint and point Render at this repo (uses render.yaml).
Use an Always Free Ampere A1/A2 VM (recommended: 1+ OCPU, 2 GB+ RAM) running Ubuntu 22.04 or 24.04.
- In Oracle Cloud, go to Compute → Instances → Create instance.
- Choose Ubuntu and an Ampere A1/A2 Flex shape (or another VM with at least 1 GB RAM).
- Assign a public IPv4 address and upload your SSH public key.
- Create the instance.
On the instance's subnet Security List, add ingress rules:
| Source CIDR | Protocol | Port | Purpose |
|---|---|---|---|
| Your IP/32 | TCP | 22 | SSH |
| 0.0.0.0/0 | TCP | 80 | HTTP (optional, for HTTPS proxy) |
| 0.0.0.0/0 | TCP | 443 | HTTPS (optional) |
| 0.0.0.0/0 | TCP | 3000 | App (or restrict to your IP while testing) |
ssh -i /path/to/your-private-key ubuntu@<PUBLIC_IP>
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp dockergit clone https://github.com/<your-user>/ui-test-generator.git
cd ui-test-generator
docker build -t ui-test-generator .The first build may take several minutes (Playwright and Chromium are installed in the image).
docker run -d \
--name ui-test-generator \
--restart unless-stopped \
-p 3000:3000 \
-e GEMINI_API_KEY="your_gemini_key_here" \
-e NODE_ENV=production \
ui-test-generatorVerify:
docker ps
curl -s -o /dev/null -w "HTTP %{http_code}\n" http://localhost:3000Open http://<PUBLIC_IP>:3000 in your browser.
cd ~/ui-test-generator
git pull
docker build -t ui-test-generator .
docker rm -f ui-test-generator
docker run -d \
--name ui-test-generator \
--restart unless-stopped \
-p 3000:3000 \
-e GEMINI_API_KEY="your_gemini_key_here" \
-e NODE_ENV=production \
ui-test-generatordocker logs -f ui-test-generator # view logs
docker restart ui-test-generator # restart the appPoint a domain A record at your VM's public IP, install Caddy, and add a Caddyfile:
your-domain.com {
reverse_proxy 127.0.0.1:3000
}Then bind the container to localhost only (-p 127.0.0.1:3000:3000) and close public port 3000 in the security list.
- Serverless platforms like Vercel may hit cold-start and timeout limits because Playwright requires a full Chromium browser at runtime.
- Render free-tier services spin down after idle; the first request after sleep may be slow.
- On OCI, production Docker builds (
next start) are typically faster than localpnpm devbecause the VM runs an optimized build with dedicated resources. - If scans fail around 60 seconds behind a reverse proxy, increase the proxy idle timeout to at least 120 seconds.
- Next.js 16
- Playwright + axe-core
- Cheerio
- broken-link-checker
- Google Gemini API
- jsPDF