The Accessibility Analyzer is a web application designed to help developers and designers identify and rectify accessibility issues within web content. It leverages the power of axe-core, a leading accessibility testing engine, to provide comprehensive reports on both raw HTML snippets and live web pages.
The primary goal of the Accessibility Analyzer is to promote inclusive web design and development by making accessibility testing straightforward and accessible.
-
HTML Analysis
- Users can paste raw HTML code directly into a text area.
- On submission, the application analyzes the provided HTML for accessibility violations using
axe-core. - Integration: Handled by the API endpoint
src/app/api/analysehtml/route.jsx, which usespuppeteerandaxe-core.
-
URL Analysis
- Users can input a URL of a live website for analysis.
- The app fetches the page and runs accessibility checks using
axe-core. - Integration: Managed by
src/app/api/analyseURL/route.jsx.
-
Accessibility Reporting
- Reports include:
- Summary of passes and violations.
- Breakdown by severity: critical, serious, moderate, minor.
- Detailed violation info: ID, description, help URL, and affected HTML nodes.
- Integration: Handled by components
src/app/component/html.jsxandsrc/app/component/url.jsx.
- Reports include:
-
User Authentication & Report Saving
- Users can register/login to save reports.
- Reports are linked to user accounts and retrievable later.
- Integration:
- Supabase handles authentication (
src/lib/supabase.js). - Saving and fetching reports is managed in
src/lib/database.js. - UI for saved reports in
src/app/reports/page.jsx.
- Supabase handles authentication (
-
Metrics Endpoint
- Provides Prometheus with scrapeable metrics.
- Integration:
src/app/api/metrics/route.jsxexposes secured metrics.
- Frontend: Next.js, React, Tailwind CSS
- Accessibility Engine: axe-core
- Browser Automation: Puppeteer
- Backend/API: Next.js API Routes
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- CI/CD: Jenkins (
jenkinsfile)
-
Root Directory
eslint.config.mjs: ESLint configuration, extending Next.js Web Vitals.jenkinsfile: CI/CD pipeline definition (checkout, lint, build, push, deploy).next.config.mjs: Next.js configuration.nginx/nginx.conf: Reverse proxy config for Next.js and metrics security.
-
src/app/api/analyseURL/route.jsx: Analyze live site via Puppeteer + axe-core.api/analysehtml/route.jsx: Analyze pasted HTML via Puppeteer + axe-core.api/metrics/route.jsx: Prometheus metrics endpoint (token-secured).component/navbar.jsx: Auth + navigation.component/body.jsx: Switch between HTML and URL analysis.component/html.jsx: HTML input, analysis, saving results.component/url.jsx: URL input, analysis, saving results.component/about.jsx: Static about section.login/page.jsx: Login UI.register/page.jsx: Register UI.reports/page.jsx: Saved report viewer.page.js: Main landing page.
-
src/components/ui/- Prebuilt UI widgets (button, dropdown, progress).
-
src/hooks/useAuth.js- Supabase auth state hook.
-
src/lib/supabase.js: Supabase client.database.js: DB helpers (saveViolationFromUrl,saveViolationFromHtml,getUserViolations).postgre.sql: Schema forviolationstable with RLS policies.
-
src/utils/utils.js- General helpers.
The pipeline automates build, test, and deployment:
- Checkout → Clone repo.
- Lint → Run
npm run lint. - Build Docker Image → Includes Supabase env vars.
- Push to DockerHub → Tags
latest+ build ID. - Deploy to EC2 → Pulls repo, restarts services with
docker compose.
🔐 Sensitive credentials (DockerHub, Supabase, SSH keys) are stored in Jenkins credentials.
Nginx acts as a reverse proxy:
- Routes
/+/api/*→ Next.js app (frontend:3000). - Secures
/api/metricswith token + IP allowlist. - Optimized with keepalive, timeouts (600s), caching bypass, and WebSocket support.
Integration: Docker Compose mounts config, Jenkins deploys updates.
- Navbar: App title + auth dropdown.
- Body: Tabbed interface (HTML / URL).
- Textbox: Paste + analyze HTML, show violations, allow saving.
- Urlbox: Enter + analyze live URL, show violations, allow saving.
- About: Project purpose + accessibility importance.
- Supabase.js → Initializes Supabase client.
- useAuth.js → Auth state hook.
- database.js → Save + fetch violations.
- postgre.sql → DB schema for
violationswith RLS enabled.
Prebuilt Shadcn-style UI elements:
button.jsxdropdown-menu.jsxprogress.jsx
- Components designed for reuse.
- Local state with
useState, global auth withuseAuth+ Supabase. - API interaction via
fetch, with error + loading state handling. - Sensitive configs in environment variables (never hardcoded).
/api/metricsendpoint secured with token.
- Supabase keys must be set (
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY). - Puppeteer requires
--no-sandboxin Docker. - External site rate limits can cause failures.
axe-coreversion mismatches can break analysis.- Jenkins credentials must be configured correctly for CI/CD.
This section outlines the organization of the Analyser repository, detailing the purpose of key directories and files.

