# EAP Tax Strategy — Website

This folder is the source of the project's website. It is deployed via
**Cloudflare Pages** from this private GitHub repository, and also works
as a self-contained static folder if you preview it locally.

## Why Cloudflare Pages

GitHub Pages requires the source repository to be public on the free
plan. We want to keep the repository private (it contains internal WB
data and unpolished work). Cloudflare Pages can deploy a static site
from a **private** GitHub repo for free, and supports password
protection via Cloudflare Access (also free for small teams).

## Public deployment vs full package

| Path | Audience | Contents |
|---|---|---|
| Cloudflare Pages site (URL TBD) | External viewers | Everything in `docs/` except the two internal WB datasets — see "What's not on the public site" below |
| `EAP_Tax_Strategy_Package/` (zip) | Internal colleagues | Full package including the internal datasets — for sharing on internal drives |

## What's not on the public site

The following files are kept in `EAP_Tax_Strategy_Package/3-Data/`
**only**, and are deliberately excluded from `docs/3-Data/` (and from
git via `.gitignore`):

- `DPAD_database_up_to_FY24.xlsx` — WB OPCS DPAD database (internal)
- `wb_current_engagements_2026.csv` — WB engagement pipeline (internal)

The figures and analytical outputs that depend on these files are
already pre-computed and live on the public site as PNGs. Only the raw
inputs are withheld.

## How to deploy via Cloudflare Pages

One-time setup, done by the repo owner:

1. Sign up at <https://dash.cloudflare.com/> (free).
2. In the dashboard, go to **Workers & Pages → Create application →
   Pages → Connect to Git**.
3. Authorize Cloudflare to read your GitHub account, then pick the
   `eap_tax_strategy` repo.
4. In **Build settings**:
   - **Production branch**: `main` (or whichever branch you deploy
     from)
   - **Build command**: leave empty (no build needed — pure static)
   - **Build output directory**: `docs`
5. Click **Save and Deploy**. The first build takes ~30 seconds.
6. Cloudflare gives you a URL like `eap-tax-strategy.pages.dev`.

Every subsequent push to the production branch redeploys automatically
(within ~30 seconds).

## How to add password protection (optional)

In the Cloudflare dashboard:

1. **Zero Trust → Access → Applications → Add an application →
   Self-hosted**.
2. **Application name**: e.g. "EAP Tax Strategy".
3. **Application domain**: paste the `*.pages.dev` URL Cloudflare gave
   you.
4. **Add policy**: pick the auth method. The simplest is **One-time
   PIN** — viewers enter their email, Cloudflare emails them a code,
   they paste it in. No account creation needed.
5. **Include**: list of authorised emails or domains (e.g.
   `*@worldbank.org`, plus specific external addresses).
6. Save. The policy takes effect within a minute.

Free tier covers up to 50 users. Cloudflare Access is the
recommended path for sensitive but non-classified WB work.

## Local preview

```bash
cd docs
python3 -m http.server 8000
```

Then open <http://localhost:8000>.

## Folder structure

```
docs/
├── index.html                     ← landing page (interactive map)
├── section-1-advisory-history.html
├── section-2-revenue-trajectories.html
├── section-3-inequality.html
├── section-4-structural-indicators.html
├── downloads.html
├── replication.html
├── assets/
│   └── style.css
│
├── 1-Presentation/
├── 2-Sections/
├── 3-Data/                        ← public-safe data only
│   ├── eap_tax_master_dataset.csv
│   ├── eap_tax_2015_2025.csv
│   └── data_inventory.md
├── 4-Replication_Guide.md
└── 5-Notes/
```
