This project provides a lightweight, privacy-first system health analyzer. Users run a local script on their machine, send read-only diagnostics to the backend, and get component-level health insights, recommendations, and AI-assisted summaries.
Core goals:
- Keep diagnostics simple and transparent
- Avoid invasive system changes
- Support desktop and mobile/PWA usage
- Enable production deployment with runtime API key support
- React + Vite frontend with dashboard, analysis, component detail, results, instructions, scan, and settings pages
- Express backend with diagnostics APIs and evaluation logic
- OCR pipeline integrated with Google Vision API (with optional Roboflow fallback)
- AI chat/summaries/fix suggestions integrated with Groq
- Runtime API-key entry flow in frontend (
/settings) with header-based backend overrides - Vercel-ready deployment setup (
vercel.json, serverless API entrypoint) - Script standardization completed:
diagnostics.sh,diagnostics.ps1,diagnostics.bat
- Frontend instructions and landing flow updated for both Bash and PowerShell scripts
- Frontend tests added and passing for major components/pages
- Frontend: React, Vite
- Backend: Node.js, Express
- Testing: Vitest, Testing Library
- OCR: Google Vision API (+ optional Roboflow fallback)
- AI: Groq API
- Deployment: Vercel (static frontend + serverless API)
From repo root:
npm --prefix backend install && npm --prefix frontend install
Create backend env from sample and set values:
GROQ_API_KEYGOOGLE_VISION_API_KEYROBOFLOW_API_KEYROBOFLOW_PROJECT_NAMEROBOFLOW_PROJECT_VERSIONROBOFLOW_WORKSPACE(optional)
- Backend:
npm --prefix backend start - Frontend:
npm --prefix frontend run dev
Default local URLs:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3000
Important:
- Running a diagnostics script sends HTTP requests to the configured backend URL.
- It does not start a backend process on your machine.
- With default settings, requests go to the deployed Vercel backend at
https://hardware-diagnostics.vercel.app.
Use diagnostics.ps1:
- Download
diagnostics.ps1from the home page. - Open PowerShell in the download folder.
- If needed once:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Run:
.\diagnostics.ps1
The script defaults to https://hardware-diagnostics.vercel.app.
Examples:
- Vercel backend:
$env:API_BASE='https://hardware-diagnostics.vercel.app'; .\diagnostics.ps1 - Local development override:
$env:API_BASE='http://localhost:3000'; .\diagnostics.ps1
Use diagnostics.sh:
- Download
diagnostics.shfrom the home page. - Open terminal in the download folder.
- Make executable:
chmod +x diagnostics.sh - Run:
./diagnostics.sh
The script defaults to https://hardware-diagnostics.vercel.app.
Examples:
- Vercel backend:
API_BASE=https://hardware-diagnostics.vercel.app ./diagnostics.sh - Local development override:
API_BASE=http://localhost:3000 ./diagnostics.sh
This repository is configured for Vercel deployment with:
- Frontend: Vite app from
frontend/ - Backend API: Serverless function entry at
api/[...path].jsusing Express app frombackend/server.js
- Import this repo into Vercel
- Keep root directory as repository root
- Add required environment variables in Vercel project settings:
GROQ_API_KEY
GOOGLE_VISION_API_KEYROBOFLOW_API_KEYROBOFLOW_PROJECT_NAMEROBOFLOW_PROJECT_VERSIONROBOFLOW_WORKSPACE(optional)
- Deploy
- WebSocket live updates are disabled in Vercel serverless mode; frontend falls back to HTTP polling.
- Local development remains unchanged (
backendon:3000,frontendon:5173). - You can add keys directly in production via
/settings(stored in browser local storage and sent as request headers).
-
500 on
/api/ocr- Ensure
GOOGLE_VISION_API_KEYis set (primary OCR). - If using fallback, also set
ROBOFLOW_API_KEY,ROBOFLOW_PROJECT_NAME, andROBOFLOW_PROJECT_VERSION. - Redeploy after updating env vars.
- Ensure
-
503/502 on AI endpoints (
/api/ai-report-summary,/api/ai-chat,/api/fix-suggestions)- Ensure
GROQ_API_KEYis set. - Trigger a new deploy if keys were added later.
- Ensure
-
Frontend loads but API fails
- Keep
vercel.jsonat repository root. - Verify frontend calls
/api/...endpoints.
- Keep
-
Live updates are not real-time on Vercel
- Expected: serverless uses HTTP fallback (no persistent websocket process).
You can use the frontend like a mobile app by adding it to your home screen.
- Open the app URL in Chrome
- Tap the menu (⋮)
- Select Add to Home screen
- Confirm install
- Open the app URL in Safari
- Tap Share
- Select Add to Home Screen
- Tap Add
Flow:
- Capture/upload image
- OCR with Google Vision API
- Text understanding/summarization with Groq
- Show structured output in UI