1.9 KiB
1.9 KiB
ProspectOS web MVP
Self-contained static frontend for the Prospect Platform API. There is no bundler or runtime dependency: serve this directory with any static HTTP server.
Configure and run
The API base is configurable before app.js runs:
<script>window.API_BASE = 'http://127.0.0.1:8000';</script>
<script src="app.js"></script>
If not set, the UI uses localStorage.prospect_api_base when present, then renders clearly-labelled demo data. The API contract used by this page is the current MVP contract:
GET /api/v1/businesses(optional filtering is performed client-side)GET /api/v1/dashboard/summaryPOST /api/v1/businesses
The CSV control is intentionally preview-only. The backend's POST /api/v1/imports/preview can be wired to a confirmation flow later; this UI does not claim that import rows have been persisted.
Browser verification
- Start the API from
apps/apiwithpython3 app/main.py. - Serve this directory:
python3 -m http.server 8080 --directory apps/web. - Open
http://127.0.0.1:8080, withwindow.API_BASEset tohttp://127.0.0.1:8000using a tiny pre-load edit or browser devtools. - Confirm the header changes to API connected, metrics populate, search and score/status filters update the table, selecting a row opens evidence/confidence/freshness, and adding a prospect POSTs to
/api/v1/businesses. - Confirm rows with
status: reviewshow Outreach unavailable — Review this prospect before outreach is available, and suppressed rows show Outreach unavailable — Suppressed records cannot be contacted. There is no outreach/send endpoint or button. - Select a CSV and confirm a local, preview-only table appears without a network request.
- Resize below 700px to verify the collapsible nav, stacked panels, and horizontally scrollable explorer table.
A zero-dependency static smoke page (smoke-test.html) checks the key DOM contract in an iframe and reports pass/fail.