Skip to content
Dimitri Robiere PerrietD. R. PerrietCaen, FR — --:--:--EN · FR

RAG AI chatbot for WordPress and PrestaShop sites

Under contract · Mediapilote● Live
Client
Mediapilote
Role
Full-stack developer
Duration
8 months
Year
2026
Stack
Next.js · TypeScript · Cloudflare Workers · Cloudflare D1 · Cloudflare Vectorize · WordPress · PHP · OpenRouter
RAG AI chatbot for WordPress and PrestaShop sites — illustration
Fig. 01 — RAG AI chatbot for WordPress and PrestaShop sites, illustration
(00) — In short

An AI chatbot for client websites that answers from the site’s own content using RAG, managed from a Next.js platform on Cloudflare with per-client cost limits.

(01)

Context

Mediapilote wanted to offer its clients an AI chatbot able to answer visitors using the content of their own website. The project started in January 2026 as a simple WordPress plugin that called the OpenAI API directly.

That approach meant storing an OpenAI key on every site and gave no way to track costs. The product therefore became a central platform that lightweight plugins for WordPress, WooCommerce, PrestaShop and TYPO3 connect to.

(02)

Challenge

The platform had to isolate each client: its key, its indexed content, its monthly limits and its AI costs, while sharing a single provider account. Client sites are heterogeneous, often cached, sometimes hosted by providers that block streaming.

Answer quality depended on retrieval. Pages, scanned PDFs, product catalogues: the right passage had to be found, and a page a visitor cannot open must never be cited.

(03)

Approach

I built the platform in Next.js with three limit modes per client (cost, usage, number of exchanges), token and cost tracking per model, and remote control of sites through signed webhooks: widget toggle, choice of indexed content, reindexing with progress, plugin updates. Conversations are rated, categorised by AI and exportable to PDF.

The RAG pipeline combines vector and full-text search, document OCR, query rewriting and reranking. In July 2026 I migrated everything from o2switch to Cloudflare in six phases: MySQL to D1, files to R2, vectors to Vectorize, jobs to Workflows, then AI Gateway. For online shops, dedicated tools display product cards and act on the cart.

(04) — Results

Key figures
3
limit modes per client
WordPress · PrestaShop · TYPO3
supported CMSs
6
phases of the Cloudflare migration
209
commits
← Previous project04 · ADS Mediapilote, a Google Ads, Meta and TikTok platformNext project06RAG AI assistant for Starmat and Matplus sales staff