How madhavc8/accessibility-analyzer works
Project type and purpose
• This is a full-stack web application called “Accessibility Analyzer.”
• Frontend: A React SPA that uses Firebase Authentication and Firestore, and Chart.js for visualization.
• Backend: A Node.js + Express API that invokes the Pa11y library to perform accessibility audits.
File structure
• Top-level separates “frontend” and “backend” as two independently deployed services.
• CI/deployment configs:
• /.github/workflows/firebase-deploy.yml → GitHub Action for deploying frontend to Firebase Hosting
• frontend/firebase.json, .firebaserc → Firebase Hosting (and possibly Functions) config
• backend/render.yaml & backend/vercel.json → Render or Vercel deployment settings for the Express API
• Frontend src/ contains React components, Chart.js integrations, and firebase.js (init code for Auth and Firestore).
• Backend index.js is the single entry point exposing HTTP endpoints that wrap Pa11y.
Key insights from the README
• Users can authenticate, analyze any website’s accessibility, view detailed charts, and compare multiple runs.
• Analysis engine (Pa11y) runs in the backend.
• Saved reports imply a persistent store (handled client-side via Firestore).
a. Main components
• Client browser (user UI)
• React frontend (hosted on Firebase Hosting)
• Firebase services: Authentication & Firestore (data store for saved reports)
• Express backend API (hosted on Render/Vercel)
• Pa11y engine (invoked by backend)
• Chart.js (in-browser lib for rendering visualizations)
• CI/CD pipelines (GitHub Actions for frontend; Render/Vercel auto-deploy for backend)
b. Relationships and interactions
1. User opens web app → React served from Firebase Hosting
2. React app initializes Firebase Auth → user signs in
3. User submits URL for analysis → React calls Express API endpoint (HTTPS)
4. Express API spawns Pa11y scan → returns JSON of errors/warnings
5. React receives results → renders charts via Chart.js
6. User optionally saves report → React writes to Firestore
7. User later fetches saved reports → React reads from Firestore
c. Architectural patterns
• Clear separation of concerns (frontend SPA vs. backend API microservice)
• Serverless‐style hosting for frontend (Firebase) and containerized/managed hosting for backend (Render/Vercel)
• Event-driven flow: user events → HTTP calls → analysis tasks → real-time visualization
d. Key technologies
• React, React Router (implied), Chart.js
• Firebase: Auth, Firestore, Hosting
• Node.js, Express.js, Pa11y
• CI/CD: GitHub Actions, Render/Vercel deployment
Detail
• How saved report metadata flows into Firestore and back into the dashboard.
• CI steps: code → GitHub → build → deploy to Firebase or Render/Vercel.