# ALKEMIE Owner Operations — Runbook
**Record:** ALK-OPS-0001 · v1.0 · 2026-12-03 · Internal

Related: [System Architecture](SYSTEM_ARCHITECTURE.md) · [Architectural Decisions](ARCHITECTURE_DECISIONS.md)

## 0. Quick reference
| Destination | Direct link | Function |
|---|---|---|
| Public site | https://www.alkemietechnologies.com/ | Open to visitors |
| Owner console | https://alkemie-owner-console.iot3consulting.workers.dev/ | Google-protected |
| Owner GitHub | https://github.com/iot3consulting/alkemie-owner-console | Admin source + documentation |
| Corporate GitHub | https://github.com/iot3consulting/alkemie-corporate-platform | Public source |
| Cloudflare | https://dash.cloudflare.com/ | Workers & Pages, Access |
| Namecheap | https://www.namecheap.com/ | DNS, domain, email forwarding |
| Redirect | https://redirect.pizza/ | Apex → www redirect |
| Google Cloud | https://console.cloud.google.com/ | OAuth web application |

## 1. Return to productive work

\`\`\`text
Go to public site → Owner link → Cloudflare Google login → Owner Console
            │                                          │
        public only                                  view history
                                                      │
                         Architecture & Operations / Release / Defects
                                                      │
                                  GitHub commit/PR when changes needed
\`\`\`

**Warning:** Current admin interface is a read-only dashboard of a static snapshot. It cannot save a defect or decision by typing into the browser. To alter history, edit \`public/data/operations.json\` in GitHub and commit.

## 2. Public site edit procedure
1. Decide what to change; verify factual claims, licensing, client names, trademark/IP, contact approval.
2. Open \`iot3consulting/alkemie-corporate-platform\`, identify actual Cloudflare production branch (seen as \`bootstrap/corporate-platform-v0.1\` in December 3 screenshot).
3. Edit \`site/index.html\` and/or \`site/styles.css\`; preserve all unrelated files and Owner link.
4. Commit with a descriptive message or PR when review needed.
5. Cloudflare dashboard → **Compute → Workers & Pages → alkemie-corporate-platform → Deployments**. Confirm deploy from intended branch/commit.
6. Test \`https://www.alkemietechnologies.com/\`; test mobile layout, navigation, Owner link and SSL. For apex, test \`https://alkemietechnologies.com/\` redirects to www with path/query intact.
7. Log release in owner snapshot and attach commit/deployment reference.

## 3. Owner Console change procedure
1. Open \`iot3consulting/alkemie-owner-console\`, default branch \`main\`.
2. Edit only intended files: \`public/index.html\`, \`public/admin.css\`, \`public/admin.js\`, \`public/data/operations.json\`, \`public/architecture.html\`, or \`docs/*.md\`.
3. Keep \`wrangler.jsonc\` static asset path \`./public\`; do not add a public admin hosting alternative.
4. Commit with reason, scope and verification expectations. Cloudflare Workers Builds uses \`npx wrangler deploy\` on connected branch; verify actual current build.
5. Dashboard: **Compute → Workers & Pages → alkemie-owner-console → Deployments**. Confirm latest version.
6. Test signed-out Owner Console denial, signed-in owner access, navigation, operations JSON render, Architecture & Operations, and logout.
7. Record release and any defects in the versioned snapshot.

## 4. Access change procedure (only when necessary)
1. Dashboard → **Compute → Workers & Pages → alkemie-owner-console → Access**.
2. Expected: **Worker Access / All traffic**; allow policy named \`alkemie-corporate-platform\` (a legacy name, does not make the public corporate site private), principal is exact owner Google email.
3. Never select **Previews only** for owner protection. Never substitute permissive **Email domain** or **Everyone** selectors.
4. Keep Google OAuth client secret entirely in Cloudflare's identity provider settings; never paste into code or docs.
5. Verify signed-out / rejected unapproved account / direct \`/data/operations.json\` / preview URL behavior.
6. Record any changes to principal, policy action, scope, identity provider and expected session duration, without collecting session tokens.

## 5. DNS, redirect, email
**Current architecture keeps Namecheap authoritative.** Edit DNS only for explicitly approved domain-routing changes.
- \`www\` CNAME → Cloudflare Pages project host.
- \`@\` A → redirect.pizza service edge, observed \`89.106.200.1\` on 2026-12-03.
- redirect.pizza source \`alkemietechnologies.com\` → destination \`https://www.alkemietechnologies.com\` with permanent 301, path and query forwarding.
- Do **not** delete Namecheap email forwarding (MX + SPF). Preserve \`tech\` and verification records.
- After DNS changes verify \`www\` and apex HTTPS, existing \`tech\` service, and inbound forwarding with a real test mail.

## 6. Recovery matrix

### Public site serves old content
\`\`\`text
Open Cloudflare corporate project
 → Settings: is the production branch expected?
 → Deployments: was current GitHub SHA deployed successfully?
 → Compare target site/ assets to GitHub
 → Browser hard refresh / independent browser
 → Roll back only after identifying known-good deployment
\`\`\`

### Admin returns placeholder / missing dashboard
\`\`\`text
Owner repo main/public/index.html contains dashboard?
 → Worker deploy log includes static assets?
 → worker version corresponds to newest repo commit?
 → re-deploy / retry build without disabling Access
 → check all admin files fetched successfully after Google sign-in
\`\`\`

### Admin prompts wrong account / cannot sign in
\`\`\`text
Worker Access All traffic?
 → policy exact email (approved owner)?
 → Cloudflare Google IdP enabled?
 → current signed-in Google identity?
 → test private/incognito
 → do not bypass Access as a workaround
\`\`\`

### Owner sign-out
Current implementation opens public site in a new tab and navigates old tab to \`/cdn-cgi/access/logout\`. A popup blocker may suppress the public tab. Verify a new protected visit requires login.

### Site root HTTPS errors
Check Namecheap apex DNS, redirect.pizza host verification, TLS mode/propagation, and direct www site. Do not misattribute an apex redirect failure to the public Pages build.

## 7. Evidence standard and update rhythm
For each release or incident store \`timestamp\`, \`who/owner\`, \`scope\`, \`source SHA\`, \`build status\`, \`live test\`, \`risk\`, \`resolution\`, \`rollback reference\`. Keep screenshots/redacted logs if necessary. Flag uncertain values as **to verify** instead of fabricating.
Weekly/when changed: check open defects, GitHub history and deployed builds, broken links, approved content, and mail forwarding. This is a **manual checklist**, not an installed recurring service.
