Docs: update all documentation and add overview
- README: add Frontend section, deploy script, docs links, status - docs/README.md: new documentation overview (entry points, frontend, deployment) - docs/EXPLORER_API_ACCESS.md: reference deploy-frontend-to-vmid5000.sh for frontend-only deploy - docs/INDEX.md: add Frontend & Explorer section, fix Quick Start, Last Updated - README_DEPLOYMENT: add docs/README, EXPLORER_API_ACCESS, deploy script, deployment guide - frontend/FRONTEND_REVIEW.md: add post-review update (C1–L4 implemented) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
README.md
20
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.
|
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
|
## Documentation
|
||||||
|
|
||||||
- **`START_HERE.md`** - Quick start guide with all commands
|
- **`docs/README.md`** — Documentation overview and index
|
||||||
- **`COMPLETE_DEPLOYMENT.md`** - Detailed deployment steps
|
- **`docs/EXPLORER_API_ACCESS.md`** — API access, 502 fix, CSP, frontend deploy
|
||||||
- **`DEPLOYMENT_COMPLETE_FINAL.md`** - Final status report
|
- **`START_HERE.md`** — Quick start with all commands
|
||||||
- **`docs/DATABASE_CONNECTION_GUIDE.md`** - Database connection details
|
- **`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
|
## 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 implementation complete
|
||||||
✅ All scripts ready
|
✅ All scripts ready
|
||||||
✅ All documentation complete
|
✅ All documentation complete
|
||||||
|
✅ Frontend task list complete (C1–L4: security, a11y, API modules, block card helper, deploy script)
|
||||||
|
|
||||||
**Ready for deployment!**
|
**Ready for deployment!**
|
||||||
|
|||||||
@@ -29,10 +29,14 @@ If scripts don't work, follow `COMPLETE_DEPLOYMENT.md` for step-by-step manual e
|
|||||||
|
|
||||||
## 📚 Documentation
|
## 📚 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
|
- `COMPLETE_DEPLOYMENT.md` - Complete step-by-step guide
|
||||||
- `DEPLOYMENT_FINAL_STATUS.md` - Deployment status report
|
- `DEPLOYMENT_FINAL_STATUS.md` - Deployment status report
|
||||||
- `RUN_ALL.md` - Quick reference
|
- `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
|
## 🎯 Expected Result
|
||||||
|
|
||||||
|
|||||||
@@ -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**:
|
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).
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,24 @@
|
|||||||
# Documentation Index
|
# Documentation Index
|
||||||
|
|
||||||
**Complete Guide to All Bridge System Documentation**
|
**Complete Guide to Explorer Monorepo Documentation**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🚀 Quick Start
|
## 🚀 Quick Start
|
||||||
|
|
||||||
1. **[Complete Setup Guide](./COMPLETE_SETUP_GUIDE.md)** - Start here for complete setup
|
1. **[../README.md](../README.md)** - Project overview, quick start, frontend deploy
|
||||||
2. **[README Bridge](../README_BRIDGE.md)** - Quick reference at project root
|
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
|
||||||
|
|
||||||
|
|||||||
56
docs/README.md
Normal file
56
docs/README.md
Normal file
@@ -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*
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
**Reviewed:** Vanilla JS SPA (`public/index.html`), React/Next.js app (`src/`), services, config.
|
**Reviewed:** Vanilla JS SPA (`public/index.html`), React/Next.js app (`src/`), services, config.
|
||||||
**Date:** 2025-02-09
|
**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
|
## 1. Overview
|
||||||
|
|||||||
Reference in New Issue
Block a user