# ALKEMIE TECHNOLOGIES — Corporate Platform & Owner Console
## Architecture, Deployment, Operations & Continuity Record

**Record ID:** ALK-ARCH-0001  
**Version:** 1.0 · 2026-12-03  
**Classification:** Internal / Owner  
**System owner:** Alkemie Technologies, LLC  
**Canonical version:** This file on the \`main\` branch of \`iot3consulting/alkemie-owner-console\`  
**Read with:** [OPERATIONS_RUNBOOK.md](./OPERATIONS_RUNBOOK.md), [ARCHITECTURE_DECISIONS.md](./ARCHITECTURE_DECISIONS.md)  
**Evidence basis:** GitHub repository contents and commits, Wrangler configuration, and Cloudflare / Namecheap / redirect.pizza configuration screenshots supplied by the owner on December 3, 2026. No independent administrative API audit of DNS, OAuth settings, or runtime policy has been performed.

### Legend for confidence
- **[CODE]** inspected directly in GitHub.
- **[SCREEN]** observed on a supplied dashboard screenshot; authoritative at screenshot time, subject to later change.
- **[USER]** reported working by owner (e.g., signed-in access or incognito testing).
- **[OPEN]** must still be tested or established.
- **[FUTURE]** proposed capability, not present in code.

---

## 1. Mission, topology and boundaries

Alkemie Technologies uses **two independent web delivery applications**:
1. **Public corporate presence**: \`www.alkemietechnologies.com\`, Cloudflare Pages, no customer login. Supports professional presentation, résumé referrals, engineering leadership, services, ARC-OS™ research framing, company information, and approved claims. [CODE, SCREEN, USER]
2. **Owner Console**: \`alkemie-owner-console.iot3consulting.workers.dev\`, Cloudflare Worker with static assets, Cloudflare Access protection, Google identity and exact-owner-email allow rule; private operational history, releases, defect/risk review, decisions, and continuity links. [CODE, SCREEN]

**Hard boundary:** Neither the admin HTML nor its operational JSON is deployed in the public Pages \`site/\` directory. Public site has an *Owner* link, but a visible link does not grant access. The Access edge is the authentication barrier. Private GitHub visibility alone is not web authentication.

### Diagram A — logical deployment topology

\`\`\`text
                        PEOPLE / BROWSERS
                 ┌──────────────┴──────────────┐
                 │                             │
       Unauthenticated visitor             Owner (Google)
                 │                             │
                 ▼                             │
    www.alkemietechnologies.com              │
                 │                             │
                 ▼                             │
      Cloudflare Pages [PUBLIC]                │
      alkemie-corporate-platform               │
      repo corporate / output site/            │
                 │                             │
                 ├── Content sections          │
                 │   Solutions, ARC-OS, etc.   │
                 │                             │
                 └── "Owner" hyperlink ────────┤
                                               ▼
                      alkemie-owner-console.iot3consulting.workers.dev
                                               │
                                   Cloudflare Access [ALL TRAFFIC]
                                       Google identity provider
                                       exact email allow policy
                                               │
                                      allowed? ─── no → denied
                                               │ yes
                                               ▼
                                 Cloudflare Worker + static assets
                                  repo owner-console / public/
                                               │
                             ┌─────────────────┴────────────────┐
                             ▼                                  ▼
                    HTML/CSS/JS dashboard              data/operations.json
                    no privileged API                  dated manual snapshot
                             │                                  │
                             └────────── display only ──────────┘
\`\`\`

### Diagram B — external ownership/dependencies

\`\`\`text
Namecheap (registrar + current authoritative DNS)
 ├─ @ A record → redirect.pizza edge [SCREEN; see current DNS before edits]
 │   └─ HTTP 301 → https://www.alkemietechnologies.com/{path}?{query}
 ├─ www CNAME → alkemie-corporate-platform.pages.dev [SCREEN]
 ├─ tech A records + tech CNAME (historic Google configuration; preserve)
 ├─ Google verification CNAME (preserve)
 └─ Namecheap email forwarding settings: MX + SPF (preserve/test)
       |
       └─ Owner business email reception (delivery test still [OPEN])

GitHub private repositories (source/version history)
 ├─ iot3consulting/alkemie-corporate-platform
 │    └─ Cloudflare Pages build from configured production branch/output site/
 └─ iot3consulting/alkemie-owner-console
      └─ Cloudflare Workers Builds → npx wrangler deploy
           └─ wrangler.jsonc → assets.directory = "./public"

Google Cloud / Google Auth Platform
 └─ OAuth web client → Cloudflare Zero Trust identity provider
       └─ Access policy → Worker (all traffic)
\`\`\`

**Do not infer that all records are current merely because they appear in older screenshots.** DNS records, GitHub branches, and third-party configurations may change.

---

## 2. Source repositories and production locations

| Concern | Current source / configuration | Status |
|---|---|---|
| Public code | \`iot3consulting/alkemie-corporate-platform\` | [CODE] |
| Public HTML | \`site/index.html\` | [CODE] |
| Public stylesheet | \`site/styles.css\` | [CODE / referenced by HTML] |
| Public host | Cloudflare Pages \`alkemie-corporate-platform\` | [SCREEN] |
| Public production branch | \`bootstrap/corporate-platform-v0.1\` at December 3 settings screenshot | [SCREEN]; check before next change |
| Public build output | \`site\` (no build command) | [SCREEN] |
| Public custom hostname | \`www.alkemietechnologies.com\` | [SCREEN] Active/SSL enabled |
| Admin code | \`iot3consulting/alkemie-owner-console\`, private | [CODE] |
| Admin production branch | \`main\` | [CODE / SCREEN] |
| Worker config | \`wrangler.jsonc\`: name, compatibility date, static assets | [CODE] |
| Admin assets | \`public/index.html\`, \`public/admin.css\`, \`public/admin.js\` | [CODE] |
| Snapshot | \`public/data/operations.json\` | [CODE] |
| Admin host | \`alkemie-owner-console.iot3consulting.workers.dev\` | [SCREEN / USER] |
| Worker deploy | \`npx wrangler deploy\` via Workers Builds | [SCREEN] |
| Worker preview builds | Disabled via create screen [USER sequence]; runtime log reported preview URLs enabled by default | [OPEN] check effective preview URL/route behavior |
| Owner security | Worker → Access → All traffic, allow policy named \`alkemie-corporate-platform\` | [SCREEN] |
| Authorized principal | \`williamwcollinsjr@gmail.com\` | [SCREEN] |
| Auth provider | Google identity provider set up in Cloudflare Zero Trust | [SCREEN / USER] |
| Registrar/DNS | Namecheap | [SCREEN] |
| Apex redirect | redirect.pizza 301 redirect to \`https://www.alkemietechnologies.com\` | [SCREEN] Verified there; browser checks reported in incognito |
| Mail forwarding | Namecheap email forwarding, MX and SPF | [SCREEN] End-to-end inbound test [OPEN] |

### Critical branch nuance

The public project's *actual production branch* was shown as \`bootstrap/corporate-platform-v0.1\`; it is **not automatically the same as repository \`main\`**. An edit on the wrong branch might never publish. Verify **Cloudflare → Workers & Pages → alkemie-corporate-platform → Settings → Branch control** before updating public content. Owner Console uses \`main\` as its deployment source. Do not merge or copy private admin files into the public \`site/\` output.

**Historical technical debt:** The corporate \`site/index.html\` still contains internal-alpha or prototype wording and unverified contact/case-study placeholders. Public-content review and approval are pending. Never assume all current preview text is publication-approved simply because a deployment exists.

---

## 3. Request, sign-in, and sign-out lifecycle

### Flow C — public to owner

\`\`\`text
[Visitor requests www]
       |
[Cloudflare Pages returns public HTML]
       |
[Owner link clicked] (normal hyperlink)
       |
[Worker hostname requested]
       |
[Cloudflare Access matches Worker ALL TRAFFIC policy]
       |
       +-- valid matching Access session? -- Yes --> [Serve private HTML/assets]
       |
       No
       |
[Google OAuth sign-in via Cloudflare Access]
       |
[email matches exact allow rule?]
       +-- No --> [Deny]
       +-- Yes --> [Create Access session] --> [Serve admin]
\`\`\`

**Important:** Client-side JavaScript is not responsible for authentication and has no OAuth client secret. The Worker-access binding and Google identity provider are configured in Cloudflare. If the Access policy is removed or scoped too narrowly, a static JSON URL could become reachable. Verify denial for \`/data/operations.json\`, not only \`/\`.

### Flow D — sign-out behavior as implemented in code

\`\`\`text
[Click "Sign out ↗ Public site"]
            |
[JS attempts to open https://www.alkemietechnologies.com/ in new tab]
            |
[Current tab navigates to /cdn-cgi/access/logout]
            |
[Cloudflare clears Access session cookies for this app/domain]
            |
[Current tab displays Cloudflare sign-out flow]
\`\`\`

This is a **two-tab experience**. Popup blocking may prevent the public tab opening. The code does **not** force a cross-domain redirect to the public site from the logout endpoint. Do not describe it as verified without completing a browser session test.

### Safety/security tests (record separately)
- [ ] Private URL unauthenticated in fresh incognito redirects to login or denies access.
- [ ] Exact owner Google account is accepted.
- [ ] Unapproved Google account is denied.
- [ ] \`/data/operations.json\`, \`/admin.js\`, \`/admin.css\` cannot bypass Access in signed-out window.
- [ ] Any enabled preview URLs cannot bypass Access.
- [ ] Sign-out terminates session; revisit owner URL requests login.
- [ ] Public site remains available while signed out.
- [ ] Namecheap mail forwarding continues to receive forwarded messages.

---

## 4. Frontend and data implementation

### Public Pages frontend
Semantic, dependency-light HTML/CSS. Code currently exposes navigation anchors for Solutions, ARC-OS, Research, Experience, Company, Contact, and Owner. Public site is not wired to private operational JSON. Approved claims and contact details must be reviewed before publishing. Its \`Owner\` link targets the separate Workers hostname.

### Owner Worker frontend
A static dashboard (no server-side database / CRUD endpoints currently):
- \`public/index.html\`: navigation and section containers: Overview, Release history, Changes & decisions, Defects & risks, Continuity, Security gates, plus Sign out.
- \`public/admin.css\`: responsive dark theme, cards, metrics and sidebar.
- \`public/admin.js\`: fetches \`./data/operations.json\`, checks \`schema_version === "1.0"\`, computes counts, filters events, renders records as text nodes, and implements sign-out/new public tab.
- \`public/data/operations.json\`: dated \`manual-reviewed-snapshot\`, arrays for releases/events/defects, statuses, links, and descriptions. It is not an API to Cloudflare, GitHub, or OneDrive.

### Diagram E — data and provenance

\`\`\`text
GitHub commits / PRs ─┐
Cloudflare builds ────┼──[human review/recording]──> operations.json (tracked in Git)
Namecheap changes ───┤                                     |
Owner approvals ──────┘                                     |
                                                            ▼
                                             Worker static asset deployment
                                                            |
                                                            ▼
                                                  Browser fetch() + render
                                                            |
                                             No automatic reconciliation
                                             No write API / no DB / no sync
\`\`\`

**Counts:** release total = array length; open defects = status != \`resolved\`; pending approvals = statuses exactly \`review required\` across arrays. These are counts of the snapshot, *not live system health*. An unrelated new GitHub issue does not automatically alter the dashboard.

**Freshness contract:** Before interpreting a dashboard metric, compare \`as_of\` with the current date; the dashboard must not be called live telemetry. Make changes through reviewed Git commits and verify Cloudflare deployment.

---

## 5. DNS, redirect, TLS and email boundaries

### Public browser request path

\`\`\`text
https://alkemietechnologies.com/path?utm=...
     │  apex host
     ▼
Namecheap DNS @ → redirect.pizza IP (observed 89.106.200.1)
     │
     ▼
HTTP 301 (path/query forwarding enabled in redirect.pizza UI)
     ▼
https://www.alkemietechnologies.com/path?utm=...
     │
     ▼
Namecheap www CNAME → Cloudflare Pages hostname
     ▼
Cloudflare TLS + Pages static site
\`\`\`

**Screenshot history:** The apex A record was changed from \`216.24.57.1\` to \`89.106.200.1\`; redirect.pizza displayed “Verified”. Earlier apex HTTPS timed out before redirect.pizza setup; owner reported later checks passing in incognito. This is not an independent current HTTPS availability test.

**Namecheap email forwarding:** The transfer to Cloudflare authoritative nameservers was *not* performed. Namecheap forwarding MX endpoints (\`eforward1\` through \`eforward5.registrar-servers.com\`) and SPF \`v=spf1 include:spf.efwd.registrar-servers.com ~all\` were shown in screenshots during setup; reconfirm in current DNS before changing them. Namecheap also had a \`tech\` subdomain with Google-oriented A and CNAME records and a Google verification CNAME. Preserve unrelated records.

**Never** change MX, SPF, verification records, existing \`tech\` records, or nameservers while making cosmetic site changes. Website URL hosting and incoming email are independent concerns, even though they share a domain.

---

## 6. Deployment and change-control flows

### Public update flow

\`\`\`text
[Proposed copy/design change]
       ↓
[Check factual, client, ARC-OS IP and contact approvals]
       ↓
[Edit corporate repo / site/ on correct branch]
       ↓
[Commit/PR + owner review where warranted]
       ↓
[Cloudflare Pages auto-build from configured production branch]
       ↓
[Check build & HTTPS / layout / Owner link]
       ↓
[Record commit, deployed URL, time, approval, rollback note]
\`\`\`

### Owner update flow

\`\`\`text
[Update owner UI or reviewed operations snapshot]
       ↓
[Commit to owner-console/main, only non-secret content]
       ↓
[Cloudflare Workers Builds executes npx wrangler deploy]
       ↓
[wrangler.jsonc packages ./public static assets]
       ↓
[Cloudflare Access remains All traffic]
       ↓
[Verify Google sign-in + dashboard + JSON + logout]
       ↓
[Log release/change/defect record]
\`\`\`

**Atomicity caveat:** The initial commit sequence may produce intermediate deployments because files were committed separately. Future changes should use a branch/PR or one grouped commit and verify the final worker version. Do not mistake a successful GitHub commit for a deployed application; check the specific build/version. Do not bypass Access while debugging.

### Change identity / fingerprinting
Recommended provenance fields for future records: \`id\`, \`component\`, \`source_repo\`, \`source_ref\`, \`commit_sha\`, \`source_fingerprint\`, \`recorded_at\`, \`effective_at\`, \`status\`, \`owner_approval\`, \`release_id\`. Fingerprints should gate incremental re-analysis and unchanged source should reuse existing review, but **this is not implemented in the current static console** [FUTURE].

---

## 7. Operational inventory and responsibility matrix

| Capability | Provider | Administrative path | Owner intent |
|---|---|---|---|
| Public code/history | GitHub | \`iot3consulting/alkemie-corporate-platform\` | Source of truth |
| Owner code/history | GitHub | \`iot3consulting/alkemie-owner-console\` | Source of truth for console |
| Public deployment | Cloudflare | Workers & Pages → \`alkemie-corporate-platform\` | Hosting / automatic deploy |
| Private deployment | Cloudflare | Workers & Pages → \`alkemie-owner-console\` | Worker static assets |
| Private access | Cloudflare | Worker → Access; Zero Trust IdP/policy | Exact owner identity |
| OAuth client | Google Cloud | Google Auth Platform → Clients | Google sign-in plumbing |
| DNS/registrar/forwarding | Namecheap | Domain → Advanced DNS | Website routing, mail continuity |
| Apex redirect | redirect.pizza | Redirect for \`alkemietechnologies.com\` | 301 apex → www |
| Human continuity records | OneDrive | Canonical Alkemie continuity folders | Intended documentary persistence; not runtime-synced |

**Secrets boundary:** Google client secret and other sensitive values must remain solely in authorized secret/IdP settings. They must never be copied into this document, GitHub source, screenshots shared publicly, or static assets.

---

## 8. Failure modes and recovery

| Symptom | Likely area | First non-destructive check |
|---|---|---|
| Public www stale | Wrong branch / build pending / browser cache | Pages → Deployments / Branch control; hard refresh |
| Apex timeout | Namecheap A/redirect.pizza/TLS propagation | Check apex DNS, redirect.pizza verified state, HTTPS redirect |
| Public page is accessible but Owner link fails | Link or Worker domain | Inspect public \`site/index.html\` href, Worker domain status |
| Admin shows placeholder | Worker built an older commit | Worker → Deployments; confirm HEAD commit and assets |
| Admin unauthenticated | Access scope/policy bypass | Worker → Access → All traffic; test deep JSON route |
| Owner denied | Google IdP, email rule, Cloudflare session | Verify approved exact email and provider, no bypass |
| Admin content blank/missing counts | JSON fetch, schema, asset path | Network fetch of \`data/operations.json\`, schema version 1.0 |
| Mail missing | Namecheap forwarding/MX/SPF | Send inbound mail test; inspect Namecheap forwarding and MX |
| Logout leaves owner session open | Cookie/scope/browser caching | Visit \`/cdn-cgi/access/logout\`; new incognito test |
| Rollback needed | Incorrect release | Redeploy known-good Cloudflare version; revert commit if necessary |

**Restore order:** identify last known-good commit → preserve current log/screenshots → verify domain/service target → restore build/asset configuration → deploy known-good version → test publicly accessible pages and protected owner route → record incident and resolution. Do not “fix” a website deployment failure by moving nameservers or deleting email records.

### Minimal acceptance after any change
- Public \`https://www.alkemietechnologies.com/\` loads and contains expected content.
- Public Owner link resolves to separate Worker hostname.
- Unauthenticated owner host + deep JSON route require Access.
- Owner Google sign-in reaches Owner Console.
- Owner view links, metrics, search and sign-out work.
- No internal operational JSON or secrets appear in public \`site/\`.
- Deployment SHA and environment recorded.

---

## 9. Confirmed gaps and next-phase roadmap

**Outstanding verification [OPEN]**
1. Signed-out and unauthorized-account negative authentication tests, including \`/data/operations.json\`.
2. Confirm build after latest Owner navigation/sign-out commits; latest deployment not directly queried here.
3. Test two-tab sign-out behavior and browser popup handling.
4. Confirm incoming Namecheap email forwarding delivery.
5. Verify current public production branch after changes.
6. Confirm HTTPS apex redirect using an independent browser/network test.
7. Review publication status of corporate copy, contact details and client/case-study claims.

**Not implemented [FUTURE]**
- Real-time GitHub, Cloudflare, Namecheap, OneDrive, or Google API feeds into the dashboard.
- Admin CRUD backend, database, editable records in UI, approvals workflow or push notifications.
- Automated defect sync, deployment telemetry, automatic source hashing, version fingerprints, reconciliation and audit history in the browser.
- General-purpose multi-user RBAC, production SSO beyond owner-only rule, or user management UI.
- Dedicated \`admin.alkemietechnologies.com\` hostname. Current Worker hostname is deliberately sufficient.

The deployment should remain lightweight. Extend only when these capabilities are needed.

---

## 10. Durable governance and recovery contract

1. **Record architectural changes here first**, with dated decision entries in \`ARCHITECTURE_DECISIONS.md\` and procedures in \`OPERATIONS_RUNBOOK.md\`.
2. Treat **GitHub history** as code/deployment provenance, **Cloudflare UI** as source for active policy/build state, and **Namecheap/redirect.pizza** as source for current routing. A dashboard snapshot is an interpretation, not ground truth.
3. For each change retain: request, reason, source/commit, affected public/private boundary, test evidence, owner approval where needed, rollback.
4. Keep the entire canonical record on the private repository \`main\`. Publish a readable architecture view at \`/architecture.html\` behind Cloudflare Access.
5. Never publish internal documentation or sensitive data to the public site; linking to the authenticated console is safe.
6. Recovery must work from only: access to the GitHub repositories, Cloudflare account, Namecheap account, redirect.pizza account, and Google Auth Platform project. No secret values belong in the record.

**End of ALK-ARCH-0001.**
