Skip to content

Quick Start

import { Steps, Aside } from ‘@astrojs/starlight/components’;

This walks through scanning a real local React app end to end.

1. Start your app (or don’t — frontend-qa can do it for you)

Section titled “1. Start your app (or don’t — frontend-qa can do it for you)”

If you already have a Vite or Next.js dev server running, skip to step 2. Otherwise, frontend-qa will detect a Vite or Next.js project in the current directory and launch its dev server for you automatically when you don’t pass --url.

  1. From the root of the project you want to check:

    Terminal window
    npx frontend-qa scan

    With no --url, frontend-qa looks for a running dev server first; if none is found, it detects your package manager and project type and launches one itself.

  2. Or, against an already-running server or a deployed URL:

    Terminal window
    npx frontend-qa scan --url http://localhost:5173
  3. Scan more than one route:

    Terminal window
    npx frontend-qa scan --url http://localhost:5173 --route / --route /about

The CLI prints a summary as it finishes:

[frontend-qa] project: react (vite=true)
[frontend-qa] scanning http://localhost:5173 routes=["/"]
[frontend-qa] report: .local/frontend-qa/runs/01J.../report.json
[frontend-qa] issues: 4 (critical=1 high=2 medium=1 low=0 info=0)
- [critical] browser.console: Uncaught exception on click
- [high] browser.console: console.error on mount
- [high] browser.network: GET /api/data → 500
- [medium] browser.network: img src 404

The full report — every issue plus evidence, a screenshot per route, and config used — is on disk at .local/frontend-qa/runs/<runId>/report.json and .local/frontend-qa/runs/<runId>/screenshots/.

Runtime scanning (console, network, screenshot, timing) always runs. Add flags for the rest:

Terminal window
npx frontend-qa scan --url http://localhost:5173 --a11y --perf --visual
  • --a11y — axe-core accessibility audit
  • --perf — Lighthouse performance audit
  • --visual — pixel-diff against a stored baseline screenshot
Terminal window
npx frontend-qa scan --url http://localhost:5173 --fail-on high

Exits non-zero if any issue at or above high severity was found (default), never to always exit 0.

6. Try static and bundle analysis (no browser needed)

Section titled “6. Try static and bundle analysis (no browser needed)”
Terminal window
npx frontend-qa static --dir src
npx frontend-qa bundle --dir dist