Andrzej Mich – Full-Stack Developer
Back to projects

E-commerce · AI · PWA

WrednyKubek.pl – mug shop with an AI advisor

A web app with PWA features, not an app from the Apple or Google store. It runs in any browser, on desktop and mobile, from one codebase — and can be installed on the home screen.

  • Next.js
  • Supabase
  • Stripe
  • Gemini AI
Visit the shop
WrednyKubek.pl – mug shop with an AI advisor

AI

Wredny Doradca – the AI advisor

My first project using AI: the advisor (Google Gemini) chats with the customer and picks a mug to match their personality. Product descriptions are stored as embeddings, so the advisor understands the meaning of a request, not just keywords.

Tech stack

Framework
Next.js 14 · React 18 · TypeScript
The whole site and server in one project, server-side rendering — fast and good for Google
Design
Tailwind CSS · shadcn/ui (Radix) · Lucide
Visual design, light and dark mode
Hosting
Vercel
Servers and CDN; every git push publishes a new version
Database
Supabase (PostgreSQL)
Products, orders, categories, variants, discounts, reviews, shipping (about 20 tables, 25 migrations)
Login
Supabase Auth
Customer accounts and the ADMIN role
Files
Supabase Storage
Product, colour and banner images
Payments
Stripe Checkout
Card, BLIK, Przelewy24, Google Pay, Apple Pay
Email
Resend + React Email
Order confirmation for the customer and payment notification for the owner
AI
Google Gemini 2.5 Flash Lite + embeddings
Wredny Doradca: chat and mug matching by personality
Mug editor
Konva (canvas)
Personalisation: custom text, photos and fonts on the mug
Images
sharp
Every uploaded image is converted to WebP (max 1600 px)
Cart
Zustand
Stored in the browser, survives closing the page
Validation
Zod
Server-side data checks (orders, products)

What the shop can do

  • Catalogue with categories, a price filter, search that works without Polish diacritics, favourites and badges (“Bestseller”, “Perfect gift”).
  • Product page: zoomable gallery, 330/450 ml sizes, colours with stock levels, artwork versions, reviews.
  • Personalisation editor: customers design their own mug (text, photos, fonts).
  • Cart with a “how much to free delivery” bar, “buy X, get Y” promotions and discount codes.
  • Checkout with or without an account: InPost (locker and courier), DPD, international shipping.
  • Customer account: orders, saved designs, favourites.
  • The AI advisor and a WhatsApp button with a ready-made message.
  • An 18+ gate for adult categories.
  • PWA: install on a phone with shortcuts to the Shop, Editor and Cart.

Admin panel

  • Products: add and edit, images, descriptions, prices, sales, variants.
  • Variants: global mug colours with photo, stock level and price.
  • Categories: hierarchy, visibility, 18+ flag.
  • Orders: list, shipping details, labels, export.
  • Delivery: methods, prices, quantity tiers, free-delivery threshold, international countries.
  • Discounts and promotions: percentage, amount and free-delivery codes (synced with Stripe).
  • Banners, promo bar, TikTok, reviews and users.

Security

  • Payments are handled entirely by Stripe — card data never reaches the shop's server.
  • Stock is deducted only after payment is confirmed (Stripe webhook), with protection against selling the same item twice.
  • Amounts, discounts and delivery are re-checked on the server.
  • Row-level security (RLS): customers see only their own data, only the admin can write.
  • The panel lives at an unlisted address, for the ADMIN role only (checked twice); HTTPS enforced (HSTS) and embedding in frames blocked.

The admin panel in practice

Click an image to enlarge it and browse the gallery.

Data in the screenshots (orders, customers, amounts) is sample data and has been altered to protect customers and the shop.

Want a similar shop?

Tell me what you sell and I'll propose a solution fitted to your needs.

Write to me