About the client
PyziSmakosz is a modern Progressive Web App built for the PyziPyzi pastry shop (Kamila Kowalska). The app revolutionized the loyalty program of a traditional pastry shop, connecting the offline world (in-store visits) with online (a WooCommerce store) and using artificial intelligence to verify purchases.
The challenge
The PyziPyzi pastry shop ran a traditional loyalty program based on paper cards with stamps. The system caused numerous operational problems - from lost cards to a complete lack of customer data.
Lost cards - customers lost them right before earning a reward
Zero data - no information about customers and their preferences
Two separate worlds - separate online (WooCommerce) and offline customer bases
No communication channel - no way to send promo notifications
No targeting - every customer treated the same
100% digitalization of the loyalty program
One customer base for online + offline
25% increase in returning customer retention
Building a contact base with marketing consents
App load time under 3 seconds
The solution
1. System architecture
We built a three-tier PWA with a clear separation of concerns: presentation layer (React 18 + TypeScript), logic layer (Supabase Edge Functions) and data layer (PostgreSQL + Auth + Storage).
Discovery and Research (Weeks 1-2)
Analysis of the current process (in-store shadowing), customer interviews, WooCommerce technical audit, user journey mapping
UX/UI Design (Weeks 2-3)
Wireframes for 3 user roles, a design system aligned with PyziPyzi branding, mobile-first, Dark/Light mode
Frontend Development (Weeks 3-5)
React + TypeScript + Vite, shadcn/ui components, PWA setup (manifest, service worker, icons), authentication and role system
Backend Development (Weeks 4-6)
PostgreSQL database schema, Row Level Security (RLS), Edge Functions (SMS, AI verification, WordPress sync), WordPress API integration
Integrations and Launch (Weeks 6-8)
Google Gemini AI, SMSapi.pl, two-way WordPress sync, GTM + Consent Mode v2, testing and deployment on Cloudflare Pages
2. Customer-facing features
The app delivers a complete loyalty ecosystem with three user roles: customer, employee and administrator.
-
Digital loyalty card
Animated stamps, a QR code for in-store identification, activity history and a collection of completed cards -
Reward system
5th stamp = -20% discount, 7th = SMS reminder, 9th = a free "KILOO CIACHO" treat - the card resets automatically after redemption -
Gamification
A collection of completed cards with a "PyziPozeracz" leaderboard - motivation to come back -
"What's fresh today?"
A baking schedule for every day of the week - up-to-date information about the current offer
3. Employee and admin panel
-
QR scanner with retry
A retry mechanism with exponential backoff, delayed initialization and an isStarting state - reliable scanning on 95%+ of devices -
Admin dashboard
Statistics, leaderboards, charts, user management, bulk SMS sending, CSV export -
GDPR consent management
A user_consents table with timestamps, a customer panel for managing consents and a "Delete account" feature
4. Technical challenges
A WP plugin capturing passwords during login
A sync-from-wordpress Edge Function
Automatic account creation in Supabase Auth
Two-way sync - changes propagate back to WP
Google Gemini Vision API - OCR + context analysis
Verification: shop name, date, amount, products
Automatic stamp granting or rejection
Customers earn stamps with no employee involvement
Technologies
TypeScript
Vite
Tailwind CSS
shadcn/ui
Framer Motion
Supabase (PostgreSQL + Auth)
Edge Functions (Deno)
Row Level Security
Google Gemini AI
SMSapi.pl
Web Push API (VAPID)
WordPress REST API
Cloudflare Pages
Google Tag Manager
Consent Mode v2
Results
PyziSmakosz is an example of a successful digital transformation of a traditional business. The project covered building a PWA (React + TypeScript + Supabase) with a digital loyalty program, receipt verification via Google Gemini AI, Single Sign-On with the existing WooCommerce store, Push/SMS notifications, gamification (leaderboards, card collections) and full GDPR compliance. The app eliminated paper cards, increased customer identification from 20% to 100% and enabled SMS contact with 85% of the customer base.