diff --git a/TEMPLATE (Make a Copy) - AI SEO Audit Checklist v2.0 - v2.0.pdf b/TEMPLATE (Make a Copy) - AI SEO Audit Checklist v2.0 - v2.0.pdf new file mode 100644 index 0000000..2f33610 Binary files /dev/null and b/TEMPLATE (Make a Copy) - AI SEO Audit Checklist v2.0 - v2.0.pdf differ diff --git a/checklist/uploaded_image_0_1768484835516.png b/checklist/uploaded_image_0_1768484835516.png new file mode 100644 index 0000000..eede4d5 Binary files /dev/null and b/checklist/uploaded_image_0_1768484835516.png differ diff --git a/checklist/uploaded_image_1_1768484835516.png b/checklist/uploaded_image_1_1768484835516.png new file mode 100644 index 0000000..be63fe0 Binary files /dev/null and b/checklist/uploaded_image_1_1768484835516.png differ diff --git a/checklist/uploaded_image_2_1768484835516.png b/checklist/uploaded_image_2_1768484835516.png new file mode 100644 index 0000000..96eaa77 Binary files /dev/null and b/checklist/uploaded_image_2_1768484835516.png differ diff --git a/checklist/uploaded_image_3_1768484835516.png b/checklist/uploaded_image_3_1768484835516.png new file mode 100644 index 0000000..e6f634a Binary files /dev/null and b/checklist/uploaded_image_3_1768484835516.png differ diff --git a/package-lock.json b/package-lock.json index 40764bf..e52b99d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "html-to-image": "^1.11.13", "i18next": "^23.7.6", "ioredis": "^5.3.2", + "jspdf": "^4.0.0", "jszip": "^3.10.1", "lucide-react": "^0.562.0", "next": "^14.2.35", @@ -2105,6 +2106,12 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==", + "license": "MIT" + }, "node_modules/@types/papaparse": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@types/papaparse/-/papaparse-5.5.0.tgz", @@ -2132,6 +2139,13 @@ "@types/node": "*" } }, + "node_modules/@types/raf": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz", + "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==", + "license": "MIT", + "optional": true + }, "node_modules/@types/react": { "version": "18.3.26", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.26.tgz", @@ -2153,6 +2167,13 @@ "@types/react": "^18.0.0" } }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.51.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.51.0.tgz", @@ -3153,6 +3174,16 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -3470,6 +3501,26 @@ ], "license": "CC-BY-4.0" }, + "node_modules/canvg": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.11.tgz", + "integrity": "sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA==", + "license": "MIT", + "optional": true, + "dependencies": { + "@babel/runtime": "^7.12.5", + "@types/raf": "^3.4.0", + "core-js": "^3.8.3", + "raf": "^3.4.1", + "regenerator-runtime": "^0.13.7", + "rgbcolor": "^1.0.1", + "stackblur-canvas": "^2.0.0", + "svg-pathdata": "^6.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/chainsaw": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", @@ -3759,6 +3810,16 @@ "node": ">= 8" } }, + "node_modules/css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "license": "MIT", + "optional": true, + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -4166,6 +4227,16 @@ "node": ">=6.0.0" } }, + "node_modules/dompurify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.1.tgz", + "integrity": "sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optional": true, + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -5038,6 +5109,23 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-png": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/fast-png/-/fast-png-6.4.0.tgz", + "integrity": "sha512-kAqZq1TlgBjZcLr5mcN6NP5Rv4V2f22z00c3g8vRrwkcqjerx7BEhPbOnWCPqaHUl2XWQBJQvOT/FQhdMT7X/Q==", + "license": "MIT", + "dependencies": { + "@types/pako": "^2.0.3", + "iobuffer": "^5.3.2", + "pako": "^2.1.0" + } + }, + "node_modules/fast-png/node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, "node_modules/fast-sha256": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/fast-sha256/-/fast-sha256-1.3.0.tgz", @@ -5691,6 +5779,20 @@ "integrity": "sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg==", "license": "MIT" }, + "node_modules/html2canvas": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", + "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", + "license": "MIT", + "optional": true, + "dependencies": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/i18next": { "version": "23.16.8", "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.8.tgz", @@ -5818,6 +5920,12 @@ "node": ">=12" } }, + "node_modules/iobuffer": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-5.4.0.tgz", + "integrity": "sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==", + "license": "MIT" + }, "node_modules/ioredis": { "version": "5.8.2", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.8.2.tgz", @@ -6408,6 +6516,29 @@ "json5": "lib/cli.js" } }, + "node_modules/jspdf": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-4.0.0.tgz", + "integrity": "sha512-w12U97Z6edKd2tXDn3LzTLg7C7QLJlx0BPfM3ecjK2BckUl9/81vZ+r5gK4/3KQdhAcEZhENUxRhtgYBj75MqQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4", + "fast-png": "^6.2.0", + "fflate": "^0.8.1" + }, + "optionalDependencies": { + "canvg": "^3.0.11", + "core-js": "^3.6.0", + "dompurify": "^3.2.4", + "html2canvas": "^1.0.0-rc.5" + } + }, + "node_modules/jspdf/node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "license": "MIT" + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -7371,6 +7502,13 @@ "dev": true, "license": "ISC" }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT", + "optional": true + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -7802,6 +7940,16 @@ ], "license": "MIT" }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "license": "MIT", + "optional": true, + "dependencies": { + "performance-now": "^2.1.0" + } + }, "node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -8011,6 +8159,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "license": "MIT", + "optional": true + }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -8125,6 +8280,16 @@ "node": ">=0.10.0" } }, + "node_modules/rgbcolor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", + "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==", + "license": "MIT OR SEE LICENSE IN FEEL-FREE.md", + "optional": true, + "engines": { + "node": ">= 0.8.15" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -8527,6 +8692,16 @@ "dev": true, "license": "MIT" }, + "node_modules/stackblur-canvas": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz", + "integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.14" + } + }, "node_modules/standard-as-callback": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", @@ -8888,6 +9063,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svg-pathdata": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz", + "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/svix": { "version": "1.76.1", "resolved": "https://registry.npmjs.org/svix/-/svix-1.76.1.tgz", @@ -9012,6 +9197,16 @@ "node": ">= 6" } }, + "node_modules/text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "license": "MIT", + "optional": true, + "dependencies": { + "utrie": "^1.0.2" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -9459,6 +9654,16 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "license": "MIT", + "optional": true, + "dependencies": { + "base64-arraybuffer": "^1.0.2" + } + }, "node_modules/uuid": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", diff --git a/package.json b/package.json index a61a33f..2b4b775 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "html-to-image": "^1.11.13", "i18next": "^23.7.6", "ioredis": "^5.3.2", + "jspdf": "^4.0.0", "jszip": "^3.10.1", "lucide-react": "^0.562.0", "next": "^14.2.35", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index da00a83..c2bad48 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -161,4 +161,18 @@ model NewsletterSubscription { @@index([email]) @@index([createdAt]) +} + +model Lead { + id String @id @default(cuid()) + email String + source String @default("reprint-calculator") + reprintCost Float? + updatesPerYear Int? + annualSavings Float? + createdAt DateTime @default(now()) + + @@index([email]) + @@index([createdAt]) + @@index([source]) } \ No newline at end of file diff --git a/scripts/submit-indexnow.ts b/scripts/submit-indexnow.ts index f1d0e7b..ebe1ede 100644 --- a/scripts/submit-indexnow.ts +++ b/scripts/submit-indexnow.ts @@ -25,6 +25,7 @@ async function submitIndexNow() { '/qr-code-tracking', '/dynamic-qr-code-generator', '/bulk-qr-code-generator', + '/reprint-calculator', '/newsletter', ]; diff --git a/src/app/(marketing)/bulk-qr-code-generator/page.tsx b/src/app/(marketing)/bulk-qr-code-generator/page.tsx index 1f0c450..2d0e2a6 100644 --- a/src/app/(marketing)/bulk-qr-code-generator/page.tsx +++ b/src/app/(marketing)/bulk-qr-code-generator/page.tsx @@ -641,26 +641,35 @@ Product C,https://example.com/product-c,Budget Widget,electronics,sale`} {/* CTA Section */} -
-
-

- Generate 1000s of QR Codes in Minutes + {/* CTA Section */} +
+ {/* Background Decorations */} +
+
+ +
+

+ Ready to Generate 1000s of Codes?

-

- Save hours of manual work. Upload your file and get all QR codes ready instantly. +

+ Stop doing it manually. Upload your Excel file and get your QR codes in seconds. Professional, branded, and trackable.

-
+
- -
+ +

+ No credit card required for free trial. +

diff --git a/src/app/(marketing)/newsletter/NewsletterClient.tsx b/src/app/(marketing)/newsletter/NewsletterClient.tsx index 4f0367c..528a880 100644 --- a/src/app/(marketing)/newsletter/NewsletterClient.tsx +++ b/src/app/(marketing)/newsletter/NewsletterClient.tsx @@ -20,6 +20,8 @@ import { Zap, Send, CheckCircle2, + FileDown, + DollarSign, } from 'lucide-react'; interface AdminStats { @@ -81,6 +83,20 @@ export default function NewsletterClient() { message: string; } | null>(null); + // Lead management state + const [leadData, setLeadData] = useState<{ + total: number; + recent: Array<{ + id: string; + email: string; + source: string; + reprintCost: number | null; + updatesPerYear: number | null; + annualSavings: number | null; + createdAt: string; + }>; + } | null>(null); + useEffect(() => { checkAuth(); }, []); @@ -93,8 +109,9 @@ export default function NewsletterClient() { const data = await response.json(); setStats(data); setLoading(false); - // Also fetch newsletter data + // Also fetch newsletter and lead data fetchNewsletterData(); + fetchLeadsData(); } else { setIsAuthenticated(false); } @@ -117,6 +134,18 @@ export default function NewsletterClient() { } }; + const fetchLeadsData = async () => { + try { + const response = await fetch('/api/leads'); + if (response.ok) { + const data = await response.json(); + setLeadData(data); + } + } catch (error) { + console.error('Failed to fetch leads data:', error); + } + }; + const handleSendBroadcast = async () => { if (!confirm(`Are you sure you want to send the AI Feature Launch email to all ${newsletterData?.total || 0} subscribers?`)) { return; @@ -641,6 +670,84 @@ export default function NewsletterClient() { + + {/* Lead Management Section */} +
+ +
+
+ +
+
+

Lead Management

+

Reprint Calculator PDF downloads

+
+
+ {leadData?.total || 0} +

Total Leads

+
+ + Active + +
+ + {/* Recent Leads */} +
+

Recent Leads

+ {leadData?.recent && leadData.recent.length > 0 ? ( +
+ {leadData.recent.map((lead) => ( +
+
+ +
+ {lead.email} + {lead.annualSavings && ( + + + €{lead.annualSavings.toLocaleString()} potential savings + + )} +
+
+
+ + {new Date(lead.createdAt).toLocaleDateString()} + + {lead.reprintCost && lead.updatesPerYear && ( + + €{lead.reprintCost} × {lead.updatesPerYear}/yr + + )} +
+
+ ))} +
+ ) : ( +

No leads yet. Leads appear when users download a PDF report from the Reprint Calculator.

+ )} +
+ + {/* Tip */} +
+

+ 💡 Tip: View all leads in{' '} + + Prisma Studio + + {' '}(Lead table) +

+
+
+
); diff --git a/src/app/(marketing)/qr-code-tracking/page.tsx b/src/app/(marketing)/qr-code-tracking/page.tsx index a086c8e..19c032a 100644 --- a/src/app/(marketing)/qr-code-tracking/page.tsx +++ b/src/app/(marketing)/qr-code-tracking/page.tsx @@ -378,26 +378,35 @@ export default function QRCodeTrackingPage() {
{/* CTA Section */} -
-
-

- Start Tracking Your QR Codes Today + {/* CTA Section */} +
+ {/* Background Decorations */} +
+
+ +
+

+ Start Tracking Your QR Codes Today

-

- Join thousands of businesses using QR Master to track and optimize their QR code campaigns +

+ Join thousands of businesses using QR Master to optimize their campaigns with real-time analytics.

-
+
- -
+ +

+ Full analytics accessible on free plan. +

diff --git a/src/app/(marketing)/reprint-calculator/page.tsx b/src/app/(marketing)/reprint-calculator/page.tsx new file mode 100644 index 0000000..3cac622 --- /dev/null +++ b/src/app/(marketing)/reprint-calculator/page.tsx @@ -0,0 +1,117 @@ +import React from 'react'; +import type { Metadata } from 'next'; +import ReprintSavingsCalculator from '@/components/marketing/ReprintSavingsCalculator'; +import { ArrowDown, Check, ShieldCheck, Zap } from 'lucide-react'; + +export const metadata: Metadata = { + title: 'Reprint Cost Calculator | QR Master', + description: + 'Calculate how much you are wasting on QR code reprints. See your potential savings with dynamic QR codes that never need to be reprinted.', + alternates: { + canonical: 'https://www.qrmaster.net/reprint-calculator', + }, + robots: { + index: true, + follow: true, + }, + openGraph: { + title: 'Reprint Cost Calculator | QR Master', + description: 'Stop wasting money on reprints. Calculate your savings now.', + url: 'https://www.qrmaster.net/reprint-calculator', + type: 'website', + images: [ + { + url: 'https://www.qrmaster.net/og-image.png', + width: 1200, + height: 630, + alt: 'QR Master Reprint Cost Calculator', + }, + ], + }, +}; + +export default function ReprintCalculatorPage() { + return ( + <> + {/* Hero Section */} +
+
+
+ + + + + Static QR codes are costing you money +
+ +

+ Stop Burning Budget on
+ Avoidable Reprints +

+ +

+ Every time a URL changes, static QR codes become useless trash. + Dynamic QR codes update instantly—keeping your print materials alive forever. +

+ +
+ +
+
+
+ + {/* Calculator Component */} + + + {/* Value Props */} +
+
+
+

+ Why Smart Companies Switched Years Ago +

+

+ The math is simple. One dynamic subscription costs less than a single batch of reprints. +

+
+ +
+ {[ + { + icon: Zap, + color: "text-amber-500", + bg: "bg-amber-50", + title: "Update Instantly", + desc: "Changed your menu? New promo link? Update the destination in seconds. Your printed codes keep working perfectly." + }, + { + icon: ShieldCheck, + color: "text-blue-500", + bg: "bg-blue-50", + title: "Error Proofing", + desc: "Printed the wrong link? With static codes, that's a disaster. With dynamic codes, it's a 5-second fix in the dashboard." + }, + { + icon: Check, + color: "text-green-500", + bg: "bg-green-50", + title: "Real ROI Tracking", + desc: "Stop guessing if your print ads work. Track every scan, location, and device to measure exactly what's driving value." + } + ].map((feature, i) => ( +
+
+ +
+

{feature.title}

+

+ {feature.desc} +

+
+ ))} +
+
+
+ + ); +} diff --git a/src/app/api/leads/route.ts b/src/app/api/leads/route.ts new file mode 100644 index 0000000..7563c76 --- /dev/null +++ b/src/app/api/leads/route.ts @@ -0,0 +1,81 @@ +import { NextResponse } from 'next/server'; +import { db } from '@/lib/db'; + +interface LeadInput { + email: string; + source?: string; + reprintCost?: number; + updatesPerYear?: number; + annualSavings?: number; +} + +export async function POST(request: Request) { + try { + const body: LeadInput = await request.json(); + const { email, source, reprintCost, updatesPerYear, annualSavings } = body; + + if (!email || !email.includes('@')) { + return NextResponse.json( + { error: 'Valid email is required' }, + { status: 400 } + ); + } + + const lead = await (db as any).lead.create({ + data: { + email: email.toLowerCase().trim(), + source: source || 'reprint-calculator', + reprintCost: reprintCost ? Number(reprintCost) : null, + updatesPerYear: updatesPerYear ? Number(updatesPerYear) : null, + annualSavings: annualSavings ? Number(annualSavings) : null, + }, + }); + + return NextResponse.json({ success: true, id: lead.id }); + } catch (error) { + console.error('Error saving lead:', error); + return NextResponse.json( + { error: 'Failed to save lead' }, + { status: 500 } + ); + } +} + +export async function GET() { + try { + const [leads, total] = await Promise.all([ + (db as any).lead.findMany({ + orderBy: { createdAt: 'desc' }, + take: 10, + }), + (db as any).lead.count(), + ]); + + return NextResponse.json({ + total, + recent: leads.map((lead: { + id: string; + email: string; + source: string; + reprintCost: number | null; + updatesPerYear: number | null; + annualSavings: number | null; + createdAt: Date; + }) => ({ + id: lead.id, + email: lead.email, + source: lead.source, + reprintCost: lead.reprintCost, + updatesPerYear: lead.updatesPerYear, + annualSavings: lead.annualSavings, + createdAt: lead.createdAt.toISOString(), + })), + }); + } catch (error) { + console.error('Error fetching leads:', error); + return NextResponse.json( + { error: 'Failed to fetch leads' }, + { status: 500 } + ); + } +} diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 3989756..19e3857 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -61,6 +61,12 @@ export default function sitemap(): MetadataRoute.Sitemap { changeFrequency: 'monthly', priority: 0.9, }, + { + url: `${baseUrl}/reprint-calculator`, + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.9, + }, { url: `${baseUrl}/dynamic-qr-code-generator`, lastModified: new Date(), diff --git a/src/components/marketing/HomePageClient.tsx b/src/components/marketing/HomePageClient.tsx index aa4337b..728f059 100644 --- a/src/components/marketing/HomePageClient.tsx +++ b/src/components/marketing/HomePageClient.tsx @@ -11,6 +11,7 @@ import { Features } from '@/components/marketing/Features'; import { Pricing } from '@/components/marketing/Pricing'; import { FAQ } from '@/components/marketing/FAQ'; import { Button } from '@/components/ui/Button'; +import { ReprintCalculatorTeaser } from '@/components/marketing/ReprintCalculatorTeaser'; import { ScrollToTop } from '@/components/ui/ScrollToTop'; import { FreeToolsGrid } from '@/components/marketing/FreeToolsGrid'; import en from '@/i18n/en.json'; @@ -40,8 +41,11 @@ export default function HomePageClient() { {/* Free Tools Grid */} - - + + + + + {/* Pricing Section */} diff --git a/src/components/marketing/ReprintCalculatorTeaser.tsx b/src/components/marketing/ReprintCalculatorTeaser.tsx new file mode 100644 index 0000000..3ba68f6 --- /dev/null +++ b/src/components/marketing/ReprintCalculatorTeaser.tsx @@ -0,0 +1,62 @@ +'use client'; + +import React from 'react'; +import Link from 'next/link'; +import { Button } from '@/components/ui/Button'; +import { ArrowRight, Calculator, TrendingUp } from 'lucide-react'; + +export const ReprintCalculatorTeaser: React.FC = () => { + return ( +
+
+
+ +
+
+ + ROI Calculator +
+ +

+ Are you burning budget on
+ Static Reprints? +

+ +

+ Find out exactly how much you can save by switching to dynamic QR codes. Our calculator reveals your savings potential in seconds. +

+ + + + +
+ +
+
+
+
+
+ +
+

Cost Analysis

+

+ Enter your print volume and update frequency to see your hidden costs. +

+
+
+
+
+
+
+ +
+
+
+ ); +}; diff --git a/src/components/marketing/ReprintSavingsCalculator.tsx b/src/components/marketing/ReprintSavingsCalculator.tsx new file mode 100644 index 0000000..d28b647 --- /dev/null +++ b/src/components/marketing/ReprintSavingsCalculator.tsx @@ -0,0 +1,430 @@ +'use client'; + +import React, { useState, useMemo } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import Link from 'next/link'; +import { Button } from '@/components/ui/Button'; +import { AlertTriangle, CheckCircle, TrendingDown, ArrowRight, RefreshCcw, FileDown, X, Loader2, Mail } from 'lucide-react'; +import { generateSavingsReport } from '@/lib/generateSavingsReport'; + +interface CalculatorResults { + annualWaste: number; + withQRMaster: number; + savings: number; + savingsPercent: number; + monthsPaidFor: number; +} + +export const ReprintSavingsCalculator: React.FC = () => { + const [reprintCost, setReprintCost] = useState(''); + const [updatesPerYear, setUpdatesPerYear] = useState(''); + const [showResults, setShowResults] = useState(false); + const [showEmailModal, setShowEmailModal] = useState(false); + const [email, setEmail] = useState(''); + const [isSubmitting, setIsSubmitting] = useState(false); + const [submitError, setSubmitError] = useState(''); + + // QR Master Pro yearly cost + const qrMasterYearlyCost = 108; // €9/month * 12 + + const results = useMemo((): CalculatorResults | null => { + const cost = parseFloat(reprintCost); + const updates = parseFloat(updatesPerYear); + + if (!cost || !updates || cost <= 0 || updates <= 0) { + return null; + } + + const annualWaste = cost * updates; + const withQRMaster = qrMasterYearlyCost; + const savings = annualWaste - withQRMaster; + const savingsPercent = Math.round((savings / annualWaste) * 100); + const monthsPaidFor = Math.round(annualWaste / (qrMasterYearlyCost / 12)); + + return { + annualWaste, + withQRMaster, + savings: Math.max(0, savings), + savingsPercent: Math.max(0, savingsPercent), + monthsPaidFor, + }; + }, [reprintCost, updatesPerYear]); + + const handleCalculate = () => { + if (results) { + setShowResults(true); + } + }; + + const handleReset = () => { + setShowResults(false); + setReprintCost(''); + setUpdatesPerYear(''); + }; + + const handleDownloadReport = async () => { + setShowEmailModal(true); + }; + + const handleEmailSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + if (!email || !email.includes('@') || !results) return; + + setIsSubmitting(true); + setSubmitError(''); + + try { + // Save lead to database + const response = await fetch('/api/leads', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + email, + source: 'reprint-calculator', + reprintCost: parseFloat(reprintCost), + updatesPerYear: parseInt(updatesPerYear), + annualSavings: results.savings, + }), + }); + + if (!response.ok) { + throw new Error('Failed to save'); + } + + // Generate and download PDF + generateSavingsReport({ + reprintCost: parseFloat(reprintCost), + updatesPerYear: parseInt(updatesPerYear), + annualWaste: results.annualWaste, + qrMasterCost: results.withQRMaster, + savings: results.savings, + savingsPercent: results.savingsPercent, + }); + + // Close modal and reset + setShowEmailModal(false); + setEmail(''); + } catch (error) { + setSubmitError('Something went wrong. Please try again.'); + } finally { + setIsSubmitting(false); + } + }; + + const formatCurrency = (value: number) => { + return new Intl.NumberFormat('de-DE', { + style: 'currency', + currency: 'EUR', + minimumFractionDigits: 0, + maximumFractionDigits: 0, + }).format(value); + }; + + return ( + <> +
+ {/* Background decoration */} +
+
+
+
+ +
+ +
+ + {/* Left Side: Form */} +
+ + {!showResults ? ( + +
+ + Stop wasting budget +
+

+ Calculate your Reprint Waste +

+

+ Enter your printing costs to see exactly how much static QR codes are costing you annually. +

+
+ ) : ( + +

+ + Parameters +

+
+ )} +
+ +
+
+ +
+ + setReprintCost(e.target.value)} + placeholder="500" + min="0" + className="w-full pl-10 pr-4 py-3.5 text-lg border border-slate-200 rounded-xl focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all shadow-sm group-hover:border-primary-300 bg-white" + /> +
+
+ +
+ + setUpdatesPerYear(e.target.value)} + placeholder="3" + min="0" + className="w-full px-4 py-3.5 text-lg border border-slate-200 rounded-xl focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all shadow-sm hover:border-primary-300 bg-white" + /> +
+ + {!showResults && ( + + )} + + {showResults && ( + + )} +
+
+ + {/* Right Side: Results */} +
+ {results && showResults && ( + +
+
+ + Potential Savings Found +
+ +
+

Annual Waste Identified

+
+ + {formatCurrency(results.annualWaste)} + +
+

+ Money currently lost to static reprints +

+
+ + {/* Comparison Bars */} +
+
+
+ Static QR Code Cost + {formatCurrency(results.annualWaste)} +
+
+ +
+
+ +
+
+ QR Master Cost + {formatCurrency(results.withQRMaster)} +
+
+ +
+
+
+ +
+
+
+ +
+
+

+ You save {results.savingsPercent}% instantly +

+

+ That's {formatCurrency(results.savings)} extra budget per year. + Effectively getting {results.monthsPaidFor} months of service for free compared to just one single reprint. +

+
+
+
+
+ +
+ + + + +

+ Based on QR Master Pro annual plan. No credit card required to start. +

+
+
+ )} +
+
+
+
+
+ + {/* Email Capture Modal */} + + {showEmailModal && ( + setShowEmailModal(false)} + > + e.stopPropagation()} + > + + +
+
+ +
+

+ Get Your Savings Report +

+

+ Enter your email to receive your personalized PDF report with detailed cost analysis. +

+
+ +
+
+ +
+ + setEmail(e.target.value)} + placeholder="you@company.com" + required + className="w-full pl-12 pr-4 py-3.5 text-lg border border-slate-200 rounded-xl focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all" + /> +
+
+ + {submitError && ( +

{submitError}

+ )} + + + +

+ We respect your privacy. Your email will only be used for QR Master updates. +

+
+
+
+ )} +
+ + ); +}; + +export default ReprintSavingsCalculator; diff --git a/src/components/ui/Footer.tsx b/src/components/ui/Footer.tsx index 036afa8..91e16af 100644 --- a/src/components/ui/Footer.tsx +++ b/src/components/ui/Footer.tsx @@ -45,6 +45,8 @@ export function Footer({ variant = 'marketing', t }: FooterProps) {
  • Bulk QR Generator
  • {translations.get_started}
  • +
  • Reprint Cost Calculator
  • +
  • Our Analytics
  • diff --git a/src/lib/generateSavingsReport.ts b/src/lib/generateSavingsReport.ts new file mode 100644 index 0000000..4a1070e --- /dev/null +++ b/src/lib/generateSavingsReport.ts @@ -0,0 +1,142 @@ +import { jsPDF } from 'jspdf'; + +interface ReportData { + reprintCost: number; + updatesPerYear: number; + annualWaste: number; + qrMasterCost: number; + savings: number; + savingsPercent: number; +} + +export function generateSavingsReport(data: ReportData): void { + const doc = new jsPDF(); + const pageWidth = doc.internal.pageSize.getWidth(); + + // Colors + const primaryColor: [number, number, number] = [79, 70, 229]; // Indigo + const greenColor: [number, number, number] = [16, 185, 129]; // Emerald + const redColor: [number, number, number] = [239, 68, 68]; // Red + const grayColor: [number, number, number] = [100, 116, 139]; // Slate + + // Header section with brand color + doc.setFillColor(...primaryColor); + doc.rect(0, 0, pageWidth, 45, 'F'); + + // Logo text + doc.setTextColor(255, 255, 255); + doc.setFontSize(28); + doc.setFont('helvetica', 'bold'); + doc.text('QR Master', 20, 28); + + // Subtitle + doc.setFontSize(12); + doc.setFont('helvetica', 'normal'); + doc.text('Your Personalized Savings Report', 20, 38); + + // Main title + doc.setTextColor(30, 41, 59); + doc.setFontSize(22); + doc.setFont('helvetica', 'bold'); + doc.text('Reprint Cost Analysis', 20, 65); + + // Date + doc.setTextColor(...grayColor); + doc.setFontSize(10); + doc.setFont('helvetica', 'normal'); + doc.text(`Generated on ${new Date().toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric' + })}`, 20, 75); + + // Input summary box + doc.setFillColor(248, 250, 252); + doc.roundedRect(20, 85, pageWidth - 40, 45, 3, 3, 'F'); + + doc.setTextColor(30, 41, 59); + doc.setFontSize(12); + doc.setFont('helvetica', 'bold'); + doc.text('Your Input', 28, 98); + + doc.setFont('helvetica', 'normal'); + doc.setFontSize(11); + doc.setTextColor(...grayColor); + doc.text(`Reprint Cost per Batch:`, 28, 112); + doc.text(`URL Updates per Year:`, 28, 122); + + doc.setTextColor(30, 41, 59); + doc.setFont('helvetica', 'bold'); + doc.text(`€${data.reprintCost.toLocaleString()}`, 100, 112); + doc.text(`${data.updatesPerYear}`, 100, 122); + + // Results section + doc.setTextColor(30, 41, 59); + doc.setFontSize(14); + doc.setFont('helvetica', 'bold'); + doc.text('Cost Comparison', 20, 150); + + // Static QR Code cost (red) + doc.setFillColor(254, 242, 242); + doc.roundedRect(20, 158, pageWidth - 40, 28, 3, 3, 'F'); + + doc.setTextColor(...redColor); + doc.setFontSize(11); + doc.setFont('helvetica', 'bold'); + doc.text('Static QR Codes (Annual Waste)', 28, 172); + doc.setFontSize(16); + doc.text(`€${data.annualWaste.toLocaleString()}`, pageWidth - 28, 172, { align: 'right' }); + + // QR Master cost (green) + doc.setFillColor(236, 253, 245); + doc.roundedRect(20, 192, pageWidth - 40, 28, 3, 3, 'F'); + + doc.setTextColor(...greenColor); + doc.setFontSize(11); + doc.setFont('helvetica', 'bold'); + doc.text('QR Master Pro (Annual Cost)', 28, 206); + doc.setFontSize(16); + doc.text(`€${data.qrMasterCost.toLocaleString()}`, pageWidth - 28, 206, { align: 'right' }); + + // Savings highlight + doc.setFillColor(...greenColor); + doc.roundedRect(20, 230, pageWidth - 40, 40, 3, 3, 'F'); + + doc.setTextColor(255, 255, 255); + doc.setFontSize(12); + doc.setFont('helvetica', 'normal'); + doc.text('Your Annual Savings', 28, 245); + doc.setFontSize(24); + doc.setFont('helvetica', 'bold'); + doc.text(`€${data.savings.toLocaleString()}`, 28, 262); + doc.setFontSize(14); + doc.text(`(${data.savingsPercent}%)`, 90, 262); + + // CTA section + doc.setTextColor(30, 41, 59); + doc.setFontSize(14); + doc.setFont('helvetica', 'bold'); + doc.text('Ready to Start Saving?', 20, 295); + + doc.setTextColor(...grayColor); + doc.setFontSize(10); + doc.setFont('helvetica', 'normal'); + doc.text('Dynamic QR codes let you update destinations without reprinting.', 20, 307); + doc.text('Track scans, analyze performance, and never waste print budget again.', 20, 317); + + // Website link + doc.setTextColor(...primaryColor); + doc.setFont('helvetica', 'bold'); + doc.text('Start your free trial: www.qrmaster.net/signup', 20, 332); + + // Footer + doc.setTextColor(...grayColor); + doc.setFontSize(8); + doc.setFont('helvetica', 'normal'); + const footerY = doc.internal.pageSize.getHeight() - 15; + doc.text('© 2026 QR Master. All rights reserved.', pageWidth / 2, footerY, { align: 'center' }); + doc.text('www.qrmaster.net', pageWidth / 2, footerY + 8, { align: 'center' }); + + // Download the PDF + doc.save('QRMaster-Savings-Report.pdf'); +}