# reg.site — Registration & BYOK Portal (Detailed)

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

| Item | Current detail |
| --- | --- |
| Site | Registration — Telegram365books account and BYOK key management |
| Public URL | https://reg.telegram365books.stream/ |
| UI hosting | Google `ebstudy-vm` (`35.209.206.38`), user `zxc-funnel` |
| UI document root | `/home/zxc-funnel/reg` |
| UI service / listener | `reg-static.service` on `127.0.0.1:8084` |
| Public ingress | Google Cloudflare tunnel maps the hostname to `http://localhost:8084` |
| Account / BYOK layer | Cloudflare Worker `gm-worker` at https://acct.telegram365books.stream/; no VM port |
| Oracle role | Oracle `dify-a1` runs Hermes among current project user services; it does not host registration |
| Maintained source | Repository-relative `reg/` tree; `reg/index.html` is the static UI entry point |
| Local helper | `reg/copy-to-vm.sh` is a legacy local reference, not a verified current runbook |
| Related source notes | `reg/reg.md` and `reg/README.md` in the maintained registration source tree |

The `acct.` → `gm-worker` mapping is the supplied verified baseline. Google tunnel ingress cannot prove a Cloudflare Worker custom-domain binding, and that binding was not re-queried during the 2026-11-28 review. Registration UI deployment is separate from the tech-site deployment manifest in [deployment.md](deployment.md).

---

## 1. Overview

reg.site is the account registration and BYOK (Bring Your Own Key) portal for the EB2026 ecosystem. The static UI lets users:

- Create an account with a **nickname + lucky number** login pair.
- Optionally link **Cloudflare**, **Kilo**, and **Gemini** API keys to unlock native-language AI models through the protected account/BYOK layer.
- Receive a permanent **Telegram key** (`TG-365-XXXXXXXX`) to bind their chat to `@tg365booksbot`.
- Configure **language** (en/si/ta/arb) and **model** preferences in Step 8 (Settings).

The account roadmap was documented as fully shipped on 2026-11-11. reg.site does not host corpus or chat itself. It is the registration/settings UI that feeds the `eb_acct` account session used by Sea and qbank to gate account/provider-dependent language and model features. Account data and provider-key relay belong to the separate Cloudflare Worker layer, not to the static UI files.

---

## 2. Infrastructure & Deployment

| Item | Detail |
| --- | --- |
| UI hosting | Google `ebstudy-vm`, user `zxc-funnel`, document root `/home/zxc-funnel/reg` |
| Service | `reg-static.service` (static file server) |
| Listener | `127.0.0.1:8084` |
| Cloudflare ingress | `reg.telegram365books.stream` → `http://localhost:8084` on the Google connector |
| Account dashboard / provider-key relay | Cloudflare Worker `gm-worker`; `acct.` has no VM service or port |
| Maintained source dir | Repository-relative `reg/` |
| Legacy local helper | `reg/copy-to-vm.sh`; do not assume its target or behavior is current |
| Build artifacts | `index.html`, `gemini.html`, `kilo.html`, `gemini-img/`, `kilo-img/`, `reg_src.json`, `reg_translations.json`, `guide_src.json`, `guide_translations.json` |
| Translation/build scripts | `cf_translate.py`, `guide_translate.py`, `build_guides.py` |

The UI is served as static HTML and has no database of its own. Earlier documentation described a local helper that packaged files, copied them to a VM, and restarted `reg-static.service`; that helper is retained only as source history until its current target and behavior are reviewed. Do not use the tech-site deployment script or manifest to deploy registration.

---

## 3. Page Structure (Single Page, `index.html`)

The page is organized into 8 sequential steps, each presented as a card:

| Step | Section | Purpose |
| --- | --- | --- |
| — | Language selector header | en/si/ta/arb buttons at top-right |
| — | Header | Telegram365books brand; subtitle “Interactive AI Books • Instant AI Grading • Direct Telegram Sync” |
| 1 | Create Your Account | Nickname + lucky number login pair; instant access; “Not you? Forget this browser” |
| 2 | Link Cloudflare AI Engine | Paste Cloudflare API token to unlock native-language models; links to the Cloudflare token page |
| 3 | Unlock Kilo AI Models | Optional; paste Kilo API key for Si/Tam/Arb models; links to Kilo and the explainer page |
| 4 | Unlock Gemini Models | Optional; paste Gemini API key; links to Google AI Studio and the explainer page |
| 5 | VIP area: Telegram Key | `TG-365-XXXXXXXX` display + copy; permanent and associated with the account |
| 6 | Install Telegram | Link to the Telegram download page |
| 7 | Connect & activate Telegram bot | Connect `@tg365booksbot` (formerly `@peadunitbhk` / `@myspotlivetraderbot`); send the key to link the chat |
| 8 | Settings | Preferred language + preferred model; model-overrides-language via `data-lock-lang` + `syncLangWithModel`; Hospital management book opt-in |

---

## 4. Key Behaviors

### 4.1 Login pair

Nickname + lucky number is the documented login credential. It is designed to persist on refresh and across devices; there is no separate password in this flow.

### 4.2 BYOK keys

Cloudflare, Kilo, and Gemini keys are submitted to the protected account/BYOK layer. The portal design treats them as write-only after save: they are not redisplayed, and removal controls are provided for each linked provider.

Provider credentials must not be stored in the static UI, sent through Telegram, exposed to Hermes or the public retrieval API, or returned to the browser after submission. The trusted relay must use provider-backed verification; a key hash can be a lookup fingerprint but cannot authenticate a user. The present Worker storage/encryption implementation was not audited as part of this topology review. See [Security](security.md#byok-boundaries).

### 4.3 Telegram key

A permanent `TG-365` key is documented as generated per account. It can be copied to the clipboard and sent to the Telegram bot once to link the chat. The documented removal behavior unregisters the user from Telegram and the platform when the Cloudflare token is revoked; that behavior was preserved from the registration source note and was not re-tested here.

### 4.4 Model-overrides-language

Selecting a Kilo or Gemini model with `data-lock-lang` forces that language. `syncLangWithModel` keeps language and model in sync. Step 8 (Settings) is the documented language/model switch.

### 4.5 Language buttons

en/si/ta/arb are available in the header. Arabic steps were documented as added on 2026-11-06.

### 4.6 `eb_acct` session

The account session is set after registration and used by Sea and qbank for account/provider-dependent si/ta/arb model and MCQ access. It is not a provider API key and must not be treated as one.

---

## 5. Outbound Links

| Link | Destination | Purpose |
| --- | --- | --- |
| Home | https://telegram365books.stream/ | Apex identity page |
| Cloudflare tokens | https://dash.cloudflare.com/profile/api-tokens | Get a Cloudflare API token |
| Kilo key | https://app.kilo.ai/ | Get a Kilo API key |
| Kilo explainer | https://reg.telegram365books.stream/kilo.html | Kilo key explanation page |
| Gemini key | https://aistudio.google.com/apikey | Get a Gemini API key |
| Gemini explainer | https://reg.telegram365books.stream/gemini.html | Gemini key explanation page |
| Telegram app | https://telegram.org/dl | Download Telegram |
| Telegram bot | https://t.me/tg365booksbot | Open `@tg365booksbot` |

Never paste provider keys or Telegram tokens into public documentation, logs, screenshots, or chat messages.

---

## 6. Tech Stack

- **Static UI:** `index.html` (approximately 120 KB in the source note).
- **Tailwind CSS** via CDN.
- **FontAwesome** icons.
- **Design system:** slate-950/indigo chrome, glass cards, step badges.
- **Translation files:** `reg_src.json` / `reg_translations.json` (source and translated strings).
- **Build scripts:** `cf_translate.py`, `guide_translate.py`, `build_guides.py`.
- **Explainer pages:** `gemini.html`, `kilo.html` with redacted screenshot assets in `gemini-img/` and `kilo-img/`.
- **Separate account/BYOK layer:** Cloudflare Worker `gm-worker`, not a static-site backend or VM port.

---

## 7. What Hermes Agent Should Know

- reg is the registration/settings UI; it does not host corpus or chat itself.
- The Google UI and the Cloudflare account/BYOK Worker are separate layers.
- Step 8 (Settings) is the documented language/model switch; model selection can override language.
- The Telegram key links an account to `@tg365booksbot`; Telegram is not a provider-key channel.
- The `eb_acct` session gates account/provider-dependent features in Sea and qbank.
- All six account-roadmap phases were documented as shipped on 2026-11-11.
- Do not infer Oracle registration hosting from older notes; current Oracle's observed project role is Hermes.

---

## 8. Current State

At the 2026-11-28 verification baseline, `reg-static.service` was active/running and enabled on Google, listening on `127.0.0.1:8084`, with `reg.telegram365books.stream` mapped to that listener by the Google Cloudflare connector. The public registration URL returned HTTP 200 in read-only checks; that proves reachability, not anonymous access to every account action.

The account dashboard and provider-key relay are a separate Cloudflare Worker layer. Current Oracle runs Hermes among its observed project user services and is not the registration origin. Older old-Oracle hosting and repointing instructions are historical only; see [history.md](history.md) rather than treating them as deployment steps.
