Overview
I built this proof-of-concept to turn raw affiliate deal submissions into structured, reviewable, and publication-ready data through a single API workflow.
The pipeline accepts an unstructured deal, removes unrelated tracking parameters, extracts product information with an LLM under a strict schema, applies the appropriate affiliate-routing rule, and returns a clean payload for a downstream publisher or webhook.
The workflow
Ingest and sanitize — A FastAPI endpoint receives raw deal text and isolates the destination URL.
Extract structured data — Groq processes the content using a Pydantic-compatible JSON schema for product name, price, store, and optimized title.
Route affiliate links — Deterministic Python logic adds the configured tracking structure for supported networks while preserving unmapped links for review.
Review and publish — A lightweight dashboard presents the formatted result and prepares it for Telegram, Slack, or another webhook destination.
Reliability safeguards
• Strict structured output instead of free-form LLM responses
• Input validation with Pydantic
• Exponential backoff for temporary API errors
• Clear handling of unsupported stores
• Containerized local setup with Docker
• Separation between AI extraction and deterministic link routing
Why it matters
The project demonstrates how a repetitive content operation can be converted into a reusable API pipeline without letting the LLM control business-critical routing rules. AI handles interpretation and copy assistance; deterministic code handles URL construction and validation.
Stack
Python, FastAPI, Pydantic, Groq API, Tenacity, HTML/JavaScript, and Docker.
This is a portfolio proof-of-concept. Production deployment, network credentials, publishing integrations, and scale requirements are defined separately for each client.
0 likes · 1 view · Nov 14, 2026
A FastAPI workflow that turns raw affiliate deals into validated JSON, clean routing rules, AI-assisted copy, and reviewable publishing payloads.