The Problem Nobody Talks About
Thousands of developers publish open-source libraries every month. Most of them have terrible documentation. That gap is a goldmine.
I built a fully automated pipeline using GPT-4 and GitHub Actions that scrapes underserved npm packages, generates professional documentation sites, monetizes them with ads and affiliate links, and earns me $2,400/month with about 2 hours of oversight per week.
Here's exactly how I did it.
The Core Technique: AI-Powered Doc Site Factory
The strategy is simple:
- Find npm packages with 500–5,000 weekly downloads but poor README files
- Auto-generate full documentation sites using AI
- Deploy them to Vercel for free
- Monetize with Carbon Ads and affiliate links to relevant dev tools
Step-by-Step Implementation
Step 1: Find Your Targets
Use the npm registry API to identify candidates:
const response = await fetch(
'https://registry.npmjs.org/-/v1/search?text=keywords:utility&popularity=0.5&quality=0.3&size=50'
);
const packages = await response.json();
const underserved = packages.objects.filter(p =>
p.package.description.length < 80 &&
p.downloads.weekly > 500
);
This surfaces packages people actively use but that lack solid docs.
Step 2: Generate the Documentation
Feed the package source code and README into GPT-4 with a structured prompt:
You are a senior technical writer. Given this npm package source code, generate:
- A full API reference with parameter tables
- 3 practical usage examples
- A troubleshooting section
- SEO-optimized meta description
Format everything in MDX.
GPT-4 produces publication-ready MDX in under 30 seconds per package.
Step 3: Auto-Deploy with GitHub Actions
Your workflow triggers nightly:
name: Doc Factory
on:
schedule:
- cron: '0 2 * * *'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Generate and push docs
run: node scripts/generate-docs.js
- name: Deploy to Vercel
run: vercel --prod --token=${{ secrets.VERCEL_TOKEN }}
Each new site gets its own subdomain: packagename.yourdocshub.com
Step 4: Monetization Stack
- Carbon Ads: $1–4 CPM, developer-focused audience converts well
- Affiliate links: Link to relevant courses on Udemy or tools on RapidAPI
- "Improve these docs" GitHub sponsor button: Some maintainers actually pay
Real Numbers After 6 Months
| Month | Sites Live | Monthly Revenue |
|---|---|---|
| 1 | 12 | $180 |
| 2 | 34 | $490 |
| 3 | 71 | $920 |
| 6 | 190 | $2,400 |
Top performers earn $40–$80/month each. Most earn $8–$15. It's a volume game.
API costs run about $60/month for GPT-4 calls. Vercel and domain costs add another $40. Net margin sits around 95%.
What Makes This Work
The key insight is search intent. Developers Googling packagename examples or packagename API reference have zero ad-block mindset. They want information, they find your clean site, they click contextual ads naturally.
You're not gaming anything. You're genuinely filling a content gap that serves the community.
Getting Started Today
You can validate this in a weekend. Pick 5 packages manually, generate docs with a ChatGPT prompt, deploy to Vercel, and add a Carbon Ads unit. If you get 200 page views in week one, automate the rest.
The automation ceiling is high. I haven't hit it yet.
Top comments (0)