# EB2026 Architecture

> **Status:** CURRENT
> **Last verified:** 2026-11-28

## Documentation status contract

Article status identifies the retained documentation baseline. Label individual facts when their lifecycle differs:

| Label | Meaning |
| --- | --- |
| **CURRENT** | Verified operational or authoritative on the **Last verified** date. Observed resource values remain dated measurements, not permanent capacity. |
| **LEGACY** | Still present or running, but superseded or retained for compatibility; not the preferred path. |
| **HISTORICAL** | A past event or retired arrangement, recorded only for context and never as current topology. |
| **PLANNED — NOT IMPLEMENTED** | Proposed only; no deployed capability or access may be inferred. |

When sources conflict, use this precedence from highest to lowest: **live VM inspection**, **public HTTPS**, **local maintained source**, **project memory**. Live inspection establishes deployed state; public HTTPS establishes published reachability and content, not backend topology; local source describes maintained intent; project memory is context only and must not override evidence.

Hosting and access guardrails: VM-based sites are hosted on **Google**; **Cloudflare Workers** are a separate hosting layer. Under the **CURRENT** baseline, Hermes access is **owner-only**. Registered-user companions are **PLANNED — NOT IMPLEMENTED**.

## Current topology

```text
Visitors
  `-> Cloudflare DNS / proxy
        |-> Google cloudflared -> loopback-only site and application services
        `-> Cloudflare Worker gm-worker -> acct. account dashboard / relay
Owner
  `-> owner-only Hermes access -> Oracle dify-a1 user service
```

| Layer / host | Current role | Boundary |
| --- | --- | --- |
| **Google `ebstudy-vm`** (`35.209.206.38`, user `zxc-funnel`) | Production origin for the VM-based EB2026 sites, Knowledge Sea, Eddy, and the public API. | Services listen on loopback; public traffic enters through the Cloudflare tunnel. |
| **Cloudflare** | DNS/proxy edge, Google tunnel ingress, and the separate Worker layer. | A Worker hostname is not a VM service and has no VM port. |
| **Oracle `dify-a1`** (`129.225.74.53`, user `ubuntu`) | Runs `hermes-gateway.service`; it is the only active project user service observed. | Hermes is owner-only and is not a public site origin or the Examiner service. |
| **Old Oracle** (see [History](history.md)) | **HISTORICAL ONLY.** | Not part of current EB2026 topology; no current service, deployment, or ingress claim may be inferred. It was not contacted for this verification. |

## Google service map

All listed application listeners were confirmed on `127.0.0.1`. `active/running` is a dated observation; `enabled` describes the current unit-file state, not a guarantee about future boots.

| systemd unit | Listener | Observed state | Purpose | Public ingress |
| --- | ---: | --- | --- | --- |
| `apex-static.service` | `127.0.0.1:8081` | active/running; enabled | Apex identity site | `telegram365books.stream`, `www.telegram365books.stream` |
| `eb2026-static.service` | `127.0.0.1:8080` | active/running; enabled | Digital bookshelf, maps, KB, PWA | `eb2026.telegram365books.stream` |
| `reg-static.service` | `127.0.0.1:8084` | active/running; enabled | Registration and account settings | `reg.telegram365books.stream` |
| `qbank-static.service` | `127.0.0.1:8085` | active/running; enabled | Written model papers, HAPP papers, and HAPP MCQ | `qbank.telegram365books.stream` |
| `mcq-static.service` | `127.0.0.1:8086` | active/running; enabled | EB MCQ practice UI | `mcq.telegram365books.stream` |
| `tech-static.service` | `127.0.0.1:8087` | active/running; enabled | This documentation site | `tech.telegram365books.stream` |
| `sea.service` | `127.0.0.1:8091` | active/running; enabled | Knowledge Sea advisor | `sea.telegram365books.stream` |
| `sea-api.service` | `127.0.0.1:8092` | active/running; enabled | Knowledge Sea public retrieval API | `api.telegram365books.stream` |
| `eddy.service` | `127.0.0.1:8093` | active/running; enabled | Eddy knowledge advisor | `eddy.telegram365books.stream` |
| `ebfunnel.service` | `127.0.0.1:5005` | **LEGACY:** active/running; disabled | Retained funnel process | No current public hostname verified |
| `ebtbridge.service` | no listening port | **LEGACY:** active/running; disabled | Standalone Telegram `tbridge.py` poller | Not the Oracle Hermes gateway |
| `cloudflared.service` | outbound tunnel | active/running; disabled | Cloudflare Tunnel connector | Carries the ingress below |

Service working directories are under `/home/zxc-funnel/`; the documentation site uses `/home/zxc-funnel/tech.eb2026`. The two disabled legacy units and the disabled tunnel unit are running at the snapshot time but are not enabled for boot.

## Cloudflare tunnel ingress

The active Google connector reads `/etc/cloudflared/config.yml`. The verified non-secret ingress mappings are:

| Hostname | Google origin service |
| --- | --- |
| `telegram365books.stream` | `http://localhost:8081` |
| `www.telegram365books.stream` | `http://localhost:8081` |
| `eb2026.telegram365books.stream` | `http://localhost:8080` |
| `qbank.telegram365books.stream` | `http://localhost:8085` |
| `reg.telegram365books.stream` | `http://localhost:8084` |
| `sea.telegram365books.stream` | `http://localhost:8091` |
| `mcq.telegram365books.stream` | `http://localhost:8086` |
| `tech.telegram365books.stream` | `http://localhost:8087` |
| `api.telegram365books.stream` | `http://localhost:8092` |
| `eddy.telegram365books.stream` | `http://localhost:8093` |
| `ssh.telegram365books.stream` | `ssh://localhost:22` |

The SSH entry is an access path, not a public web site. Current SSH commands and access policy belong to the SSH documentation task; the Cloudflare Access policy itself was not inspected here.

`acct.telegram365books.stream` is intentionally absent from this VM ingress table: it is served by Cloudflare Worker `gm-worker`, not by a VM port. `tg.telegram365books.stream` and `tg-static.service` are **RETIRED**; neither a current ingress rule nor a `:8082` listener was observed. `mcp.telegram365books.stream` is also **RETIRED** and absent from current ingress.

## Cloudflare Worker layer

- **`gm-worker` / `acct.telegram365books.stream`** — account dashboard and AI-provider relay. It is a Worker route with no VM listener. Account-specific data and actions require the Worker's account/session state; an anonymous status response is not an authenticated account session.
- **Verification gap:** Google tunnel ingress cannot prove a Cloudflare Worker custom-domain binding. The `gm-worker` assignment above is the supplied verified baseline; the Cloudflare dashboard/API route binding was not re-queried, and no `.env` file or token was opened.
- Other Worker hostnames are not enumerated as current topology unless independently verified. Registered-user companions remain **PLANNED — NOT IMPLEMENTED**.

## Application boundaries

- **Static sites:** apex, EB2026, registration, qbank, MCQ, and tech are loopback HTTP origins behind Google cloudflared.
- **Advisors:** Knowledge Sea (`:8091`) and Eddy (`:8093`) are separate Google services. Eddy is not the API and does not share the API port.
- **Public API:** `sea-api.service` on `:8092` serves the hybrid static/dynamic retrieval API. Its operation contract is the live [OpenAPI document](https://api.telegram365books.stream/openapi.json); corpus content is published from [EB2026 KB](https://eb2026.telegram365books.stream/kb/). Prose counts are not authoritative.
- **Legacy Google processes:** `ebfunnel` and `ebtbridge` are still running but disabled. Their presence does not make them preferred public entry points.
- **Oracle Hermes:** `hermes-gateway.service` is a separate owner-only messaging gateway. It is not `hermes-examiner.service`, and no active Examiner user service was observed.
- **HRMIS references:** `hrmis-vm.md` is retained as a **HISTORICAL** reference, not current infrastructure evidence.

## Source-of-truth map

| Question | Authoritative source |
| --- | --- |
| What is running now? | Read-only `systemctl` / `ss` inspection; dated summary in `state.md` |
| Which public hostname reaches which origin? | Google cloudflared ingress plus Cloudflare-side route evidence; catalog in `sites.md` |
| Which HTTP operations exist and what do they return? | Observed live API behavior; [OpenAPI](https://api.telegram365books.stream/openapi.json) is the published schema reference, and any mismatch must be recorded; examples in `api-examples.md` |
| Which corpus content is published? | [EB2026 KB](https://eb2026.telegram365books.stream/kb/) and the service's current manifests |
| What should be edited? | This branch's `tech/` tree; project memory is context only |

Resource figures, process IDs, and listener snapshots are point-in-time observations. Use the inspection commands in `state.md` instead of copying permanent CPU/RAM values into documentation.
