Skip to content

patrixmyth/Contrails

 
 

Repository files navigation

Contrails

Contrails is an ATProto Feed Generator backed by Cloudflare Workers and Bluesky Search.

Edit CONFIG.md to define your feed generator.

Deploy right from GitHub Actions.

A Post

[Holds hand to earpiece] I'm being told Bluesky Search is now called Palomar. RIP thecloud, we hardly knew ye.

Requirements

  • Bluesky Social account
  • GitHub account (Sign up or Login)
  • Cloudflare account (Sign up or Login)
  • A moderate-to-high tolerance for adventure

Installation & Configuration: The Short Version

  1. Create a Cloudflare Worker
  2. Create a Cloudflare API Token (the Edit Workers template is fine)
  3. Create a Bluesky App Password
  4. Fork this repository
  5. Set the following in your fork:
  • Variables: BLUESKY_HANDLE, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_WORKER_NAME
  • Secrets: BLUESKY_APP_PASSWORD, CLOUDFLARE_API_TOKEN
  1. Edit CONFIG.md in your fork
  2. Run Check Requirements GitHub Action in your fork
  3. Run Deploy to Cloudflare GitHub Action in your fork
  4. Run Publish Feed Generator GitHub Action in your fork

Installation & Configuration: Director's Cut

INSTALL.md under-construction.gif

Publishing Diagram

flowchart LR
    subgraph Bluesky
        PDS["PDS"]
    end
    subgraph GitHub
        subgraph MD_Config["CONFIG.md"]
            searchTerms
        end
        subgraph CloudflareDeploy["Cloudflare Deploy"]
            Worker_JS
            CloudflareApiToken("CLOUDFLARE_API_TOKEN")
            CloudflareAccountID("CLOUDFLARE_ACCOUNT_ID")
            CloudflareWorkerName("CLOUDFLARE_WORKER_NAME")
        end
        subgraph BlueskyDeploy["Bluesky Deploy"]
            PublishFeedGenerator
            BlueskyHandle("BLUESKY_HANDLE")
            BlueskyAppPassword("BLUESKY_APP_PASSWORD")
        end
        MD_Config --> Worker_JS["worker.js"]
        MD_Config --> PublishFeedGenerator["publishFeedGenerator.ts"]
    end
    subgraph "Cloudflare Worker"
        CloudflareWorker[worker.js]
    end
    CloudflareDeploy -->|Deploy to Cloudflare| CloudflareWorker
    BlueskyDeploy -->|Publish Feed Generator| PDS
Loading

Query Diagram

sequenceDiagram
    actor CoffeeTeaLover
    participant Bluesky
    participant Cloudflare as Cloudflare Worker
    participant Bluesky Search
    CoffeeTeaLover->>+Bluesky: get Coffee&Tea custom feed
    Bluesky->>+Cloudflare: get Coffee&Tea custom feed
    Cloudflare->>+Bluesky Search: search "coffee" and "tea"
    Bluesky Search->>+Cloudflare: posts matching "coffee" and "tea"
    Cloudflare->>+Bluesky: IDs of posts matching "coffee" and "tea"
    Bluesky->>+CoffeeTeaLover: posts for Coffee&Tea custom feed
Loading

LICENSE

2-Clause BSD

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 38.0%
  • Python 31.8%
  • TypeScript 30.2%