orbyt-site#
Website for orbyt, a video app for Bluesky.
GitHub · Tangled · Live site · Bluesky · Community
Architecture#
Bluesky API (src/utils/bluesky-api.ts)#
- Fetches profiles, posts, and video feeds from
https://public.api.bsky.app/xrpc - Key functions:
fetchProfile,fetchPost,fetchVideoPosts,resolveHandle - Handles video embeds (
app.bsky.embed.video#view), thumbnails, HLS playlists - 5s request timeout, URL/MIME helpers
orbyt API (src/utils/orbyt-api.ts)#
- Cloudflare Service Binding to
orbyt-apiworker getColor(did, binding)returns profile colors (textColor, backgroundColor, joinedAt, isBeta)- Graceful fallback when binding unavailable
RichText Parser (src/utils/richtext.ts)#
parseRichText(): @mentions (TLD required) →/@handle, URLs → external links- XSS-safe HTML escaping, newline-to-
<br>conversion
Data Flow#
Profile page (/@[handle]):
- SSR:
fetchProfile,fetchVideoPosts(parallel) → Bluesky getColor(profile.did)via ORBYT_API binding- Cache:
s-maxage=60, stale-while-revalidate=300 - "Load more" pagination via Astro action
loadMorePosts
Post page (/@[handle]/[postId]):
- SSR:
resolveHandle→ DID, thenfetchPost(getPosts XRPC) - Video URL from embed (playlist or
video.bsky.app/watch/...) - HLS.js client-side playback, view transitions
Static pages: /, /about, /beta, /app, /contact, /discord, /terms, /privacy — all prerendered
Deployment#
- Platform: Cloudflare Pages (Astro adapter)
- Config: wrangler.jsonc — assets binding, ORBYT_API service
- Site: getorbyt.com (CNAME)
Project Structure#
orbyt-site/
├── src/
│ ├── pages/
│ │ ├── index.astro # Landing
│ │ ├── @[handle].astro # Profile (SSR)
│ │ ├── @[handle]/[postId].astro # Post (SSR)
│ │ ├── about.astro, beta.astro, app.astro, ...
│ │ └── sitemap.xml.ts
│ ├── actions/index.ts # loadMorePosts
│ └── utils/
│ ├── bluesky-api.ts # Bluesky XRPC client
│ ├── orbyt-api.ts # Color API binding
│ └── richtext.ts # Mention/link parsing
├── public/ # Static assets, CSS, favicon
├── astro.config.mjs
└── wrangler.jsonc
Build Requirements#
- Node.js 18+
npm installthennpm run buildnpm run devfor local dev (ORBYT_API binding optional)
Dependencies#
- Astro 5.x — SSG/SSR
- @astrojs/cloudflare — adapter, image service, platform proxy
Clone & Run#
git clone https://github.com/Hann8n/orbyt-site.git
cd orbyt-site
npm install
npm run dev
Contributing#
- Fork the repo
- Create a branch (
git checkout -b fix/somethingorgit checkout -b feature/something) - Make your changes
- Open a PR against
main
Attributions#
- Figtree font by Erik Kennedy — SIL Open Font License
- HLS.js — Apache 2.0
- Skeleton CSS by Dave Gamache — MIT
- normalize.css — MIT
License (MIT)#
See LICENSE for the full license.
Bluesky and AT Protocol are independent projects; this site is not officially affiliated.