โšก 100% OPEN SOURCE ๐Ÿง  ZERO CLOUD AI FEES โ€ข RUNS LOCALLY VIA OLLAMA ๐ŸŽฏ 5-BOARD INTELLIGENT CATEGORIZER ๐Ÿ›ก๏ธ SELF-CORRECTING AI VERIFIER ๐Ÿงผ STEALTH AI METADATA STRIPPER โฐ 5 DAILY SCHEDULED SLOTS โ˜๏ธ SUPABASE 24/7 CLOUD SYNC ๐Ÿ“Š REAL-TIME GOOGLE SHEETS LOGGER โญ STAR US ON GITHUB โšก 100% OPEN SOURCE ๐Ÿง  ZERO CLOUD AI FEES โ€ข RUNS LOCALLY VIA OLLAMA ๐ŸŽฏ 5-BOARD INTELLIGENT CATEGORIZER ๐Ÿ›ก๏ธ SELF-CORRECTING AI VERIFIER ๐Ÿงผ STEALTH AI METADATA STRIPPER โฐ 5 DAILY SCHEDULED SLOTS โ˜๏ธ SUPABASE 24/7 CLOUD SYNC ๐Ÿ“Š REAL-TIME GOOGLE SHEETS LOGGER โญ STAR US ON GITHUB
๐Ÿš€ 100% Free & Open Source

Stop paying for AI Pins.
Drop Images. Auto Publish.

An autonomous, self-hosted machine powered by Local Multimodal AI (Qwen2.5-VL). Drop raw images into a folder → the local model analyzes the visual content → writes audited SEO metadata → and publishes them directly to Pinterest via the official v5 API. Zero cloud AI bills.

$ git clone https://github.com/witrfaruk/Pinterest.git

What Exactly Is This Machine?

Most Pinterest automation tools charge $20 to $50/month for simple wrappers that send your images to paid cloud APIs. This project replaces that entirely with a private, high-speed, local pipeline.

๐Ÿง 

Local Multimodal Vision AI

Powered by Qwen2.5-VL (3B) running locally via Ollama. It reads the graphic text, colors, diagrams, and visual themes right on your GPU/CPU with zero cloud API fees.

Ollama โ€ข qwen2.5vl:3b
๐ŸŽฏ

Intelligent 5-Board Categorizer

Instead of dumping all pins into one board, the AI dynamically compares your graphic against all 5 configured Pinterest boards and routes it to the single best board with reasoned intent.

Step 8 Classification
๐Ÿ›ก๏ธ

Self-Correcting AI Verifier

Pinterest strictly penalizes truncated metadata. Step 9 runs an automated rewrite loop that audits every title (≤100 chars), description (≤500 chars), and alt text (≤500 chars) before upload.

Up to 3x Rewrite Loops
โฐ

Fixed Daily Peak Slots

Automated cron engine schedules pins for fixed high-engagement slots (17:30, 19:30, 21:30, 23:30, and 01:30 IST). Never spamming or triggering spam flags.

Cron Scheduler Engine
โ˜๏ธ

Supabase 24/7 Cloud Queue

Images dropped in your local folder are immediately pre-processed and synced to Supabase Storage & Database queue, letting you schedule dozens of pins in advance without leaving your PC awake.

Supabase S3 & pg_cron
๐Ÿ“Š

Live 10-Col Google Sheets Sync

Every publish attempt and success is automatically appended to a 10-column Google Spreadsheet (Date, Post Name, Time, Tries, Title, Description, Alt Text, Board, Board ID, Status).

Official Google Sheets API
๐Ÿ›ก๏ธ

Stealth AI & EXIF Metadata Remover

Social platforms like Pinterest inspect uploaded files for hidden AI generator tags, prompt parameters, Midjourney/DALL-E software markers, C2PA credentials, and EXIF camera data. Before uploading to Supabase Storage or Pinterest API, our high-speed Sharp engine automatically scrubs all EXIF, XMP, IPTC, and generator chunks โ€” leaving only 100% clean, native pixel data.

Sharp Pipeline โ€ข Zero AI Tags Preserved

How An Image Moves Through The Machine

Step 1

๐Ÿ“ฅ Drop Image

Drop raw JPG/PNG/WebP into your Images/ folder.

Step 2

๐Ÿง  Ollama Vision

Qwen2.5-VL analyzes the graphics and extracts key concepts.

Step 3

โœ๏ธ Metadata Gen

Generates click-worthy title, description, tags & alt-text.

Step 4

๐ŸŽฏ Classify Board

Picks the single best target board out of your 5 boards.

Step 5

๐Ÿ›ก๏ธ AI Verifier

Strictly audits character limits and accuracy loops.

Step 6

๐Ÿงผ Scrub AI Tags

Strips all EXIF, XMP, IPTC & AI generator markers via Sharp.

Step 7

๐Ÿš€ Pinterest v5 API

Uploads media & creates official Pin via verified v5 API.

Step 8

๐Ÿ“Š Google Sheet

Appends real-time row to spreadsheet tracker.

Step 8

๐Ÿ—‘๏ธ Safe FIFO Delete

Image removed only after HTTP 201 Created is confirmed.

What Things Are Needed?

Before you hit run, ensure you have these 4 tools ready. Everything is 100% free or uses standard developer tiers.

1. Node.js (v18+ or v20+)

Required

The core engine is built on modern ESM Node.js using native fetch, file watchers, and Express.

node -v # Should be v18.0.0 or higher

2. Ollama with Qwen2.5-VL

Required

Download Ollama (free local LLM runner) and pull the high-speed 3B multimodal vision model.

ollama pull qwen2.5vl:3b

3. Pinterest Developer App

Required

Register a free developer app at developers.pinterest.com to get your App ID, Secret, and Access Token for the official v5 API.

PINTEREST_APP_ID=... PINTEREST_APP_SECRET=...

4. Supabase Project (Free Tier)

Required

A free Supabase account for cloud storage and the pin_queue Postgres table. Lets you queue pins 24/7.

SUPABASE_URL=... SUPABASE_ANON_KEY=...

5. Google Spreadsheet Live Logging

Optional

If you want live 10-column spreadsheet tracking for clients or analytics, provide your Google Spreadsheet ID and service account credentials in .env.

How To Use The Engine

Setup takes less than 3 minutes. Follow these simple steps to start publishing pins automatically.

01

Clone or Download the Repository

You can either clone the repo with Git or click the ZIP download button below.

git clone https://github.com/witrfaruk/Pinterest.git
cd Pinterest/code
02

Install Dependencies

Navigate inside the code/ folder and install the required npm libraries.

npm install
03

Configure Your Environment (.env)

Copy .env.example to .env in the code/ folder and add your credentials:

PORT=3000
PINTEREST_APP_ID=your_pinterest_app_id
PINTEREST_APP_SECRET=your_pinterest_app_secret
PINTEREST_ACCESS_TOKEN=your_token
OLLAMA_HOST=http://127.0.0.1:11434
OLLAMA_MODEL=qwen2.5vl:3b
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_supabase_key
PUBLISH_SLOTS=17:30,19:30,21:30,23:30,01:30
04

Setup Your 5 Boards (boards.json)

In code/backend/boards.json, paste your 5 Pinterest board IDs, names, and topics. The AI uses this to route every pin to the right place.

05

Start the Engine & Drop Images!

Launch the machine. Drop any batch of images into the Images/ folder. The auto-watcher detects them within 5 seconds and handles the entire workflow.

npm start

Open http://localhost:3000 in your browser to view your live visual dashboard!

06

Push Secrets to Supabase Cloud (For 24/7 Publishing)

To let Supabase Edge Functions and cron workers publish pins on schedule even when your computer is shut down, push your secrets to Supabase Cloud:

โšก Option 1: One-Command CLI Push (Fastest)
# 1. Login to Supabase CLI
npx supabase login

# 2. Link your project (find project-ref in your Supabase project URL)
npx supabase link --project-ref your_project_ref_id

# 3. Push all secrets from your .env in one single command!
npx supabase secrets set --env-file code/.env
๐Ÿ–ฅ๏ธ Option 2: Supabase Web Dashboard

1. Open your project on supabase.com/dashboard.
2. Go to Project Settings → Edge Functions → Secrets.
3. Click "Add new secret" and save:

PINTEREST_ACCESS_TOKEN=your_pinterest_token
PINTEREST_APP_ID=your_app_id
PINTEREST_APP_SECRET=your_app_secret
DASHBOARD_PASSWORD=your_dashboard_password

Ready To Automate Your Pinterest?

Grab the complete, verified open-source codebase. Drop your first image into Images/ and let local AI do the rest.