TechBlog

The Daily Dev-Value Factory

An automated, implementation-focused developer news engine. Every evening a GitHub Actions pipeline:

  1. Discovers the top 10 news items across 5 categories using Gemini 1.5 Pro with Google Search grounding
  2. Writes 50 Medium-style developer blog posts using Gemini 1.5 Flash
  3. Renders 4-card Instagram carousels per item using Playwright (1080×1080 PNG)
  4. Deploys an Astro static site to GitHub Pages with Dark Mode + Pagefind search
  5. Emails a ZIP of all social assets to the admin via Gmail SMTP

Total AI cost: ~$0.003/day (Gemini Flash at $0.075/1M tokens × 50 posts).


Project Structure

├── automation/
│   ├── researcher.py      # Gemini 1.5 Pro: grounded discovery
│   ├── writer.py          # Gemini 1.5 Flash: blog posts + card data
│   ├── image_gen.py       # Playwright: PNG carousel renderer
│   ├── mailer.py          # Gmail SMTP: ZIP delivery
│   ├── requirements.txt   # Python deps
│   └── templates/
│       └── insta_card.html  # Analytics Vidhya-style card template
├── src/
│   ├── content/
│   │   ├── config.ts      # Astro content collection schema
│   │   └── blog/          # Generated Markdown posts live here
│   ├── components/
│   │   ├── Header.astro   # Search + theme toggle + "maintained by" banner
│   │   ├── NavLeft.astro  # Date-based navigation (week/day groups)
│   │   ├── AdsRight.astro # AdSense + portfolio CTA
│   │   └── PostCard.astro # Blog post card for the grid
│   ├── layouts/
│   │   ├── MediumLayout.astro  # Article page (prose + sidebars)
│   │   └── BaseLayout.astro    # Index/list page
│   ├── pages/
│   │   ├── index.astro         # Home + filter grid
│   │   └── blog/[...slug].astro
│   ├── styles/global.css
│   └── site.config.ts     # Site name, URLs, AdSense ID, GoatCounter code
├── .github/workflows/
│   └── main.yml           # The nightly cron (20:00 UTC)
├── astro.config.mjs
├── tailwind.config.mjs
├── tsconfig.json
└── package.json

Quick Start

1. Configure site identity

Edit src/site.config.ts:

export const SITE = {
  name: "The Daily Dev-Value Factory",
  author: "Your Name",
  portfolio_url: "https://your-site.com",
  linkedin_url:  "https://linkedin.com/in/you",
  adsense_id: "",   // leave empty to disable
  goat_code:  "",   // leave empty to disable
};

2. Set GitHub Secrets

Secret Description
GEMINI_API_KEY Google AI Studio API key
GMAIL_USER Gmail address used to send
GMAIL_APP_PASS Gmail App Password
ADMIN_EMAIL Where the daily ZIP is delivered

3. Enable GitHub Pages

Go to Settings → Pages → Source: set to GitHub Actions.

4. Run locally

# Frontend dev server
npm install
npm run dev

# Run the full pipeline locally (needs GEMINI_API_KEY in env)
pip install -r automation/requirements.txt
playwright install chromium
python automation/researcher.py
python automation/writer.py
python automation/image_gen.py
python automation/mailer.py

Tech Stack

Layer Tool
Research AI Gemini 1.5 Pro (Google Search grounded)
Writing AI Gemini 1.5 Flash
Image rendering Playwright (headless Chromium)
Frontend Astro 4.x + Tailwind CSS
Search Pagefind (fuzzy, client-side)
Analytics GoatCounter (privacy-first)
Monetisation Google AdSense (config-driven)
Email Gmail SMTP TLS
Hosting GitHub Pages (free)

Gemini Prompt Philosophy

All prompts enforce an anti-AI writing style:


License

MIT