WP JSON Discovery is a Vite-powered React application backed by a lightweight Express API that scans WordPress sites for publicly exposed REST data. The tool makes it easy to inspect core content, enumerate plugin namespaces, highlight unsupported integrations, and export results for further analysis.
- Domain scanning – Probe
/wp-json/plus plugin namespaces, capturing route metadata, response timings, and schema hints. - Core content explorer – Tabular views for posts, pages, categories, tags, and media with sortable columns, pagination, and CSV export.
- Plugin intelligence – Supports dozens of high-impact plugins (WooCommerce, Jetpack, Elementor, Rank Math, WPForms, Ninja Forms, WP Recipe Maker, etc.) and reports namespace coverage gaps.
- Unsupported tracking – Persists unknown namespaces to a shared list so teams can prioritize handler development.
- Research workflows – Context7 queries are bundled into the docs so unsupported namespaces can be researched without leaving the terminal.
- Robust logging – JSONL activity log records proxy performance, scan duration, persistence actions, homepage asset findings, and error diagnostics.
- Atomic design system – UI is composed using Brad Frost’s atoms → molecules → organisms → templates → pages to encourage reuse and scalability.
- Homepage source scan – Single GET to
/(1 MB cap) to extract generators, builder hints, asset paths, and framework signals without crawling sub-resources. Full asset paths are logged for follow-up. - Admin views – Built-in Admin tab to inspect Turso-backed persistence (unsupported plugins, recent logs, homepage asset paths) and supported plugin/theme registries.
- Modular admin architecture – Admin orchestration uses focused hooks + renderer modules for easier extension and safer refactors.
root/
├── server/ # Express proxy + persistence
│ ├── src/index.js # REST proxy, unsupported plugin API, logging
│ ├── src/logger.js # JSONL logger utility
│ ├── src/db/ # libSQL/Turso client, migrations, maintenance scripts
│ └── data/ # Persisted unsupported plugin seeds + logs
└── frontend/ # Vite + React client
├── src/
│ ├── api/ # Client wrappers for proxy + persistence endpoints
│ ├── components/ # Atomic design layers (atoms, molecules, organisms, templates, pages)
│ ├── config/ # Core collections + plugin namespace registry
│ ├── services/ # Scan orchestration, logging, formatting helpers
│ └── utils/ # CSV export, formatting helpers
└── public/ # Static assets
- User submits a domain from the frontend.
- Client calls the Express proxy (
/api/proxy) which fetcheshttps://domain/wp-json/...with timeouts and logging. - Scan service enumerates namespaces, triggers core collection fetches, and collects plugin route metadata.
- Newly detected namespaces without handlers are POSTed to
/api/unsupported-pluginsand persisted to Turso (seeded from the legacy JSON). - Results render into tables, summaries, plugin panels, and admin views; CSV exports leverage
papaparse. Homepage scans also capture asset paths plus matches and surface them in Admin for mapping.
- Admin responsibilities are documented in
frontend/src/components/pages/admin/README.md. - Use this guide before changing
frontend/src/components/pages/AdminPage.jsxor adding new admin sections.
The project now ships with the full WooCommerce, Rank Math, Divi, Health Check, LiteSpeed, MEC, and Yabe namespaces mapped under frontend/src/config/plugins.js, so server/data/unsupported-plugins.json should remain empty after a successful crawl. Use the following loop when new namespaces surface:
- Run a scan via the UI or
POST /api/scanto reproduce the unsupported namespace. - Inspect persisted state:
- Turso:
unsupported_pluginsandactivity_logsare persisted in the configuredTURSO_DATABASE_URL(legacy JSON seeds on first run). server/data/activity.log– JSONL log withnamespaceDetected,unsupportedPersisted, homepage asset findings, and error entries.
- Turso:
- Research the plugin using Context7:
pnpm context7 -- "/wordpress/plugins/<namespace>"(replace with the namespace slug) to retrieve docs, repo links, and usage details.- Summarize findings in the PR description so future contributors understand the plugin surface area.
- Add support by extending
frontend/src/config/plugins.jsand any related UI/service logic. - Verify regression by re-running the scan; confirm the array stays empty and no new log entries are emitted.
Document edge cases (auth-only routes, HTML responses, rate limits) in PR notes so the unsupported list stays actionable for the team.
Users can optionally log in with Auth0 to access user-owned features:
- Anonymous – Scan any domain, browse results. Rate-limited to 10 requests/min per IP.
- Standard user – Log in via Auth0 to save scans ("My Scans"), add notes, and view personal history. Rate limit: 60 requests/min.
- Admin – Manage plugin/theme registries, view system logs, run maintenance. Rate limit: 120 requests/min. Access via Auth0 admin role or legacy
x-wpjd-admin-keyheader.
Set AUTH0_DOMAIN, AUTH0_AUDIENCE, and VITE_AUTH0_DOMAIN/VITE_AUTH0_CLIENT_ID/VITE_AUTH0_AUDIENCE in the respective .env files.
The app is deployed as two independent services:
- Frontend (Netlify) – Static SPA hosted from
frontend/. Configure viafrontend/netlify.toml. SetVITE_AUTH0_*andVITE_API_BASE_URLas Netlify environment variables. - Backend (Render.com) – Express API. Configure via
AUTH0_*,TURSO_*, andADMIN_API_KEYenvironment variables.
Uses Turso for database (server-side) and Auth0 for authentication.
The project integrates with several CLIs for setup and operations:
- Turso CLI –
turso db create,turso db shell,turso db showfor database management. - Auth0 CLI –
auth0 apps list,auth0 apis listfor managing Auth0 applications and APIs. - Netlify CLI –
netlify deploy,netlify openfor frontend deployment. - Render CLI –
render deploys list,render logsfor backend deployment and monitoring.
- Scanning pipeline: Stable for anonymous sites; error handling added for 401/403 (auth required) and non-JSON responses.
- Core datasets: Posts, pages, categories, tags, media (latest subsets for performance).
- Plugin coverage: 25+ plugins supported (WooCommerce, Jetpack, Contact Form 7, Ninja Forms, WP Recipe Maker, Wordfence, CleanTalk, WP Engine MU suite, Elementor, WPForms, Rank Math, SEOPress, LearnDash, MemberPress, etc.).
- Unsupported namespaces: Actively tracked; recent scans surfaced Rank Math sub-routes, LiteSpeed cache, Divi, Modern Events Calendar, and WooCommerce telemetry routes for future support.
- Logging: Structured
activity.logcapturing scan lifecycle, proxy timings, persistence, homepage assets, and errors. Auto-repair for malformed JSON store implemented. - UI: Atomic design refactor completed; major components reorganized by layer for maintainability.
# Install dependencies for all workspaces
pnpm install
# Start development servers (proxy + Vite) in parallel
pnpm dev
# Target a single service
pnpm dev:server
pnpm dev:frontend
# Production smoke checks
pnpm --filter frontend run preview- Copy
server/.env.exampletoserver/.envto override the Express server port (PORT), admin toggle, Turso URL/auth token, Auth0 domain/audience, or optional Turso API token for Admin metrics. - Copy
frontend/.env.exampletofrontend/.envto point the UI at a non-default proxy (VITE_API_BASE_URL), or set Auth0 credentials (VITE_AUTH0_DOMAIN,VITE_AUTH0_CLIENT_ID,VITE_AUTH0_AUDIENCE) for authenticated features. - Without overrides the proxy listens on
4100and the frontend targetshttp://localhost:4100.
server/data/activity.log– JSONL event log (rotate when >1 MB).- Turso (libSQL) stores unsupported plugins, domains, activity logs, scan history, and registries (seeded from legacy JSON). Use
pnpm --filter wp-json-discovery-server db:assetsto summarize homepage asset paths and unknown matches. server/data/unsupported-plugins.json– Legacy file store (auto-seeded into Turso on first access).frontend/src/config/plugins.js– Source of truth for supported namespaces.frontend/src/config/themes.js– Source of truth for supported themes and detection signals.homepage-scanlog entries include status, size, cap, truncate flag, and counts for meta/comments/scripts/assets/frameworks plus full asset lists for debugging.
Whenever you add new namespaces, run pnpm --filter frontend run lint and pnpm --filter frontend run build before committing.
Current validation:
pnpm --filter frontend run lint– ESLint React rules (passes as of 2025-10-21).pnpm --filter frontend run build– production bundle verification.- Manual scans against anonymous, auth-gated, and plugin-heavy WordPress domains, with log review.
Planned coverage:
- API contract tests using MSW/nock fixtures to assert namespace enumeration and unsupported persistence.
- Service orchestration tests around
frontend/src/services/scan.js(multiple namespace matches, empty unsupported list). - Component interaction tests with
@testing-library/reactfor the results table and plugin panels. - End-to-end regression tests (Playwright) to validate domain submission, tab navigation, and CSV export.
- Performance checks capturing proxy latency and render times for large payloads. Add coverage for the homepage asset aggregation and Admin asset view.
When adding tests, co-locate them under frontend/src/__tests__/ or alongside the feature directory (e.g., components/organisms/ResultsTable/ResultsTable.test.js).
- Verify services –
curl http://localhost:4100/api/healthconfirms the Express proxy, while Vite serves the UI on5173. - Reset persisted data – Remove
activity.logentries cautiously; never delete the file without confirming no scans are running. - Common issues
ECONNRESET/ETIMEDOUT: Increase proxy timeout inserver/src/index.js.- HTML responses from
/wp-json/: The scan service downgrades the namespace and logs a warning; checkactivity.logfor the rendered HTML snippet ID. - Non-empty unsupported list after a run: Re-check the plugin registry and run a Context7 lookup to confirm the namespace belongs to a known plugin.
- Context7 tips
pnpm context7 -- "/wordpress/plugins/<namespace>"– Docs lookup.pnpm context7 -- "site:<vendor>.com <namespace> REST API"– Narrow results to vendor docs.- Cache results in PR descriptions for future contributors.
- Plugin deep dives – Build specialized handlers for Rank Math, LiteSpeed Cache, Divi, Modern Events Calendar, WP Engine Telemetry, WooCommerce Analytics to replace unsupported namespace alerts.
- Credentialed scanning – Support application passwords / OAuth for sites that restrict anonymous REST access.
- Batch scanning + scheduling – Allow multiple domains to be queued and scanned concurrently with aggregated reporting.
- Insights & scoring – Highlight security or content exposure risks (e.g., user endpoints enabled, debug routes).
- UI enhancements – Add filters, saved scans, and richer plugin dashboards (route grouping, schema diffs).
- Data export – Extend beyond CSV (JSON, PDF summaries) and optional S3 upload.
- DevOps – Dockerize services, add CI workflows for lint/test/build, and configure log rotation.
- Create a feature branch.
- Run
pnpm lint(future addition) andpnpm --filter frontend run buildbefore committing. - Submit a PR with context, screenshots, and testing notes.
MIT © 2025 Justin Thompson