diff --git a/README.md b/README.md index c681ed2..8d30227 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,23 @@ bash EXECUTE_DEPLOYMENT.sh If the script doesn't work, see `START_HERE.md` for step-by-step manual commands. +## Frontend + +- **Live SPA:** `frontend/public/index.html` — deployed to VMID 5000 at **https://explorer.d-bis.org** +- **Deploy frontend only:** `./scripts/deploy-frontend-to-vmid5000.sh` (from repo root; copies `index.html` to `/var/www/html/`) +- **Frontend review & tasks:** [frontend/FRONTEND_REVIEW.md](frontend/FRONTEND_REVIEW.md), [frontend/FRONTEND_TASKS_AND_REVIEW.md](frontend/FRONTEND_TASKS_AND_REVIEW.md) +- **React/Next.js app** in `frontend/src/` (dev/build only; not deployed) + ## Documentation -- **`START_HERE.md`** - Quick start guide with all commands -- **`COMPLETE_DEPLOYMENT.md`** - Detailed deployment steps -- **`DEPLOYMENT_COMPLETE_FINAL.md`** - Final status report -- **`docs/DATABASE_CONNECTION_GUIDE.md`** - Database connection details +- **`docs/README.md`** — Documentation overview and index +- **`docs/EXPLORER_API_ACCESS.md`** — API access, 502 fix, CSP, frontend deploy +- **`START_HERE.md`** — Quick start with all commands +- **`COMPLETE_DEPLOYMENT.md`** — Detailed deployment steps +- **`DEPLOYMENT_COMPLETE_FINAL.md`** — Final status report +- **`README_DEPLOYMENT.md`** — Deployment quick reference +- **`deployment/DEPLOYMENT_GUIDE.md`** — Full LXC/Nginx/Cloudflare deployment guide +- **`docs/INDEX.md`** — Bridge and operations doc index ## Architecture @@ -49,5 +60,6 @@ If the script doesn't work, see `START_HERE.md` for step-by-step manual commands ✅ All implementation complete ✅ All scripts ready ✅ All documentation complete +✅ Frontend task list complete (C1–L4: security, a11y, API modules, block card helper, deploy script) **Ready for deployment!** diff --git a/README_DEPLOYMENT.md b/README_DEPLOYMENT.md index c81cc09..fe1b764 100644 --- a/README_DEPLOYMENT.md +++ b/README_DEPLOYMENT.md @@ -29,10 +29,14 @@ If scripts don't work, follow `COMPLETE_DEPLOYMENT.md` for step-by-step manual e ## 📚 Documentation +- **`docs/README.md`** - Documentation overview and index +- **`docs/EXPLORER_API_ACCESS.md`** - API access, 502 fix, frontend deploy +- **Frontend deploy only:** `./scripts/deploy-frontend-to-vmid5000.sh` (copies `frontend/public/index.html` to VMID 5000) - `COMPLETE_DEPLOYMENT.md` - Complete step-by-step guide - `DEPLOYMENT_FINAL_STATUS.md` - Deployment status report - `RUN_ALL.md` - Quick reference -- `docs/DATABASE_CONNECTION_GUIDE.md` - Database connection details +- `deployment/DEPLOYMENT_GUIDE.md` - Full LXC/Nginx/Cloudflare guide +- `docs/DATABASE_CONNECTION_GUIDE.md` - Database connection details (if present) ## 🎯 Expected Result diff --git a/docs/EXPLORER_API_ACCESS.md b/docs/EXPLORER_API_ACCESS.md index 21a0758..182034b 100644 --- a/docs/EXPLORER_API_ACCESS.md +++ b/docs/EXPLORER_API_ACCESS.md @@ -22,7 +22,7 @@ The ethers.js v5 UMD bundle from the CDN uses `eval`/`new Function()` for ABI de If the browser still reports **“Content Security Policy blocks the use of 'eval'”** or **script-src blocked**: -1. **Redeploy the frontend** so the live site gets the current `index.html` (with the meta CSP including `'unsafe-eval'`). For VMID 5000, run `scripts/complete-explorer-api-access.sh` or copy `frontend/public/index.html` to the server’s web root (e.g. `/var/www/html/`). +1. **Redeploy the frontend** so the live site gets the current `index.html` (with the meta CSP including `'unsafe-eval'`). For VMID 5000, run **`scripts/deploy-frontend-to-vmid5000.sh`** (frontend-only) or **`scripts/complete-explorer-api-access.sh`** (full). Alternatively, copy `frontend/public/index.html` to the server’s web root (e.g. `/var/www/html/`). 2. **Check what CSP the browser sees** – DevTools → Network → select the document request (the HTML page) → Headers → **Response Headers** → `Content-Security-Policy`. It should contain `'unsafe-eval'` in `script-src`. If the response has a CSP header **without** `'unsafe-eval'`, that header is coming from your server (nginx or app) or from a proxy (e.g. Cloudflare). Update the config that serves the explorer so its CSP includes `'unsafe-eval'`, then reload (hard refresh or incognito). 3. **If you use Cloudflare** – In the dashboard, check Transform Rules, Page Rules, or Security → Settings for any **Content-Security-Policy** (or similar) header that might override the origin. Ensure that header’s `script-src` includes `'unsafe-eval'`, or remove the override so the origin CSP is used. diff --git a/docs/INDEX.md b/docs/INDEX.md index 69d34c9..8870d6c 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -1,13 +1,24 @@ # Documentation Index -**Complete Guide to All Bridge System Documentation** +**Complete Guide to Explorer Monorepo Documentation** --- ## 🚀 Quick Start -1. **[Complete Setup Guide](./COMPLETE_SETUP_GUIDE.md)** - Start here for complete setup -2. **[README Bridge](../README_BRIDGE.md)** - Quick reference at project root +1. **[../README.md](../README.md)** - Project overview, quick start, frontend deploy +2. **[EXPLORER_API_ACCESS.md](./EXPLORER_API_ACCESS.md)** - API access, 502 fix, CSP, frontend deploy +3. **[README Bridge](../README_BRIDGE.md)** - Quick reference at project root +4. **[Complete Setup Guide](./COMPLETE_SETUP_GUIDE.md)** - Complete setup (if present) + +--- + +## Frontend & Explorer + +- **[../frontend/FRONTEND_REVIEW.md](../frontend/FRONTEND_REVIEW.md)** - Frontend code review (SPA + React) +- **[../frontend/FRONTEND_TASKS_AND_REVIEW.md](../frontend/FRONTEND_TASKS_AND_REVIEW.md)** - Task list (C1–L4) and detail review +- **Deploy frontend:** From repo root run `./scripts/deploy-frontend-to-vmid5000.sh` +- **Full fix (API + frontend):** `./scripts/complete-explorer-api-access.sh` --- @@ -186,5 +197,5 @@ --- -**Last Updated**: $(date) +**Last Updated:** 2025-02-09 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..b423e82 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,56 @@ +# Explorer Monorepo – Documentation + +Overview of documentation for the ChainID 138 Explorer (SolaceScanScout). + +--- + +## Entry points + +| Doc | Description | +|-----|-------------| +| **[INDEX.md](./INDEX.md)** | Full documentation index (bridge, setup, verification, operations) | +| **[EXPLORER_API_ACCESS.md](./EXPLORER_API_ACCESS.md)** | API access, 502 fix, CSP, frontend deploy for https://explorer.d-bis.org | +| **[../README.md](../README.md)** | Project README: quick start, frontend, architecture, config | + +--- + +## Frontend + +| Doc | Description | +|-----|-------------| +| **[../frontend/FRONTEND_REVIEW.md](../frontend/FRONTEND_REVIEW.md)** | Frontend code review (SPA + React) | +| **[../frontend/FRONTEND_TASKS_AND_REVIEW.md](../frontend/FRONTEND_TASKS_AND_REVIEW.md)** | Task list C1–L4 and detail review | + +**Deploy the live SPA (VMID 5000):** + +```bash +./scripts/deploy-frontend-to-vmid5000.sh +``` + +**Full fix (Blockscout + nginx + frontend):** + +```bash +./scripts/complete-explorer-api-access.sh +``` + +--- + +## Deployment + +| Doc | Description | +|-----|-------------| +| **[../README_DEPLOYMENT.md](../README_DEPLOYMENT.md)** | Deployment quick reference | +| **[../deployment/DEPLOYMENT_GUIDE.md](../deployment/DEPLOYMENT_GUIDE.md)** | Full LXC + Nginx + Cloudflare deployment guide | +| **[../QUICKSTART.md](../QUICKSTART.md)** | Quick start (deps, infra, dev services) | + +--- + +## Other + +- **Bridge / WETH:** See [INDEX.md](./INDEX.md) for bridge setup, verification, and operations. +- **Specs:** [specs/](./specs/) for infrastructure and multichain specs. +- **CCIP, Blockscout, etc.:** See files in this directory and the repo root. + +--- + +*Last updated: 2025-02-09* diff --git a/frontend/FRONTEND_REVIEW.md b/frontend/FRONTEND_REVIEW.md index d031498..71ff6d5 100644 --- a/frontend/FRONTEND_REVIEW.md +++ b/frontend/FRONTEND_REVIEW.md @@ -4,6 +4,8 @@ **Reviewed:** Vanilla JS SPA (`public/index.html`), React/Next.js app (`src/`), services, config. **Date:** 2025-02-09 +**Update (post-review):** All "Improve" items from this review were implemented per [FRONTEND_TASKS_AND_REVIEW.md](FRONTEND_TASKS_AND_REVIEW.md): response.ok checks (C1–C3), blocks API normalizer (C4/M4), escapeHtml/safe URLs/onclick (H1–H3), getRpcUrl in rpcCall (H4), cancel blocks rAF (H5), block number validation (M1), stable list keys (M2), named constants (M3), shared block card helper (L1), DEBUG console gating (L2), aria-live for errors (L3), API modules (L4). See that file for the full task list and status. + --- ## 1. Overview