{"id":50707907,"url":"https://github.com/nurodev/ryddit","last_synced_at":"2026-06-09T13:01:21.987Z","repository":{"id":361661086,"uuid":"1255086362","full_name":"NuroDev/ryddit","owner":"NuroDev","description":"Improves Reddit embeds for services such as Discord","archived":false,"fork":false,"pushed_at":"2026-05-31T13:27:49.000Z","size":149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T18:33:29.511Z","etag":null,"topics":["cloudflare","embeds","og","opengraph","reddit","workers"],"latest_commit_sha":null,"homepage":"https://ryddit.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NuroDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T11:42:49.000Z","updated_at":"2026-05-31T13:29:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NuroDev/ryddit","commit_stats":null,"previous_names":["nurodev/ryddit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NuroDev/ryddit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fryddit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fryddit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fryddit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fryddit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NuroDev","download_url":"https://codeload.github.com/NuroDev/ryddit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NuroDev%2Fryddit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","embeds","og","opengraph","reddit","workers"],"created_at":"2026-06-09T13:01:14.683Z","updated_at":"2026-06-09T13:01:21.978Z","avatar_url":"https://github.com/NuroDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]  \n\u003e This project is still a work-in-progress while I wait for Reddit to approve my app\n\n# ryddit\n\nRich link previews for Reddit. Share a Reddit link on Discord, Telegram, Slack,\nor anywhere else that unfurls links, and get a proper embed - title, author,\nimage, gallery, or inline video - instead of Reddit's bare preview.\n\nIt's the Reddit equivalent of [fxtwitter](https://github.com/FixTweet/FixTweet)\n/ fxreddit, running on Cloudflare Workers.\n\n## Usage\n\nSwap `reddit.com` for `ryddit.com` in any post link:\n\n```\nhttps://www.reddit.com/r/memes/comments/abc123/some_post/\n→ https://ryddit.com/r/memes/comments/abc123/some_post/\n```\n\nPaste that into a chat app and it unfurls with a rich embed. Open it in a\nbrowser and you're redirected straight to the original Reddit post - the embed\nis only served to link-preview crawlers.\n\n## How it works\n\n```\nrequest\n   │\n   ├─ link-preview crawler (Discordbot, Telegrambot, …)?\n   │     └─ fetch the post from Reddit → render OpenGraph/Twitter-Card HTML\n   │\n   └─ real browser?\n         └─ 302 redirect to the original Reddit URL (no API call)\n```\n\n- **Crawler detection** is by `User-Agent`. Crawlers get HTML full of\n  OpenGraph/Twitter meta tags (plus an [oEmbed](https://oembed.com/) endpoint for\n  the author/provider byline); everyone else is redirected, so humans never cost\n  an API call.\n- **Authenticated Reddit access.** Reddit now `403`-blocks unauthenticated\n  `.json` scraping, so ryddit reads via **app-only OAuth** (`client_credentials`)\n  against `oauth.reddit.com`. The access token is cached (in-memory + a KV\n  namespace) and auto-refreshed.\n- **Media.** Handles text, images, galleries, and native `v.redd.it` video\n  (served via a `/v/` proxy that redirects to Reddit's MP4). NSFW posts are\n  rendered without leaking a thumbnail.\n- **Caching.** Crawler embeds are edge-cached (Cloudflare Cache API), keyed so a\n  crawler embed is never served to a browser and vice versa.\n\n## Self-hosting\n\nYou'll need a Cloudflare account and a Reddit app.\n\n1. **Register a Reddit app** at [developers.reddit.com](https://developers.reddit.com)\n   (a confidential \"web\"/\"script\" app) to get a client ID and secret.\n2. **Set the secrets:**\n   ```sh\n   wrangler secret put REDDIT_CLIENT_ID\n   wrangler secret put REDDIT_CLIENT_SECRET\n   ```\n   For local dev, copy `.example.env` → `.env` and fill them in.\n3. **Create the token-cache KV namespace** and paste its id into `wrangler.jsonc`:\n   ```sh\n   wrangler kv namespace create TOKENS\n   ```\n4. **Edit `wrangler.jsonc`** - set `REDDIT_USER_AGENT` (Reddit requires a unique,\n   descriptive UA) and the `route` to your own domain.\n5. **Deploy:**\n   ```sh\n   pnpm deploy\n   ```\n\n## Development\n\n```sh\npnpm install\npnpm dev          # local server (wrangler dev)\npnpm test         # vitest\npnpm typecheck    # tsc\npnpm check        # oxfmt + oxlint\n```\n\nTo preview an embed locally, request it as a crawler (a normal browser request\njust redirects):\n\n```sh\ncurl -sA 'Discordbot/2.0' http://localhost:8787/r/memes/comments/abc123/some_post\n```\n\n## Built with\n\n[Hono](https://hono.dev) on Cloudflare Workers, [Zod](https://zod.dev),\n[better-result](https://www.npmjs.com/package/better-result), Hono JSX, and\n[Vitest](https://vitest.dev) with [MSW](https://mswjs.io).\n\n## Credits\n\nThe original project idea and structure come from\n[**fxreddit** by MinnDevelopment](https://github.com/MinnDevelopment/fxreddit).\nryddit is an independent reimplementation; all credit for the concept goes there.\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurodev%2Fryddit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnurodev%2Fryddit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurodev%2Fryddit/lists"}