···45454646## Deployment
47474848-- **Platform:** Cloudflare Pages (Astro adapter)
4949-- **Config:** [wrangler.jsonc](wrangler.jsonc) — assets binding, ORBYT_API service
5050-- **Site:** getorbyt.com (CNAME)
5151-- **AltStore ADP:** host in Cloudflare R2, not `public/`, because IPA files exceed Workers asset limits
4848+- **Runtime:** Cloudflare Worker deployed with `wrangler deploy` on route `getorbyt.com/*`
4949+- **Pages Project:** `orbyt-site.pages.dev` exists for Pages deployments/management, but production traffic is served by the Worker route
5050+- **Config:** [wrangler.jsonc](wrangler.jsonc) — assets binding, ORBYT_API service, R2 bucket binding
5151+- **Deploy Command:** `npm run build && npx wrangler deploy`
5252+- **AltStore ADP:** hosted in Cloudflare R2; only `public/altstore/source.json` and `public/altstore/orbyt-icon.png` stay in site assets
5353+- **AltStore Runbook:** see [docs/ALTSTORE_FINISH_SETUP.md](docs/ALTSTORE_FINISH_SETUP.md) → "Quick Release Checklist"
52545355## Project Structure
5456···6769│ ├── orbyt-api.ts # Color API binding
6870│ └── richtext.ts # Mention/link parsing
6971├── public/ # Static assets, CSS, favicon
7272+│ └── altstore/ # Source metadata + icon (no ADP payload)
7373+├── .altstore/adp/ # Local ADP staging before R2 upload
7474+├── scripts/altstore-r2.sh # R2 setup/upload helper
7075├── astro.config.mjs
7176└── wrangler.jsonc
7277```
73787479## Build Requirements
75807676-- Node.js 18+
8181+- Node.js 22.12+
7782- `npm install` then `npm run build`
7883- `npm run dev` for local dev (ORBYT_API binding optional)
79848085## Dependencies
81868282-- **Astro** 5.x — SSG/SSR
8787+- **Astro** 6.x — SSG/SSR
8388- **@astrojs/cloudflare** — adapter, image service, platform proxy
84898590## Clone & Run
+54-3
docs/ALTSTORE_FINISH_SETUP.md
···6677**Cloudflare note:** Do not deploy the ADP folder from `public/`. The IPA files are larger than Cloudflare Workers static asset limits. Use R2 for the ADP payload and keep only `source.json` and the icon on the website.
8899+**Routing note:** `getorbyt.com/*` is served by the Cloudflare Worker route configured in `wrangler.jsonc`, so deploy production with `wrangler deploy`.
1010+911---
10121113## Step 0: Enable R2 in Cloudflare
···8789This script will:
889089911. create the R2 bucket if needed
9090-2. enable the public `r2.dev` URL
9292+2. enable the public `r2.dev` URL (fallback)
91933. upload `manifest.json`, `signature`, and `variant/*.ipa`
9292-4. update `public/altstore/source.json` so `downloadURL` points to the hosted `manifest.json`
9494+4. update `public/altstore/source.json` so `downloadURL` points to `https://downloads.getorbyt.com/manifest.json` when available, otherwise it falls back to `r2.dev`
93959496If you want to use a different bucket name, replace `orbyt-altstore-adp` with your preferred name.
9797+9898+If you want a different manifest host, set `ALTSTORE_CUSTOM_MANIFEST_URL` before running setup.
959996100---
97101···108112109113## Step 6: Deploy and verify the source JSON
110114111111-1. Deploy `orbyt-site`.
115115+1. Build and deploy the Worker route:
116116+117117+ ```bash
118118+ cd orbyt-site
119119+ npm run build
120120+ npx wrangler deploy
121121+ ```
122122+123123+ If you also deploy via Pages, note that Pages deploys alone do not update the `getorbyt.com/*` Worker route.
1121241131252. Verify the site source URL:
114126···127139 -d '{"source": "https://getorbyt.com/altstore/source.json"}' \
128140 https://api.altstore.io/federate
129141```
142142+143143+If AltStore returns a "pending approval" error, wait for approval and retry the same command.
130144131145---
132146···144158| 7 | Federate via the API |
145159146160After this, EU and Japan users can add `https://getorbyt.com/altstore/source.json` in AltStore PAL and install Orbyt.
161161+162162+---
163163+164164+## Quick Release Checklist
165165+166166+Run from the parent folder containing both `orbyt-app` and `orbyt-site`.
167167+168168+```bash
169169+# 1) Download fresh ADP from App Store Connect package ID
170170+cd orbyt-app
171171+./scripts/altstore-pal.sh download 4792c770-f63a-47d2-bd86-bb7254e8f9bf
172172+173173+# 2) Extract ADP
174174+unzip orbyt-adp-4792c770-f63a-47d2-bd86-bb7254e8f9bf.zip -d adp-extracted
175175+176176+# 3) Stage ADP in orbyt-site (outside public)
177177+cd ../orbyt-site
178178+mkdir -p .altstore
179179+rm -rf .altstore/adp
180180+mv ../orbyt-app/adp-extracted .altstore/adp
181181+182182+# 4) Upload ADP to R2 and update public/altstore/source.json downloadURL
183183+npm run altstore:r2 -- setup orbyt-altstore-adp
184184+185185+# 5) Deploy production route (getorbyt.com/*)
186186+npm run build
187187+npx wrangler deploy
188188+189189+# 6) Verify live URLs
190190+curl -sS -o /dev/null -w 'source %{http_code}\n' https://getorbyt.com/altstore/source.json
191191+curl -sS -o /dev/null -w 'manifest %{http_code}\n' https://downloads.getorbyt.com/manifest.json
192192+193193+# 7) Federate source
194194+curl -X POST -H "Content-Type: application/json" -d '{"source":"https://getorbyt.com/altstore/source.json"}' https://api.altstore.io/federate
195195+```
196196+197197+If federation returns a pending approval error, wait for approval and rerun only step 7.
+5-1
public/altstore/README.md
···11# AltStore PAL assets
2233- `orbyt-icon.png` — App icon (1024×1024), already added
44-- `source.json` — Hosted from this site
44+- `source.json` — Hosted from this site at `https://getorbyt.com/altstore/source.json`
55- `.altstore/adp/` — Keep extracted ADP contents here locally, then upload them to R2
6677+Default manifest host is `https://downloads.getorbyt.com/manifest.json`.
88+`r2.dev` is used only as fallback when the custom domain is not ready.
99+710Do not keep the ADP payload in `public/` when deploying to Cloudflare. The IPA files exceed the Workers static asset limit.
1111+Production traffic on `getorbyt.com/*` is served by the Worker route in `wrangler.jsonc`.
812913See docs/ALTSTORE_FINISH_SETUP.md for full instructions.