# Deploy this bundle to a subdomain of atikova.com

> **SECURITY FIRST.** The Cloudflare API token and R2/S3 keys that were pasted into the chat are
> compromised: revoke/rotate them now in Cloudflare → My Profile → API Tokens and R2 → Manage API
> tokens. Nothing in this bundle contains or uses a credential, and no credential was used to build it.

Suggested hostname: **cop31.atikova.com** (change it if you prefer).

The files in `site/` are a complete static site. `index.html` is the hub; all pages are self-contained
(inline CSS/JS, embedded images) and work offline. There are no external scripts, fonts, trackers or
API calls.

## What is deliberately NOT in the public bundle
- `ministry_contacts.csv` (1,009 published ministry/focal addresses)
- `submissions/` (197 personalised country drafts containing addresses)
- `submissions_manifest.csv`, `contacts.csv`, `speakers_11nov.csv`, `sessions_11nov.csv`,
  `outreach/`, `outreach_pack.csv`, `AI_VIDEO_POINTS.*`, `*.xlsx`, `cop31_zero_waste_11nov.json`
- `xprize_shortlist.csv` is included (16 official channels only); `media_targets.csv` is excluded

Publishing a bulk directory of officials' addresses on a public subdomain invites scraping and spam
and creates KVKK/GDPR exposure. Keep those files in the private workspace and send them only in
one-to-one correspondence. `country_submission.html` in `site/` is a redacted public edition with
the contact payload removed.

## Option A — Cloudflare Pages (recommended)
1. `cd site && npx wrangler pages project create cop31-atikova --production-branch main`
2. `npx wrangler pages deploy . --project-name=cop31-atikova`
   (Wrangler gives you a `cop31-atikova.pages.dev` URL.)
3. In the Pages project → **Custom domains** → add `cop31.atikova.com`; if `atikova.com` DNS is on
   Cloudflare, the CNAME and SSL certificate are created automatically. Otherwise add manually:

   | Type | Name | Target | Proxy |
   | --- | --- | --- | --- |
   | CNAME | cop31 | cop31-atikova.pages.dev | Proxied |

   Sources: https://computingforgeeks.com/deploy-static-site-cloudflare-pages/ and
   https://mecanik.dev/en/posts/cloudflare-pages-static-web-app-hosting/

## Option B — Cloudflare R2 custom domain
1. Create a bucket (e.g. `cop31-site`) and upload the contents of `site/`.
2. Bucket → Settings → Custom Domains → Connect Domain → `cop31.atikova.com`.
3. The zone must be in the **same Cloudflare account** as the bucket. Do not upload the private
   contact files to this bucket: public access applies to the whole bucket, not one folder.
   Sources: https://developers.cloudflare.com/r2/tutorials/cloudflare-access/ and
   https://getaktar.com/learn/make-cloudflare-r2-bucket-public/

## Credentials — how to do it safely
- Create a **new** token with the minimum scope: `Cloudflare Pages: Edit` (or `R2: Edit` for R2),
  on the single account/zone. Do not reuse account-wide tokens.
- Supply it only as an environment variable or a CI secret:

  ```bash
  export CLOUDFLARE_API_TOKEN="<your-new-token>"     # shell only, never in a file
  export CLOUDFLARE_ACCOUNT_ID="<your-account-id>"
  npx wrangler pages deploy . --project-name=cop31-atikova
  ```

  `.github/workflows/deploy.yml` already reads `${{ secrets.CLOUDFLARE_API_TOKEN }}` and
  `${{ secrets.CLOUDFLARE_ACCOUNT_ID }}` — add those as GitHub repository secrets.
- Never put a token in client-side JavaScript, `wrangler.toml`, a public repo or a page. If you later
  add an AI feature, put the model key server-side in a Worker using `wrangler secret put`, never in
  the browser.
- Rotate tokens periodically; delete expired ones.

## Note on the domain
A DNS lookup on 12 Nov 2026 shows `atikova.com` resolving to Cloudflare addresses, so a proxied
subdomain should be straightforward. Zone ownership and DNS access still have to be confirmed by you
in the Cloudflare dashboard; this workspace cannot verify or change them.

## Local preview
`cd site && python3 -m http.server 8000 --bind 0.0.0.0` then open `http://localhost:8000/`.
The sandbox live preview (port 8000) is a local preview, not a public subdomain.

---

## Update — 11 November 2026: two-door structure (municipal vs investor)

The site now has **three entry points**:

| Page | Audience | Language | Contains |
|---|---|---|---|
| `index.html` | everyone | EN/TR | hub + the two doors |
| `municipality.html` | **Antalya Metropolitan Municipality** | Turkish | trucks, bins, trips, budget, complaints, tourists · 90-day pilot · 5 indicators · **no market size, no margin, no "SaaS"** |
| `investors.html` | investors only | English | $1.8bn TAM explained and corrected, margin math, evidence table |

**Rule:** the investor deck (`COP31_Pavilion_Presentation.pptx`) is never handed to a municipality, and
`MUNICIPALITY_*.pdf` is never handed to an investor.

### Deploy status (honest)
- **No credential exists in this workspace**: no Cloudflare API token, no wrangler config, no
  `CLOUDFLARE_API_TOKEN` environment variable, no connected deploy app. **Nothing was deployed.**
- The site is served live from this sandbox at the preview URL the user was given
  (`https://8080-<sandbox-id>.e2b.app`) — that is a running preview, **not** a public deployment.
- To publish: create your own scoped token (Cloudflare Pages: Edit), then run
  `npx wrangler pages deploy . --project-name=cop31-atikova` from this folder.
- `COP31_atikova_subdomain_site.zip` is **not kept in the workspace** (size cap). Regenerate it with
  `python3 /home/user/cop31/news/build_site.py`, which also skips symlinked media and files > 6 MB.

### Symlinks in this folder
`PODCAST_EN_v2.mp3`, `PODCAST_UN_SUGGESTIONS_TR.mp3`, `VIDEO_INTRO_EN_v2.mp4`, `VIDEO_TR_2026.mp4`,
`VIDEO_UN_SUGGESTIONS_TR.mp4`, `ATIKOVA_COP31_PACK_FA.zip` are **symlinks** to `../` so the local
preview resolves them without duplicating ~50 MB. A static host will not follow them — copy the files
in if you want those download links to work publicly.
