···11+MIT License
22+33+Copyright (c) 2026 Jack Hannon
44+55+Permission is hereby granted, free of charge, to any person obtaining a copy
66+of this software and associated documentation files (the "Software"), to deal
77+in the Software without restriction, including without limitation the rights
88+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99+copies of the Software, and to permit persons to whom the Software is
1010+furnished to do so, subject to the following conditions:
1111+1212+The above copyright notice and this permission notice shall be included in all
1313+copies or substantial portions of the Software.
1414+1515+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121+SOFTWARE.
+90
README.md
···11+# orbyt-site
22+33+Website for orbyt, a video app for Bluesky. Browse profiles and posts at getorbyt.com.
44+55+<p align="center">
66+ <a href="https://github.com/Hann8n/orbyt-site">GitHub</a> · <a href="https://tangled.org/jack.orbyt.video/orbyt-site">Tangled</a> · <a href="https://getorbyt.com">Live site</a> · <a href="https://bsky.app/profile/getorbyt.com">Bluesky</a> · <a href="https://community.getorbyt.com">Community</a>
77+</p>
88+99+## Architecture
1010+1111+### Bluesky API (`src/utils/bluesky-api.ts`)
1212+1313+- Fetches profiles, posts, and video feeds from `https://public.api.bsky.app/xrpc`
1414+- Key functions: `fetchProfile`, `fetchPost`, `fetchVideoPosts`, `resolveHandle`
1515+- Handles video embeds (`app.bsky.embed.video#view`), thumbnails, HLS playlists
1616+- 5s request timeout, URL/MIME helpers
1717+1818+### orbyt API (`src/utils/orbyt-api.ts`)
1919+2020+- Cloudflare Service Binding to `orbyt-api` worker
2121+- `getColor(did, binding)` returns profile colors (textColor, backgroundColor, joinedAt, isBeta)
2222+- Graceful fallback when binding unavailable
2323+2424+### RichText Parser (`src/utils/richtext.ts`)
2525+2626+- `parseRichText()`: @mentions (TLD required) → `/@handle`, URLs → external links
2727+- XSS-safe HTML escaping, newline-to-`<br>` conversion
2828+2929+## Data Flow
3030+3131+**Profile page** (`/@[handle]`):
3232+3333+1. SSR: `fetchProfile`, `fetchVideoPosts` (parallel) → Bluesky
3434+2. `getColor(profile.did)` via ORBYT_API binding
3535+3. Cache: `s-maxage=60, stale-while-revalidate=300`
3636+4. "Load more" pagination via Astro action `loadMorePosts`
3737+3838+**Post page** (`/@[handle]/[postId]`):
3939+4040+1. SSR: `resolveHandle` → DID, then `fetchPost` (getPosts XRPC)
4141+2. Video URL from embed (playlist or `video.bsky.app/watch/...`)
4242+3. HLS.js client-side playback, view transitions
4343+4444+**Static pages:** `/`, `/about`, `/beta`, `/app`, `/contact`, `/discord`, `/terms`, `/privacy` — all prerendered
4545+4646+## Deployment
4747+4848+- **Platform:** Cloudflare Pages (Astro adapter)
4949+- **Config:** [wrangler.jsonc](wrangler.jsonc) — assets binding, ORBYT_API service
5050+- **Site:** getorbyt.com (CNAME)
5151+5252+## Project Structure
5353+5454+```
5555+orbyt-site/
5656+├── src/
5757+│ ├── pages/
5858+│ │ ├── index.astro # Landing
5959+│ │ ├── @[handle].astro # Profile (SSR)
6060+│ │ ├── @[handle]/[postId].astro # Post (SSR)
6161+│ │ ├── about.astro, beta.astro, app.astro, ...
6262+│ │ └── sitemap.xml.ts
6363+│ ├── actions/index.ts # loadMorePosts
6464+│ └── utils/
6565+│ ├── bluesky-api.ts # Bluesky XRPC client
6666+│ ├── orbyt-api.ts # Color API binding
6767+│ └── richtext.ts # Mention/link parsing
6868+├── public/ # Static assets, CSS, favicon
6969+├── astro.config.mjs
7070+└── wrangler.jsonc
7171+```
7272+7373+## Build Requirements
7474+7575+- Node.js 18+
7676+- `npm install` then `npm run build`
7777+- `npm run dev` for local dev (ORBYT_API binding optional)
7878+7979+## Dependencies
8080+8181+- **Astro** 5.x — SSG/SSR
8282+- **@astrojs/cloudflare** — adapter, image service, platform proxy
8383+8484+## License
8585+8686+This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for full text.
8787+8888+---
8989+9090+*Bluesky and AT Protocol are independent projects; this site is not officially affiliated.*