Self-hosted, 100% automated Pinterest publishing machine powered by local Multimodal AI (Qwen2.5-VL), stealth AI metadata scrubbing, and 24/7 cloud scheduling.
Explore Pipeline » · How It Works » · Quick Start » · Boards Setup »
- 🧠 Local Multimodal AI (
qwen2.5vl:3b): Zero cloud AI fees. Analyzes raw images directly on your machine. - 🥷 Stealth AI Metadata Stripper: Cleans all EXIF, XMP, IPTC, and generator parameters using
Sharpbefore uploading, so Pinterest detects clean, natural images. - 🎯 Intelligent Multi-Board Categorizer: Classifies incoming pins into the exact target board based on visual content intent.
- 🛡️ Self-Correcting AI Verifier: Audits and enforces strict Pinterest limits for every title (
$\le 100$ chars), description ($\le 500$ chars), and alt text ($\le 500$ chars) with automatic rewrite loops. - ⏰ 5 Fixed Daily Publishing Slots: Publishes at
17:30,19:30,21:30,23:30, and01:30IST (8:00 AM, 10:00 AM, 12:00 PM, 2:00 PM, 4:00 PM ET). - ☁️ 24/7 Cloud Autonomy: Supabase
pg_cronand Edge Functions publish on schedule even when your computer is turned off. - 🔒 Safe FIFO Clean-up: Local image files in
Images/are automatically deleted only after confirmed upload to Supabase cloud storage.
flowchart TD
A[📂 Drop Pin Images in /Images Folder] --> B[👁️ Step 1: Watcher Detects New File]
B --> C[🥷 Step 2: Sharp Strips All EXIF/XMP/AI Metadata]
C --> D[🧠 Step 3: Local Ollama Vision Analyzes Visual Content]
D --> E[✍️ Step 4: Generate Title, Description, Tags, Alt Text]
E --> F[🎯 Step 5: Classify into Matching Pinterest Board]
F --> G[🛡️ Step 6: Character Limit Verification & Rewrite Loop]
G --> H[☁️ Step 7: Upload Clean Image & Queue to Supabase]
H --> I[🗑️ Step 8: Auto-Delete Local File from /Images]
I --> J[⏰ Step 9: Supabase pg_cron Slot 17:30, 19:30, 21:30, 23:30, 01:30 IST]
J --> K[🚀 Step 10: Edge Function Publishes via Official Pinterest API v5]
Here is the exact step-by-step lifecycle of how pins move from your local PC to published Pinterest pins:
- Create or export your pin images in
.png,.jpg,.jpeg, or.webpformat (recommended vertical aspect ratio:2:3or1000x1500px). - Drop the files directly into the root
Images/folder. - You can drop 1 image or 100 images at once. The engine processes them in First-In-First-Out (FIFO) queue order.
- AI-generated images frequently embed generator tags, prompt metadata, or software signatures in EXIF and XMP chunks.
- The engine runs every image through an automated
Sharpbuffer pipeline with metadata stripping enabled. - All camera headers, GPS coords, AI generation signatures, and color profile junk are purged, producing clean, web-optimized images.
- Local multimodal vision models (
qwen2.5vl:3b) inspect the image visuals. - The AI writes:
-
Click-worthy Title: Focused, keyword-rich headline (
$\le 100$ characters). -
Engaging Description: High-converting summary with hashtags (
$\le 500$ characters). -
Descriptive Alt Text: Accessibility visual summary (
$\le 500$ characters).
-
Click-worthy Title: Focused, keyword-rich headline (
- Compares image concepts against your configured boards in
code/backend/boards.json. - Accurately assigns the pin to the single best board ID.
- Automatically audits all character lengths with a self-correction rewrite loop.
- The scrubbed image is uploaded to your Supabase Storage bucket (
pinterest-queue). - Pin metadata is saved in the Supabase
pin_queuetable withstatus = 'pending'. - The local image in
Images/is automatically deleted to free up local disk space.
- Supabase
pg_crontriggers thepublish-pinEdge Function at your 5 daily slots:17:30 IST(12:00 UTC)19:30 IST(14:00 UTC)21:30 IST(16:00 UTC)23:30 IST(18:00 UTC)01:30 IST(20:00 UTC)
- The Edge Function calls the official Pinterest API v5 (
POST /v5/pins) to publish the pin live. - Your computer does not need to stay on. Once images are queued in Supabase, publishing happens 100% in the cloud!
Configure your target Pinterest boards in code/backend/boards.json:
[
{
"id": "your_board_id_1",
"name": "Make Money",
"topic": "Make Money",
"url": "https://www.pinterest.com/example_pinterest/make-money/",
"instructions": "Side hustles, online income, freelancing, earning extra cash, passive income streams, work from home jobs, monetization."
},
{
"id": "your_board_id_2",
"name": "Save Money",
"topic": "Save Money",
"url": "https://www.pinterest.com/example_pinterest/save-money/",
"instructions": "Money-saving hacks, frugal living tips, cutting expenses, grocery budgeting, deals and discount strategies."
},
{
"id": "your_board_id_3",
"name": "Budgeting",
"topic": "Budgeting",
"url": "https://www.pinterest.com/example_pinterest/budgeting/",
"instructions": "Budget planners, monthly budget systems (50/30/20 rule, zero-based budget, cash envelopes), expense tracking."
},
{
"id": "your_board_id_4",
"name": "Investing",
"topic": "Investing",
"url": "https://www.pinterest.com/example_pinterest/investing/",
"instructions": "Stock market basics, index funds, ETFs, dividend investing, real estate, compound interest, retirement accounts."
},
{
"id": "your_board_id_5",
"name": "Debt & Credit",
"topic": "Debt & Credit",
"url": "https://www.pinterest.com/example_pinterest/debt-credit/",
"instructions": "Credit score improvement hacks, debt payoff strategies (debt snowball and avalanche), credit card management, loans."
}
]Pinterest/
├── Images/ # 📥 Drop Zone: Drop images here (automation processes & cleans them)
├── github/ # 🌐 Neo-Brutalist Landing Page & GitHub Pages assets
│ ├── assets/ # Project logo & favicon assets
│ ├── index.html # Landing page portal (clean URLs, zero hashtags)
│ ├── style.css # Neo-brutalist design system
│ └── script.js # Direct ZIP download & interactions
├── code/ # 💻 All automation engine code & dependencies
│ ├── .env.example # 🔑 Public environment template (zero secrets)
│ ├── package.json # 📦 Dependencies & start scripts
│ └── backend/ # ⚙️ Headless Engine, Ollama AI & Supabase Cloud Sync
│ ├── services/ # Vision AI, Scheduler, Pinterest API, Metadata Stripper & Supabase
│ ├── supabase/ # Cloud Edge Functions, SQL schemas & pg_cron migrations
│ ├── boards.json # Configured Pinterest boards
│ ├── config.js # Centralized limits & environment configuration
│ └── server.js # Express automation service entry point
├── .gitignore # 🔒 Zero secrets leak protection
├── LICENSE # ⚖️ MIT License
└── README.md # 📖 Documentation & setup guide
Copy the example environment configuration:
cp code/.env.example code/.envFill in your credentials in code/.env:
PINTEREST_ACCESS_TOKEN: Official Pinterest API v5 access tokenSUPABASE_URL: Your Supabase project URL (https://your-project.supabase.co)SUPABASE_SERVICE_ROLE_KEY: Service role secret key for bucket and database operations
Navigate into the code/ folder:
cd code
npm install
npm startTo allow Supabase Edge Functions and cron jobs to publish when your computer is off:
# Option A: One-command push via Supabase CLI
npx supabase login
npx supabase link --project-ref your_project_ref_id
npx supabase secrets set --env-file code/.env
# Option B: In Supabase Web Dashboard
# Project Settings -> Edge Functions -> Secrets -> Add PINTEREST_ACCESS_TOKEN- 🌐 Contact Faruk: witrfaruk.vercel.app/social
- ☕ Support on Ko-fi: ko-fi.com/witrfaruk
- ⚖️ License: MIT License