Skip to content

Synov8/conduit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conduit

Dashboard screenshot

Feed Reddit posts through an ICP (Ideal Customer Profile) embedding model and get alerted when something matches.

Polls configured subreddits every 6s via RSS, embeds both your ICP descriptions and each post's title/body using sentence-transformers/all-MiniLM-L6-v2, compares with cosine similarity, and streams matches to a Trigger.dev stream plus email via Resend.

How it works

                  ┌─────────────┐
   Reddit RSS ──→ │  Embed post  │ ─→ title vector
   /r/devops+...  │  title+body  │ ─→ body vector
                  └─────────────┘
                        │
                        ▼
               ┌─────────────────┐
               │ Compare against │ ─→ cosine similarity × N ICPs
               │ each ICP vector │
               └─────────────────┘
                        │
              ┌─────────┴─────────┐
              ▼                   ▼
      Trigger.dev stream    Resend email
      (new-reddit-posts)    (ICP match alerts)

Setup

1. Trigger.dev

Create a project at trigger.dev, then update the project field in trigger.config.ts with your project ID.

2. Config

cp trigger/config.example.json trigger/config.json
# then edit trigger/config.json with your ICPs and subreddits

trigger/config.json is gitignored — your API keys and ICP details stay local.

Config

All configuration lives in trigger/config.json (see trigger/config.example.json for a template):

{
    "similarityThreshold": 0.5,
    "pollIntervalSeconds": 6,
    "fromEmail": "conduit@example.com",
    "toEmail": "you@gmail.com",
    "redditUserAgent": "server:conduit-icp-watcher:v1.0.0",
    "icps": [
        {
            "name": "Backend Deployment",
            "description": "Developers looking for ways to deploy scalable backend jobs.",
            "subreddits": ["devops", "kubernetes", "docker", "aws"]
        }
    ]
}

Add more ICPs by adding entries to the icps array. Each ICP can target different subreddits. Subreddits are unioned into a single RSS feed, and each post is scored against every ICP.

Field Description
similarityThreshold Minimum score (0–1) to trigger a match
pollIntervalSeconds Seconds between Reddit polls
icps[].name Short label used in emails and logs
icps[].description Full text embedded for similarity matching
icps[].subreddits Subreddit names to watch for this ICP

Environment

Variable Required Description
RESEND_API_KEY Yes Resend API key for email alerts

Deployment

npx trigger.dev@latest deploy

Local dev

npx trigger.dev@latest dev

The model (all-MiniLM-L6-v2) downloads on first run (~90 MB) and caches locally.

Metadata

The task exposes run metadata in the Trigger.dev dashboard:

  • postsProcessed — total posts scored this run
  • totalMatches — total threshold-crossing matches
  • bestResult — highest-scoring post across the entire run

Tech

  • Trigger.dev v3 — long-running task with while-loop polling
  • @huggingface/transformers — ONNX-optimized sentence embeddings (runs locally, no API key)
  • Resend — transactional email
  • rss-parser — Reddit Atom feed parsing

About

Feed Reddit posts through ICP embedding models and get alerted when something matches. Polls subreddits via RSS, scores posts against your ideal customer profiles using sentence-transformers, and sends matches to a Trigger.dev stream + email.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors