build prospect intelligence platform MVP

This commit is contained in:
Marco0300
2026-09-02 17:38:50 +02:00
commit 44be4efc82
29 changed files with 973 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# 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:
```html
<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/summary`
- `POST /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
1. Start the API from `apps/api` with `python3 app/main.py`.
2. Serve this directory: `python3 -m http.server 8080 --directory apps/web`.
3. Open `http://127.0.0.1:8080`, with `window.API_BASE` set to `http://127.0.0.1:8000` using a tiny pre-load edit or browser devtools.
4. 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`.
5. Confirm rows with `status: review` show **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.
6. Select a CSV and confirm a local, preview-only table appears without a network request.
7. 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.