Skip to content

Falasefemi2/cronforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cronforge

Cronforge is a scheduled article delivery system that fetches articles from Dev.to and sends one to your inbox every day.

How it works

On startup, Cronforge fetches the latest TypeScript articles from Dev.to and stores them in a PostgreSQL database. A cron job runs every day at 9am, picks one unread article, and enqueues an email job. A background worker picks up the job and sends the article to your inbox via Resend.

Flow

  1. Startup fetches articles from Dev.to and stores them in the database
  2. Cron runs daily at 9am
  3. One unsent article is picked from the database
  4. Email job is enqueued with the article content
  5. Worker sends the email via Resend
  6. Article marked as sent in the database

Stack

  • Bun
  • TypeScript
  • PostgreSQL
  • Resend
  • Effect-ts

Tables

  • jobs - background job queue
  • articles - articles fetched from Dev.to with sent tracking

Setup

  1. Clone the repository
  2. Run bun install
  3. Create a PostgreSQL database
  4. Copy .env.example to .env and fill in your values
  5. Run bun run index.ts

Environment variables

DATABASE_URL=postgresql://user:password@localhost:5432/cronforge RESEND_API_KEY=your_key_here EMAIL_FROM=you@yourdomain.com RECIPIENT_EMAIL=you@yourdomain.com

About

Cronforge is a scheduled article delivery system that fetches articles from Dev.to and sends one to your inbox every day.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors