Initial commit: Daily tech newsletter worker

A Node.js/TypeScript worker that sends daily AI-generated summaries
of tech news from X/Twitter via Nitter RSS feeds.

Features:
- Fetches tweets from 40+ curated tech accounts via Nitter RSS
- Filters and categorizes by topic (AI/ML, SWE, General Tech)
- Generates AI summaries using OpenRouter (Claude/GPT-4)
- Sends professional HTML email via Brevo SMTP
- Runs on cron schedule inside Docker container
- Instance rotation for Nitter reliability
- Graceful degradation if AI fails

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-11 20:23:38 +00:00
commit b3643fd5b0
23 changed files with 2091 additions and 0 deletions

51
package.json Normal file
View File

@@ -0,0 +1,51 @@
{
"name": "x-newsletter",
"version": "1.0.0",
"description": "Daily tech newsletter from X/Twitter via Nitter RSS feeds with AI summaries",
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "tsx src/index.ts",
"run-now": "tsx src/index.ts --run-now",
"dry-run": "tsx src/index.ts --run-now --dry-run"
},
"keywords": [
"newsletter",
"twitter",
"x",
"rss",
"ai",
"automation"
],
"author": "",
"license": "MIT",
"dependencies": {
"axios": "^1.7.9",
"date-fns": "^4.1.0",
"date-fns-tz": "^3.2.0",
"dotenv": "^16.4.7",
"he": "^1.2.0",
"node-cron": "^3.0.3",
"nodemailer": "^6.9.16",
"openai": "^4.77.0",
"pino": "^9.6.0",
"rss-parser": "^3.13.0",
"sanitize-html": "^2.14.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@types/he": "^1.2.3",
"@types/node": "^22.10.5",
"@types/node-cron": "^3.0.11",
"@types/nodemailer": "^6.4.17",
"@types/sanitize-html": "^2.13.0",
"pino-pretty": "^13.0.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
},
"engines": {
"node": ">=20.0.0"
}
}