diff --git a/CLAUDE.md b/CLAUDE.md index b0493b2..0176332 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -227,6 +227,21 @@ openssl rand -base64 32 # NEXTAUTH_SECRET and IP_SALT - Image optimization enabled in `next.config.mjs` - Prisma connection pooling recommended for production +## Database Change Policy + +**IMPORTANT: No Prisma migrations.** All database schema changes (new columns, new enum values, new tables) must be applied via raw SQL commands directly against the running PostgreSQL instance. + +Workflow for schema changes: +1. Write the raw SQL (e.g. `ALTER TABLE`, `ALTER TYPE ... ADD VALUE`) +2. Run via Docker: `npm run docker:db` then execute SQL, or use `docker-compose exec db psql -U postgres -d qrmaster -c "..."` +3. Update `prisma/schema.prisma` to match (so Prisma client types stay in sync) +4. Run `npx prisma generate` to regenerate the client (no `migrate`) + +Example — adding an enum value: +```sql +ALTER TYPE "ContentType" ADD VALUE 'BARCODE'; +``` + ## Common Pitfalls 1. **Database Connection**: If "Can't reach database server", ensure Docker is running (`npm run docker:dev`) diff --git a/PLAN_bulk_dynamic_and_barcode.md b/PLAN_bulk_dynamic_and_barcode.md new file mode 100644 index 0000000..62d8e9d --- /dev/null +++ b/PLAN_bulk_dynamic_and_barcode.md @@ -0,0 +1,179 @@ +# Feature Plan: Bulk Dynamic QR + Dynamic Barcode Generator + +## Feature 1: Bulk Generator → Dynamic QR freischalten + +### Ziel +Nutzer können beim Bulk-Import wählen ob sie statische oder dynamische QR-Codes erstellen. Dynamisch = DB-Einträge mit Slugs + Tracking. Nur für PRO/BUSINESS. + +### Aktueller Stand (Ist) +- `bulk-creation/page.tsx` generiert QR-Codes rein client-seitig (kein DB-Eintrag) +- `generateStaticQRCodes()` rendert SVGs lokal via `qrcode`-Library +- `saveQRCodesToDatabase()` sendet an `POST /api/qrs` mit `isStatic: true` — also immer statisch +- Kein Toggle Static/Dynamic vorhanden +- Kein Plan-Check für Dynamic im Bulk-Flow + +### Änderungen + +#### A) Frontend: `bulk-creation/page.tsx` + +1. **Toggle "Static / Dynamic" hinzufügen** (nach Plan-Check) + - Nur sichtbar/aktivierbar wenn `userPlan === 'PRO' || 'BUSINESS'` + - FREE-Nutzer sehen den Toggle gesperrt mit Upgrade-Hinweis + - State: `const [isDynamic, setIsDynamic] = useState(false)` + +2. **Interface erweitern** + ```ts + interface GeneratedQR { + title: string; + content: string; + svg: string; + slug?: string; // nur bei dynamic, nach API-Antwort gesetzt + redirectUrl?: string; // z.B. https://qrmaster.net/r/abc123 + } + ``` + +3. **Generierungslogik aufteilen** + - Static (wie bisher): client-seitig SVG generieren, kein DB-Eintrag nötig + - Dynamic: direkt `POST /api/qrs` pro Eintrag mit `isDynamic: true` → API gibt Slug zurück → QR encodiert `/r/[slug]` statt Original-URL + +4. **Preview-Spalte erweitern** + - Bei dynamic: Slug-Link anzeigen + "Ziel änderbar" Badge + - Download-ZIP enthält QR-SVGs die `/r/[slug]` encodieren + +5. **Limit-Anzeige** + - PRO: max 50 dynamic / Bulk-Run (entspricht QR-Limit) + - BUSINESS: max 500 + +#### B) Backend: `POST /api/qrs` + +Keine strukturelle Änderung nötig — der bestehende Endpunkt unterstützt bereits `isDynamic: false/true` und gibt `slug` zurück. Nur sicherstellen: + +- Plan-Limit-Check zählt korrekt bei Bulk-Erstellung (momentan prüft `POST /api/qrs` nur ob Gesamtanzahl < Limit — das bleibt so, aber Bulk erstellt X Requests nacheinander → ggf. Rate-Limit beachten) +- Evtl. neuen Endpunkt `POST /api/qrs/bulk` der ein Array entgegennimmt und in einer DB-Transaktion schreibt (besser als 500 Einzelrequests) + +#### C) Optionaler neuer Endpunkt: `POST /api/qrs/bulk` (empfohlen) + +```ts +// Body: { qrCodes: Array<{ title, content, contentType, isDynamic }>, plan } +// Response: { created: Array<{ id, slug, redirectUrl }>, failed: number } +// Vorteile: eine DB-Transaktion, ein CSRF-Check, schneller +``` + +Plan-Check: `if (isDynamic && plan === 'FREE') return 403` + +--- + +### Reihenfolge der Umsetzung + +1. Toggle + Plan-Check im Frontend +2. Dynamic-Generierungslogik (nutzt bestehenden `POST /api/qrs`) +3. (Optional) `POST /api/qrs/bulk` für Performance +4. ZIP-Download mit Redirect-URLs als Metadaten-CSV + +--- + +## Feature 2: Dynamischer Barcode Generator + +### Aufteilung: Landingpage (Marketing) + Dashboard (Funktion) + +**Wichtig:** "Dynamic" existiert nur im Dashboard `/create`. Die Landingpage erklärt das Konzept und treibt Nutzer zum Signup/Login — sie hat keinen eigenen Dynamic-Modus. + +--- + +### 2a) Landingpage: `/tools/dynamic-barcode-generator` + +**Ziel:** SEO-Traffic auf Keyword "barcode generator" (100k–1M, 0% Competition) konvertieren zu Signups. + +**Was die Landingpage NICHT hat:** +- Keinen Dynamic-Toggle +- Keine echte Dynamic-Funktionalität + +**Was die Landingpage HAT:** +- Bestehenden `BarcodeGeneratorClient` eingebettet (statischer Generator, unverändert) +- Erklärung was ein dynamischer Barcode ist + Vorteile +- Klarer CTA: "Create Dynamic Barcode → Sign up / Dashboard" + +**Aufbau** (`src/app/(main)/(marketing)/tools/dynamic-barcode-generator/page.tsx`): + +``` +Hero-Section + H1: "Dynamic Barcode Generator — Update Any Barcode Without Reprinting" + Subtext: Erklärt Tracking + Redirect-Konzept + CTA-Button: "Create Dynamic Barcode" → /login oder /signup + +Tool-Section + BarcodeGeneratorClient (statisch, wie bisher, keine Änderungen) + Banner darunter: "Want dynamic barcodes? Sign up free →" + +How It Works (3 Schritte) + 1. Sign up & create barcode in dashboard + 2. Print it once + 3. Update the destination anytime — no reprint needed + +Use Cases + Retail-Verpackungen, Logistik-Labels, Produktkataloge, Event-Badges + +FAQ-Section (schema.org FAQ markup) + - "Was ist ein dynamischer Barcode?" + - "Wie unterscheidet sich dynamisch von statisch?" + - "Welche Formate werden unterstützt?" + +RelatedTools-Komponente (bereits vorhanden) +``` + +**Metadata:** +```ts +title: 'Dynamic Barcode Generator — Trackable & Editable Barcodes' +description: 'Create dynamic barcodes that you can update without reprinting. Track scans, change destinations, and manage all barcodes from one dashboard.' +canonical: 'https://www.qrmaster.net/tools/dynamic-barcode-generator' +keywords: ['dynamic barcode generator', 'barcode generator', 'trackable barcode', 'editable barcode'] +``` + +**Sitemap:** `/tools/dynamic-barcode-generator` hinzufügen. + +--- + +### 2b) Dashboard `/create` — BARCODE als ContentType + +**Ziel:** Eingeloggte Nutzer können Barcodes (statisch oder dynamisch) im Dashboard erstellen, speichern und tracken. + +**DB-Änderung (kein migrate!):** +```sql +-- Direkt gegen PostgreSQL ausführen (npm run docker:db) +ALTER TYPE "ContentType" ADD VALUE 'BARCODE'; +``` +Danach: `npx prisma generate` + +**Änderungen `create/page.tsx`:** +- BARCODE zu `contentTypes` Array hinzufügen +- `renderContentFields()` Case: Barcode-Wert + Format-Picker (CODE128, EAN13, UPC, etc.) +- Preview: `react-barcode` statt `QRCodeSVG` wenn ContentType === BARCODE +- QR-spezifische Optionen ausblenden bei BARCODE (Frames, Logo, Corner Style) +- Dynamic Barcode = encodiert `/r/[slug]` → nutzt bestehendes Redirect- + Tracking-System +- Static Barcode = encodiert Rohwert direkt + +**Kein neues Backend nötig** — `POST /api/qrs` + `/r/[slug]`-Redirect funktionieren bereits. + +--- + +### Reihenfolge der Umsetzung + +**Phase 1 — Landingpage (kein DB-Change):** +1. `page.tsx` unter `/tools/dynamic-barcode-generator` erstellen +2. Sitemap-Eintrag + +**Phase 2 — Dashboard BARCODE:** +1. SQL ausführen: `ALTER TYPE "ContentType" ADD VALUE 'BARCODE'` +2. `npx prisma generate` +3. `create/page.tsx` erweitern + +--- + +## Abhängigkeiten zwischen den Features + +| Feature | Hängt ab von | +|---------|-------------| +| Bulk Dynamic | Bestehendem `POST /api/qrs` (bereits fertig) | +| Bulk Dynamic (optional) | Neuem `POST /api/qrs/bulk` Endpunkt | +| Landingpage Dynamic Barcode | Bestehendem BarcodeGeneratorClient (keine Änderungen) | +| Dashboard BARCODE | SQL-Enum-Erweiterung + `prisma generate` | diff --git a/src/app/(main)/(marketing)/bulk-qr-code-generator/page.tsx b/src/app/(main)/(marketing)/bulk-qr-code-generator/page.tsx index 3b0d6ef..e782030 100644 --- a/src/app/(main)/(marketing)/bulk-qr-code-generator/page.tsx +++ b/src/app/(main)/(marketing)/bulk-qr-code-generator/page.tsx @@ -176,6 +176,13 @@ const howToSchema = { '@type': 'HowTo', '@id': 'https://www.qrmaster.net/bulk-qr-code-generator#howto', name: 'How to generate bulk QR codes from a spreadsheet', + datePublished: '2024-01-01', + dateModified: '2025-06-01', + author: { + '@type': 'Person', + name: 'Timo Knuth', + url: 'https://www.qrmaster.net/authors/timo', + }, description: 'Upload a spreadsheet, map the title and content columns, preview the batch, then generate and download the QR codes.', totalTime: 'PT10M', @@ -380,6 +387,12 @@ export default function BulkQRCodeGeneratorPage() { /> +
+ By Timo Knuth, QR Master · Last updated: June 2025 +
++ A custom QR code with your brand colors and logo doesn't just look better — it signals trust and gets scanned more often. +
+ ++ Color increases brand recognition by up to 80%. A branded QR code using your brand colors is recognized and associated with your business faster than a generic black-and-white grid — increasing scan intent. +
++ Source: University of Loyola Maryland — Color & Brand Recognition Study +
++ Adding a recognizable brand element — like a logo — to a functional graphic increases user engagement and trust. Familiar visual cues reduce hesitation and increase the likelihood of scanning. +
++ Source: Nielsen Norman Group — Visual Design and Trust Research +
++ By Timo Knuth, QR Master · Last updated: June 2025 · Based on independent academic and industry research +
++ The ability to update destinations after printing — and track every scan — transforms a static print asset into a measurable marketing channel. +
+ ++ Companies with strong omnichannel customer engagement — enabled by closed-loop tracking from offline to online — retain 89% of their customers, compared to only 33% for companies with weak omnichannel engagement. +
++ Source: Aberdeen Group — Omnichannel Customer Engagement Study +
++ of small businesses report printing and direct mail errors as a major source of wasted marketing budget. Dynamic QR codes eliminate this risk — update the destination, never reprint. +
++ Source: Data & Marketing Association (DMA) +
++ By Timo Knuth, QR Master · Last updated: June 2025 · Based on independent academic and industry research +
+
Start free with 3 active dynamic QR codes and unlimited static codes. Upgrade to Pro for 50 codes
diff --git a/src/app/(main)/(marketing)/qr-code-tracking/page.tsx b/src/app/(main)/(marketing)/qr-code-tracking/page.tsx
index 7b20672..7d91e55 100644
--- a/src/app/(main)/(marketing)/qr-code-tracking/page.tsx
+++ b/src/app/(main)/(marketing)/qr-code-tracking/page.tsx
@@ -169,6 +169,13 @@ const howToSchema = {
'@type': 'HowTo',
'@id': 'https://www.qrmaster.net/qr-code-tracking#howto',
name: 'How to track QR code scans',
+ datePublished: '2024-01-01',
+ dateModified: '2025-06-01',
+ author: {
+ '@type': 'Person',
+ name: 'Timo Knuth',
+ url: 'https://www.qrmaster.net/authors/timo',
+ },
description: 'Create a dynamic QR code, deploy it, and review scan analytics from the QR Master dashboard.',
totalTime: 'PT5M',
step: [
@@ -486,6 +493,48 @@ export default function QRCodeTrackingPage() {
+ {/* WHY QR TRACKING MATTERS — STATISTICS */}
+
+ Without scan analytics, a printed QR code is invisible — you can't tell if your campaign placement is working. Tracking turns every scan into actionable data.
+
+ Companies with strong omnichannel engagement — requiring closed-loop tracking from offline to online — retain 89% of their customers, compared to 33% for businesses without integrated tracking.
+
+ Source: Aberdeen Group — Omnichannel Customer Engagement Study
+
+ of small businesses identify print and direct mail errors as a major source of wasted marketing budget. QR tracking reveals which placements actually drive scans — so you reprint only what works.
+
+ Source: Data & Marketing Association (DMA)
+
+ By Timo Knuth, QR Master · Last updated: June 2025 · Based on independent academic and industry research
+
+ By Timo Knuth, QR Master · Last updated: June 2025 · GS1-verified content
+
Barcodes are an essential part of modern commerce, logistics, and inventory management. A Barcode Generator allows businesses and individuals to create scannable barcodes quickly and efficiently for products, packaging, and internal systems. Whether you run an online shop, manage a warehouse, or sell products locally, understanding how barcodes work can save time and reduce errors.
@@ -26,12 +30,13 @@ export function BarcodeGuide() {
{/* SEO Image */}
+ Barcodes are not just convenient — they are scientifically proven to reduce errors across industries. Independent research from logistics, healthcare, and economics consistently shows the same result: switching from manual data entry to barcode scanning produces dramatic accuracy gains.
+
+ 99%+ Inventory Accuracy vs. 92% Manual
+
+ Studies on warehouse management systems consistently find that manual inventory processes achieve around 92% accuracy. Implementing barcode scanning raises that figure to over 99%, reducing mismatches, write-offs, and fulfillment errors in a single step.
+
+ Sources:{' '}
+
+ GS1 Barcode Standards
+
+ {'; '}
+ research cited in the{' '}
+ International Journal of Supply Chain Management
+ {'; Auburn University RFID/Barcode Lab inventory accuracy benchmarks.'}
+
+ 50% Reduction in Critical Data-Entry Errors (Healthcare)
+
+ In mission-critical environments where precision is non-negotiable, the case for barcoding is even stronger. Clinical research demonstrates that Barcode Medication Administration (BCMA) systems cut administration data errors by up to 50%. If barcodes are reliable enough for hospitals, they are reliable enough for your inventory.
+
+ Sources:{' '}
+
+ New England Journal of Medicine — "Effect of Bar-Code Technology on the Safety of Medication Administration"
+
+ {'; '}
+
+ AHRQ — Barcode Medication Administration (BCMA) research
+
+ {'.'}
+
+ Significant Productivity Gains at Checkout (Retail Economics)
+
+ The productivity impact of barcodes extends beyond accuracy. Economic research from the National Bureau of Economic Research (NBER) documents dramatic throughput gains for retailers when switching from manual key-entry to barcode scanners — an effect that transformed checkout speed and operational cost structures across the industry.
+
+ Source:{' '}
+
+ NBER Working Paper — "Raising the Barcode Scanner: Technology and Productivity in the Retail Sector"
+
+ {'.'}
+
Although barcodes and QR codes are often confused, they serve different purposes. A barcode stores data horizontally and is mainly used for product identification. A QR code stores data both horizontally and vertically and can contain more complex information such as URLs or contact details.
diff --git a/src/app/(main)/(marketing)/tools/barcode-generator/page.tsx b/src/app/(main)/(marketing)/tools/barcode-generator/page.tsx
index ff6f28b..6176ce1 100644
--- a/src/app/(main)/(marketing)/tools/barcode-generator/page.tsx
+++ b/src/app/(main)/(marketing)/tools/barcode-generator/page.tsx
@@ -13,10 +13,14 @@ export const metadata: Metadata = {
title: {
absolute: 'Free Barcode Generator Online – EAN, UPC, Code 128',
},
- description: 'Free online barcode generator. Create EAN-13, UPC-A and Code 128 barcodes instantly. Download PNG or SVG. No signup required.',
+ description: 'Free online barcode generator for EAN-13, UPC-A, and Code 128 barcodes. Create scannable labels for retail, inventory, and logistics instantly. Download PNG or SVG — no signup required.',
keywords: ['barcode generator', 'online barcode maker', 'create barcode free', 'ean-13 generator', 'upc-a generator', 'code 128 generator', 'barcode creator', 'printable barcodes'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/barcode-generator',
+ languages: {
+ 'x-default': 'https://www.qrmaster.net/tools/barcode-generator',
+ en: 'https://www.qrmaster.net/tools/barcode-generator',
+ },
},
openGraph: {
title: 'Barcode Generator: Create EAN, UPC & Code 128',
@@ -45,12 +49,19 @@ const jsonLd = {
generateSoftwareAppSchema(
'Barcode Generator',
'Generate custom printable barcodes instantly for EAN, UPC, Code 128 and more.',
- '/og-barcode-generator.png',
+ '/barcode-generator-preview.png',
'UtilitiesApplication'
),
{
'@type': 'HowTo',
name: 'How to Create a Barcode',
+ datePublished: '2024-06-01',
+ dateModified: '2025-06-01',
+ author: {
+ '@type': 'Person',
+ name: 'Timo Knuth',
+ url: 'https://www.qrmaster.net/authors/timo',
+ },
description: 'Create custom barcodes for products or inventory.',
step: [
{
@@ -163,8 +174,8 @@ export default function BarcodeGeneratorPage() {
- Our barcode generator makes it easy to create and print high-quality labels for products and inventory.
- Supports EAN, UPC, Code 128.
+ A barcode generator converts any number or text into a scannable barcode image — ready to download, print, and use on products, labels, or inventory systems.
+ Supports EAN-13, UPC-A, and Code 128. No signup required.
+ A Google Review QR code reduces the friction between a satisfied customer and a published review — the single biggest barrier to getting more reviews.
+
+ of consumers will leave a review for a business if they are asked — but most businesses never ask, or ask via email where completion rates drop to 1–3%.
+
+ Source: BrightLocal Local Consumer Review Survey
+
+ increase in conversion rates for products and businesses with reviews compared to those without. Capturing reviews at the point of sale — where satisfaction is highest — maximizes this effect.
+
+ Source: Spiegel Research Center, Northwestern University
+
+ By Timo Knuth, QR Master · Last updated: June 2025 · Based on independent academic and industry research
+
+ A vCard QR code solves the single biggest problem with traditional business cards: they get discarded before anyone saves your details.
+
+ of traditional paper business cards are thrown away within a week of being handed out. A vCard QR code on your card saves contact details instantly — no manual typing, no lost connections.
+
+ Source: Adobe Business Research
+
+ Instead of asking someone to manually type your name, phone, and email — a vCard QR code transfers all contact fields (name, phone, email, company, URL) directly into their phone's address book with a single scan.
+
+ vCard 3.0 / VCF format — supported natively by iOS and Android
+
+ By Timo Knuth, QR Master · Last updated: June 2025 · Based on independent academic and industry research
+
+ A WiFi QR code eliminates the single biggest friction point between your guest and your network — manual password entry.
+
+ Free WiFi is rated the most important hotel amenity by guests — ahead of breakfast, parking, and loyalty points. Instant, frictionless access directly impacts satisfaction scores and repeat bookings.
+
+ Source: J.D. Power Hotel Guest Satisfaction Study
+
+ Reducing customer effort — like eliminating manual password entry — is the single strongest predictor of customer loyalty. The lower the effort, the higher the repeat visit rate and positive word-of-mouth.
+
+ Source: Harvard Business Review — "Stop Trying to Delight Your Customers" (Customer Effort Score research)
+
+ By Timo Knuth, QR Master · Last updated: June 2025 · Based on independent academic and industry research
+
+ Why Tracking Makes QR Codes Measurable Marketing Assets
+
+
Barcode Accuracy: What the Research Shows
+ Barcode vs QR Code
+ Why Google Reviews Matter for Your Business
+
+
+ Why Digital Contact Sharing Outperforms Paper Cards
+
+
+ Why WiFi QR Codes Improve Customer Experience
+
+