CraftWeb
Loader image Loader image Loader image Loader image Loader image Loader image Loader image
0 %
Loading

John Dog

Six years of continuous WooCommerce plus a production AI layer on top

E-commerce + AI WooCommerce PHP + ACF FastAPI
Qdrant Gemini 3 RODO-clean

/ Overview

Two repos, one platform. Six years of weekly increments on a custom WooCommerce theme, then a production AI monorepo deployed next door on the same VPS. Continuous over greenfield. AI on top, not AI instead of.

See it live

/ Project Details

Category: E-commerce + AI integration

Client: John Dog — built by CraftWeb

Role: Senior dev · Tech Lead · AI Engineer

Timeline: 2020–2026 (6 years continuous)

/ Problem

Pet retail in 2020: WordPress + WooCommerce + half-finished theme. Four carriers half-integrated. Checkout that didn't know about a 25 kg bag of dog food + curbside pickup. 2026: customers wanted to chat-with-an-AI-that-knows-the-catalogue. Generic chatbot widgets hallucinate prices in week two.

/ TL;DR

6 years

Continuous WooCommerce service since 2020 — no rewrite, no Shopify migration.

4 carriers

Allegro API + DHL + InPost Paczkomaty + Paczka w Ruchu, real-time label printing.

5 AI apps

Chatbot + dashboard + ranking + translator + webui in one monorepo.

V1 → V6

Six iterations of the chat agent on production traffic — ending with 4-layer guardrails.

/ Vision

Continuous over greenfield. WooCommerce, but never "that's how it works". AI on top, not AI instead of. GDPR is a feature, not a footer. Four principles. Six years of stable production.

/ Principles

Continuous over greenfield

The theme isn't rewritten every year. It's kept alive with weekly increments.

Drop down to PHP + ACF when needed

When the standard plugin can't model the business, drop down to PHP + ACF + custom templates rather than bend the business to the plugin.

AI on top, not AI instead of

The chatbot lives next to the store, not inside it. If AI breaks at 3 a.m., commerce keeps running.

GDPR is a feature

Self-hosted fonts, IP whitelisting, SMTP instead of Resend, Presidio DLP on every LLM input — built in from commit zero.

/ Engineering challenges

4 carriers with 4 label formats. Multi-variant catalogue with guest wishlist that survives logout. Editorial layers (Podcasty, Puppy Zone, blog) inside WooCommerce. Six iterations of the chat agent. RODO-clean self-hosted fonts.

/ 01 — 08

01 — Multi-carrier logistics

4 carriers, 4 label formats, 4 printer APIs. Custom PHP modules per carrier in their own folders. Allegro API handles SKU sync, label generation, printer queue.

02 — Multi-variant catalogue + guest wishlist

Native WC variants unwieldy past 5 attributes. Fix: ACF-based linked-product variants (each variant a real product). Cookie-based guest wishlist with merge-on-login (4f03538, 45e6aa9, e6d748a).

03 — Editorial layers on top of catalogue

7-category podcast submenu with SVG mask icons, Puppy Zone custom CPT aggregator (1d0b01d), blog ACF field groups, coupon banner toggle (80a3239).

04 — Cross-sell stock filtering in cart popup

Popup recommended out-of-stock items. Fix (0491a89, 27b9994): stock filter joins on stock status, popup only renders available SKUs.

05 — Mobile UX + @supports :has()

Checkout uses :has(); older browsers fail silently. Fix (8fb28be): @supports selector(:has(*)) browser detection with fallback warning. iOS zoom-trap font-size 16px+.

06 — Performance — Webpack 5 + Brotli

High-SKU catalogue page-weight ballooned. Fix: Webpack 5.105.4 + compression-webpack-plugin (Brotli + Gzip), file versioning (d973893), vanilla-lazyload 19.1.

07 — AI agent reliability — V1 to V6

Naive Gemini had 6 failure modes. V5 question-first with species-aware slot extraction. V6 early-show balanced (turn-0 products + compact tool results 75K→5K tokens). 4-layer guards. 80+ s → 15–25 s.

08 — Widget RODO + CSS isolation

Google Fonts leaks IP before consent (LG München 2022 precedent). Fix (a8360e0, JD-139): self-hosted Oswald + Cooper Hewitt. Z-index sandboxed to 1998/1997.

/ Stack

Theme: WP + WooCommerce 10.7, PHP 8, ACF Pro + 44 field groups, Allegro API + 4 carriers, FiboSearch, Webpack 5. AI: FastAPI + Pydantic + async SQLAlchemy, Gemini 3-flash + 2.5-flash + 3.1 Pro, Qdrant (5 collections), Presidio DLP.

/ Tech

WordPress + WooCommerce 10.7

PHP 8. ACF Pro + 44 field groups. 20+ custom functions/ modules.

Allegro API + 4 carriers

DHL + InPost + Paczka w Ruchu. Real-time label printing, warehouse scanner integration.

Webpack 5 + Laravel Mix + Brotli

Self-hosted Oswald + Cooper Hewitt (RODO). FiboSearch + vanilla-lazyload.

FastAPI + Pydantic + async SQLAlchemy

5 AI apps: chatbot widget + dashboard + ranking + translator + webui.

Gemini 3-flash / 2.5-flash / 3.1 Pro

Gemini per workload: chat, tool decisions, ranking. OpenAI fallback for embeddings.

Qdrant (5 collections)

products_pl_v3, knowledge, glossary, … SQLite via aiosqlite. slowapi rate limit.

Microsoft Presidio (PII filter)

DLP on every LLM input. RODO-clean from commit zero.

React 19 + Vite 7 + Docker + nginx

Frontends for 5 AI apps. Mikrus VPS hosts theme + AI side-by-side.

/ Six-year timeline

From custom WooCommerce theme to a 5-app AI monorepo. Weekly increments, no rewrite, year over year. 2020 launch → 2026 AI layer.

/ 6 phases

2020 — Launch

Custom WooCommerce theme commissioned, weekly increment cadence started immediately.

2021 — Logistics build-out

Allegro API + label printing + warehouse scanner, DHL/InPost overrides.

2022 — Catalogue scale

ACF-based linked variants, FiboSearch, Webpack 5 + Brotli (page weight halved).

2023–2024 — Editorial surface

Puppy Zone CPT, podcasty (7 categories), blog with taxonomy, cross-sell popup.

2025 — UX polish

Guest wishlist persistence, mobile (100dvh, iOS zoom trap), @supports :has(), z-index refactor.

2026 — AI layer

johndog-ai monorepo, V1→V6 chatbot iteration, dashboard + BOK email + ranking + translator + webui.

/ Results

Six years of continuous operation, no rewrite, 99.8% uptime. 4 carriers in live production, hundreds of conversations a day through the chatbot, zero hallucinations after V6.

/ Numbers

6 years uninterrupted

No rewrite, no downtime above 1 h. 99.8% uptime (VPS + Docker).

4 carriers live

Thousands of SKUs across multi-variant catalogue, label printing automated.

100s/day conversations

Through chatbot, 0 hallucinations after V6 + 4-layer guards.

15–25 s response

Chat response time down from 80+ s. BOK SLA <2 h via batch sentiment every 30 min.

WooCommerce
PHP + ACF
Allegro API
FastAPI
Gemini
Qdrant
Presidio
Webpack 5
Docker + nginx
RODO-clean