← All projects
GenAI· Personal tool· In progress· May – Jun 2026

TwitX

A drafting helper for tech posts. Twice a day it pulls what's trending on Reddit, Hacker News and GitHub, writes drafts in the user's own style, and sends them on Telegram for review. It never posts by itself.

Overview

Posting regularly about tech takes a lot of time just to find topics. TwitX runs a pipeline twice a day. It scrapes Reddit, Hacker News and GitHub, keeps what matches each user's topics, and asks an LLM to write drafts using that user's past posts as style examples. The drafts arrive on Telegram and the user decides what to post. It never posts on its own.

Problem

Finding topics and writing drafts every day takes too much time. The goal was help with drafting, not a bot that posts for you.

Approach

A simple relevance score cuts the scraped items down to the top 15 before anything goes to the LLM. The prompt includes the user's past posts and which drafts they liked or skipped. GitHub Actions runs the pipeline on a schedule, so no server has to run all day.

Architecture / how it works

  • Relevance = keyword hits × 10 + log(upvotes + 1) × 5. The top 15 go to the LLM, which keeps the prompt small.
  • On Vercel the function gets killed as soon as the HTTP response is sent, which would drop Telegram replies. A custom dispatchUpdate awaits every bot handler before responding.
  • parseDrafts tries to parse the full JSON array first. If the model got cut off by max_tokens, it rescues whatever complete {} objects it can find.
  • It uses Groq by default, but any OpenAI-compatible provider works by setting AI_BASE_URL / AI_MODEL, with no code changes.
  • A GitHub Actions cron (09:00 and 19:00 UTC) runs the pipeline, which gets around Vercel's short function timeout.

Tech stack

Next.jsTypeScriptExpressPostgreSQLPrismaGroqClerkTelegram Bot APIGitHub Actions

Outcomes

The pipeline works end to end with Telegram. Discord delivery isn't implemented yet (it's just a stub).

Resume

Want my resume?

I share it on request, so you always get the latest version. Drop me an email with a line about the role or why you're asking, and I'll send it over.

devanshpandeyji4321@gmail.com
Write the email →