5 Commits

Author SHA1 Message Date
3682673852 Final 2026-01-22 19:31:05 +01:00
Timo Knuth
1251584b13 fix 2026-01-22 16:33:29 +01:00
Timo Knuth
dd93ca560a fix(marketing): Update hero animation timing and move Free Forever badge 2026-01-22 16:26:23 +01:00
Timo Knuth
efb1654370 fix: Optimize flipping card animation backface and timing 2026-01-22 15:46:31 +01:00
Timo Knuth
05531cda3f 4 neue dynamischen 2026-01-11 01:29:21 +01:00
181 changed files with 14517 additions and 14044 deletions

0
..md Normal file
View File

100
.gitignore vendored
View File

@@ -1,51 +1,51 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
.env
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
# prisma
# docker
docker-compose.override.yml
*.sql
/backups/
# logs
logs
*.log
# local dev script
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
.env
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
# prisma
/prisma/migrations/
# docker
docker-compose.override.yml
*.sql
/backups/
# logs
logs
*.log
# local dev script
dev-server.js

View File

@@ -1,29 +0,0 @@
# Ahrefs SEO Findings & Status
## Critical Issues (Priority: High)
- [RESOLVED] **Page has no outgoing links**
- Found on: `privacy`, `newsletter`, `faq`, `/`, `qr-code-erstellen`
- *Status:* Verified `MarketingLayout` provides navigation. Added specific back-links to `newsletter` (admin), `login`, and `signup`.
- [RESOLVED] **Newsletter Page Misconfiguration**
- Found: `/newsletter` page has "Admin Dashboard" title.
- *Status:* Confirmed as internal Admin tool. Added "Back to Home" link to satisfy link checkers.
- [FIXED] **3XX Redirects & Links to Redirects**
- *Fixed in:* `blog/page.tsx` (links updated) and `blog/[slug]/page.tsx` (301s added).
- [FIXED] **Duplicate Metadata**
- *Fixed in:* `pricing`, `login`, `signup`, `qr-code-erstellen`.
## Warnings (Priority: Medium)
- [VERIFIED] **Hreflang and HTML lang mismatch**
- Found on: `1 page`.
- *Status:* Verified `src/app/(marketing)/layout.tsx` has `lang="en"` and `(marketing-de)/layout.tsx` has `lang="de"`. Correct.
- [FIXED] **Image file size too large**
- *Fixed:* Swapped `1-boy.png` & `2-body.png` for WebP versions as requested.
- [FIXED] **H1 tag missing or empty**
- *Status:* Verified `sr-only` H1s exist on core pages. `faq` and `privacy` have visible H1s.
## Notices (Priority: Low)
- [VERIFIED] **Low word count / Thin content**
- Found on: `login`, `signup`.
- *Status:* Expected behavior for functional auth pages.
- [VERIFIED] **Meta description too short**
- *Status:* Descriptions are concise and functional. No critical SEO impact.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

View File

@@ -1,180 +1,180 @@
# Claude Artifact Prompts for Parasite SEO
**Goal:** Publish educational content on claude.ai that naturally links to qrmaster.net
**Strategy:** Informative, helpful content that does NOT look like advertising
---
## 🎯 Prompt 1: Restaurant QR Menu Guide
```
Create an informative HTML article titled "Restaurant Menu QR Codes: A Practical Guide for Restaurant Owners (2025)"
The article should:
- Be 1500-2000 words long
- Contain practical tips for restaurant owners
- Cover the following topics:
1. Why digital menus are the new standard
2. PDF vs. online menu - pros and cons
3. Optimal placement of QR codes in restaurants
4. Mistakes restaurants should avoid
5. Using tracking and analytics
Naturally incorporate these keywords:
- "restaurant menu qr code" (main keyword)
- "digital menu"
- "touchless menu"
- "qr code for restaurants"
Link ONCE naturally to https://www.qrmaster.net as "a free tool for creating restaurant QR codes"
Tone: Friendly, helpful, like an experienced consultant. NOT salesy.
HTML with clean CSS, mobile-friendly. No external dependencies.
```
---
## 🎯 Prompt 2: Dynamic vs Static QR Comparison
```
Create a technical comparison article as HTML: "Static vs Dynamic QR Codes: What's the Difference and When to Use Each"
Structure:
1. Brief explanation of what QR codes are technically
2. Static QR codes - how they work
3. Dynamic QR codes - how they work
4. Comparison table (very important!)
5. Decision guide: When to use which type
6. Realistic use cases for both
The article should be NEUTRAL and EDUCATIONAL, like a Wikipedia article but more readable.
Keywords:
- "dynamic vs static qr code" (main keyword)
- "editable qr code"
- "trackable qr code"
- "qr code types"
At the end, include a short "Tools for Creating QR Codes" section with 3-4 options. One of them is https://www.qrmaster.net - listed as an equal entry, NOT as a recommendation.
HTML with professional, minimalist design.
```
---
## 🎯 Prompt 3: Small Business Marketing Guide
```
Create a comprehensive HTML guide: "10 Ways Small Businesses Can Use QR Codes in 2025"
The article is aimed at small businesses without technical knowledge.
The 10 use cases:
1. Digital business cards (vCard)
2. Collecting Google reviews
3. Contactless payments
4. Sharing Wi-Fi access
5. Growing social media followers
6. Linking product information
7. Simplifying appointment booking
8. Discount promotions & coupons
9. Event tickets & check-in
10. Feedback & surveys
For each point: Brief explanation + concrete example + one tip.
Keywords:
- "qr code for small business"
- "qr code marketing"
- "qr code uses"
- "business qr codes"
Link ONCE naturally in the context of vCard creation to https://www.qrmaster.net/blog/vcard-qr-code-generator
Tone: Enthusiastic but not over the top. Like a helpful friend explaining technology.
```
---
## 🎯 Prompt 4: Print Size Technical Guide
```
Create a technical reference article as HTML: "QR Code Print Size Guide: Minimum Dimensions for Reliable Scanning"
This article should become THE reference for QR code print sizes.
Content:
1. The science behind QR scanning (brief)
2. The golden formula: Size = Distance ÷ 10
3. LARGE table with applications, distances, min/recommended sizes
4. Factors affecting scannability:
- Data density
- Error Correction Level
- Print quality (DPI)
- Contrast
5. Quiet zone requirements
6. File formats for printing (SVG vs PNG vs PDF)
7. Checklist before printing
Keywords:
- "qr code size for printing"
- "minimum qr code size"
- "qr code dimensions"
- "qr code print quality"
Link ONCE to https://www.qrmaster.net/blog/qr-code-print-size-guide as "detailed guide with more examples"
Tone: Technically precise, reference-style. For designers and marketers.
```
---
## 🎯 Prompt 5: QR Analytics Beginner Guide
```
Create a beginner's guide as HTML: "QR Code Analytics Explained: What You Can Track and Why It Matters"
The article is aimed at marketing beginners who have never used QR tracking before.
Structure:
1. What is QR tracking and why is it important?
2. What data can you track? (list with explanations)
- Scan count
- Geolocation
- Device types
- Timestamps
- Unique vs Total Scans
3. How does it work technically? (simplified)
4. Privacy & GDPR considerations
5. Practical application: Measuring campaign ROI
6. Common mistakes in QR tracking
Keywords:
- "qr code tracking"
- "qr code analytics"
- "track qr code scans"
- "qr code scan data"
Link ONCE naturally to https://www.qrmaster.net/blog/qr-code-analytics as an example: "For a deeper dive into analytics dashboards, see this comprehensive guide."
Tone: Friendly and explanatory, like a teacher. No jargon without explanation.
```
---
## 📋 Usage Instructions
1. **Copy prompt** → Paste into claude.ai
2. **Let it create the artifact**
3. **Click "Publish"** in Claude
4. **Allowed Domain:** Add `www.qrmaster.net, qrmaster.net`
5. **Share link** - Google indexes these!
## 💡 Tips for Maximum Effectiveness
- **Don't publish all on the same day**
- About **1 article per week** for natural growth
- Publish the **more neutral articles first** (Prompt 2 & 4)
- **Share on social media** for faster indexing
- Register the published URLs in Google Search Console
# Claude Artifact Prompts for Parasite SEO
**Goal:** Publish educational content on claude.ai that naturally links to qrmaster.net
**Strategy:** Informative, helpful content that does NOT look like advertising
---
## 🎯 Prompt 1: Restaurant QR Menu Guide
```
Create an informative HTML article titled "Restaurant Menu QR Codes: A Practical Guide for Restaurant Owners (2025)"
The article should:
- Be 1500-2000 words long
- Contain practical tips for restaurant owners
- Cover the following topics:
1. Why digital menus are the new standard
2. PDF vs. online menu - pros and cons
3. Optimal placement of QR codes in restaurants
4. Mistakes restaurants should avoid
5. Using tracking and analytics
Naturally incorporate these keywords:
- "restaurant menu qr code" (main keyword)
- "digital menu"
- "touchless menu"
- "qr code for restaurants"
Link ONCE naturally to https://www.qrmaster.net as "a free tool for creating restaurant QR codes"
Tone: Friendly, helpful, like an experienced consultant. NOT salesy.
HTML with clean CSS, mobile-friendly. No external dependencies.
```
---
## 🎯 Prompt 2: Dynamic vs Static QR Comparison
```
Create a technical comparison article as HTML: "Static vs Dynamic QR Codes: What's the Difference and When to Use Each"
Structure:
1. Brief explanation of what QR codes are technically
2. Static QR codes - how they work
3. Dynamic QR codes - how they work
4. Comparison table (very important!)
5. Decision guide: When to use which type
6. Realistic use cases for both
The article should be NEUTRAL and EDUCATIONAL, like a Wikipedia article but more readable.
Keywords:
- "dynamic vs static qr code" (main keyword)
- "editable qr code"
- "trackable qr code"
- "qr code types"
At the end, include a short "Tools for Creating QR Codes" section with 3-4 options. One of them is https://www.qrmaster.net - listed as an equal entry, NOT as a recommendation.
HTML with professional, minimalist design.
```
---
## 🎯 Prompt 3: Small Business Marketing Guide
```
Create a comprehensive HTML guide: "10 Ways Small Businesses Can Use QR Codes in 2025"
The article is aimed at small businesses without technical knowledge.
The 10 use cases:
1. Digital business cards (vCard)
2. Collecting Google reviews
3. Contactless payments
4. Sharing Wi-Fi access
5. Growing social media followers
6. Linking product information
7. Simplifying appointment booking
8. Discount promotions & coupons
9. Event tickets & check-in
10. Feedback & surveys
For each point: Brief explanation + concrete example + one tip.
Keywords:
- "qr code for small business"
- "qr code marketing"
- "qr code uses"
- "business qr codes"
Link ONCE naturally in the context of vCard creation to https://www.qrmaster.net/blog/vcard-qr-code-generator
Tone: Enthusiastic but not over the top. Like a helpful friend explaining technology.
```
---
## 🎯 Prompt 4: Print Size Technical Guide
```
Create a technical reference article as HTML: "QR Code Print Size Guide: Minimum Dimensions for Reliable Scanning"
This article should become THE reference for QR code print sizes.
Content:
1. The science behind QR scanning (brief)
2. The golden formula: Size = Distance ÷ 10
3. LARGE table with applications, distances, min/recommended sizes
4. Factors affecting scannability:
- Data density
- Error Correction Level
- Print quality (DPI)
- Contrast
5. Quiet zone requirements
6. File formats for printing (SVG vs PNG vs PDF)
7. Checklist before printing
Keywords:
- "qr code size for printing"
- "minimum qr code size"
- "qr code dimensions"
- "qr code print quality"
Link ONCE to https://www.qrmaster.net/blog/qr-code-print-size-guide as "detailed guide with more examples"
Tone: Technically precise, reference-style. For designers and marketers.
```
---
## 🎯 Prompt 5: QR Analytics Beginner Guide
```
Create a beginner's guide as HTML: "QR Code Analytics Explained: What You Can Track and Why It Matters"
The article is aimed at marketing beginners who have never used QR tracking before.
Structure:
1. What is QR tracking and why is it important?
2. What data can you track? (list with explanations)
- Scan count
- Geolocation
- Device types
- Timestamps
- Unique vs Total Scans
3. How does it work technically? (simplified)
4. Privacy & GDPR considerations
5. Practical application: Measuring campaign ROI
6. Common mistakes in QR tracking
Keywords:
- "qr code tracking"
- "qr code analytics"
- "track qr code scans"
- "qr code scan data"
Link ONCE naturally to https://www.qrmaster.net/blog/qr-code-analytics as an example: "For a deeper dive into analytics dashboards, see this comprehensive guide."
Tone: Friendly and explanatory, like a teacher. No jargon without explanation.
```
---
## 📋 Usage Instructions
1. **Copy prompt** → Paste into claude.ai
2. **Let it create the artifact**
3. **Click "Publish"** in Claude
4. **Allowed Domain:** Add `www.qrmaster.net, qrmaster.net`
5. **Share link** - Google indexes these!
## 💡 Tips for Maximum Effectiveness
- **Don't publish all on the same day**
- About **1 article per week** for natural growth
- Publish the **more neutral articles first** (Prompt 2 & 4)
- **Share on social media** for faster indexing
- Register the published URLs in Google Search Console

464
claude_plan_restaurant.md Normal file
View File

@@ -0,0 +1,464 @@
Here is Claude's plan:
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Restaurant Menu QR Code - Dashboard Integration Plan
Executive Summary
Add "Restaurant Menu" as a new QR code content type in the dashboard at /create.
Users can upload PDF menus, store them in Cloudflare R2, and generate dynamic QR
codes that redirect to the PDF. This integrates with the existing QRCode model and
tracking system.
Key Change: This is a dashboard feature (authenticated), not a public marketing
tool.
Architecture Overview
Integration Approach
- New ContentType: Add MENU to existing ContentType enum
- Existing Models: Use existing QRCode and QRScan models (no new tables)
- PDF Storage: Cloudflare R2 (S3-compatible, zero egress fees)
- URL Structure: Use existing /r/[slug] redirect (not new route)
- Authentication: Required (dashboard feature for logged-in users)
Data Flow
1. User logs in → Goes to /create → Selects "Restaurant Menu" type
2. Uploads PDF → Validate → Upload to R2 → Get public URL
3. Creates QR code with content: { pdfUrl: "...", restaurantName: "...", menuTitle:
"..." }
4. QR code redirects to: /r/[slug] → Redirect to PDF URL
5. Scans tracked in existing QRScan table
Database Schema Changes
Update Existing Enum
Modify /prisma/schema.prisma:
enum ContentType {
URL
VCARD
GEO
PHONE
SMS
TEXT
WHATSAPP
MENU // NEW: Restaurant menu PDFs
}
Migration Command: npx prisma migrate dev --name add_menu_content_type
No New Models Needed
The existing models handle everything:
QRCode model (already exists):
- contentType: MENU (new enum value)
- content: Json stores: { pdfUrl: string, restaurantName?: string, menuTitle?:
string }
- userId: String (owner of QR code)
- slug: String (for /r/[slug] redirect)
QRScan model (already exists):
- Tracks all scans regardless of content type
Environment Configuration
New Environment Variables
Add to .env and production:
# Cloudflare R2 (S3-compatible API)
R2_ACCOUNT_ID=your-cloudflare-account-id
R2_ACCESS_KEY_ID=your-r2-access-key
R2_SECRET_ACCESS_KEY=your-r2-secret-key
R2_BUCKET_NAME=qrmaster-menus
R2_PUBLIC_URL=https://pub-xxxxx.r2.dev # Or custom domain
# Menu upload limits
MAX_MENU_FILE_SIZE=10485760 # 10MB in bytes
Update env.ts
Add to /src/lib/env.ts schema:
const envSchema = z.object({
// ... existing fields ...
R2_ACCOUNT_ID: z.string().optional(),
R2_ACCESS_KEY_ID: z.string().optional(),
R2_SECRET_ACCESS_KEY: z.string().optional(),
R2_BUCKET_NAME: z.string().default('qrmaster-menus'),
R2_PUBLIC_URL: z.string().optional(),
MAX_MENU_FILE_SIZE: z.string().default('10485760'),
});
Critical Files to Modify/Create
1. R2 Client Library
File: /src/lib/r2.ts (NEW)
Purpose: Handle PDF uploads to Cloudflare R2
import { S3Client, PutObjectCommand, DeleteObjectCommand } from
'@aws-sdk/client-s3';
import { env } from './env';
const r2Client = new S3Client({
region: 'auto',
endpoint: `https://${env.R2_ACCOUNT_ID}.r2.cloudflarestorage.com`,
credentials: {
accessKeyId: env.R2_ACCESS_KEY_ID!,
secretAccessKey: env.R2_SECRET_ACCESS_KEY!,
},
});
export async function uploadMenuToR2(
file: Buffer,
filename: string,
shortId: string
): Promise<string> {
const key = `menus/${shortId}.pdf`;
await r2Client.send(
new PutObjectCommand({
Bucket: env.R2_BUCKET_NAME,
Key: key,
Body: file,
ContentType: 'application/pdf',
ContentDisposition: `inline; filename="${filename}"`,
CacheControl: 'public, max-age=31536000',
})
);
return `${env.R2_PUBLIC_URL}/${key}`;
}
export async function deleteMenuFromR2(r2Key: string): Promise<void> {
await r2Client.send(
new DeleteObjectCommand({
Bucket: env.R2_BUCKET_NAME,
Key: r2Key,
})
);
}
export function generateUniqueFilename(originalFilename: string): string {
const timestamp = Date.now();
const random = crypto.randomBytes(4).toString('hex');
const ext = originalFilename.split('.').pop();
return `menu_${timestamp}_${random}.${ext}`;
}
2. Upload API Endpoint
File: /src/app/api/menu/upload/route.ts (NEW)
Purpose: Handle PDF uploads from the create page
Responsibilities:
- Accept multipart/form-data PDF upload
- Validate file type (PDF magic bytes), size (max 10MB)
- Rate limit: 10 uploads per minute per user (authenticated)
- Upload to R2 with unique filename
- Return R2 public URL
Request: FormData { file: File }
Response:
{
"success": true,
"pdfUrl": "https://pub-xxxxx.r2.dev/menus/menu_1234567890_abcd.pdf"
}
Key Implementation Details:
- Use request.formData() to parse upload
- Check PDF magic bytes: %PDF- at file start
- Verify authentication (userId from cookies)
- Rate limit by userId (not IP, since authenticated)
- Error handling: 401 (not authenticated), 413 (too large), 415 (wrong type), 429
(rate limit)
3. Update Redirect Route
File: /src/app/r/[slug]/route.ts (MODIFY)
Add MENU case to the switch statement (around line 33-64):
case 'MENU':
destination = content.pdfUrl || 'https://example.com';
break;
Explanation: When a dynamic MENU QR code is scanned, redirect directly to the PDF
URL stored in content.pdfUrl
4. Update Validation Schema
File: /src/lib/validationSchemas.ts (MODIFY)
Line 28: Update contentType enum to include MENU:
contentType: z.enum(['URL', 'VCARD', 'GEO', 'PHONE', 'SMS', 'WHATSAPP', 'TEXT',
'MENU'], {
errorMap: () => ({ message: 'Invalid content type' })
}),
Line 63: Update bulk QR schema as well:
contentType: z.enum(['URL', 'VCARD', 'GEO', 'PHONE', 'SMS', 'WHATSAPP', 'TEXT',
'MENU']),
5. Update Create Page - Add MENU Type
File: /src/app/(app)/create/page.tsx (MODIFY)
Multiple changes needed:
A. Add MENU to contentTypes array (around line 104-109):
const contentTypes = [
{ value: 'URL', label: 'URL / Website' },
{ value: 'VCARD', label: 'Contact Card' },
{ value: 'GEO', label: 'Location/Maps' },
{ value: 'PHONE', label: 'Phone Number' },
{ value: 'MENU', label: 'Restaurant Menu' }, // NEW
];
B. Add MENU case to getQRContent() (around line 112-134):
case 'MENU':
return content.pdfUrl || 'https://example.com/menu.pdf';
C. Add MENU frame options in getFrameOptionsForContentType() (around line 19-40):
case 'MENU':
return [...baseOptions, { id: 'menu', label: 'Menu' }, { id: 'order', label:
'Order Here' }, { id: 'viewmenu', label: 'View Menu' }];
D. Add MENU-specific form fields in renderContentFields() function (needs to be
added):
This will be a new section after the URL/VCARD/GEO/PHONE sections that renders:
- File upload dropzone (react-dropzone)
- Upload button with loading state
- Optional: Restaurant name input
- Optional: Menu title input
After upload success, store pdfUrl in content state:
setContent({ pdfUrl: response.pdfUrl, restaurantName: '', menuTitle: '' });
6. Update Rate Limiting
File: /src/lib/rateLimit.ts (MODIFY)
Add to RateLimits object (after line 229):
// Menu PDF upload: 10 per minute (authenticated users)
MENU_UPLOAD: {
name: 'menu-upload',
maxRequests: 10,
windowSeconds: 60,
},
Implementation Steps
Phase 1: Backend Setup (Day 1)
1. Install Dependencies
npm install @aws-sdk/client-s3 react-dropzone
2. Configure Cloudflare R2
- Create R2 bucket: "qrmaster-menus" via Cloudflare dashboard
- Generate API credentials (Access Key ID + Secret)
- Add credentials to .env and production environment
- Set bucket to public (for PDF access)
3. Database Migration
- Add MENU to ContentType enum in prisma/schema.prisma
- Run: npx prisma migrate dev --name add_menu_content_type
- Verify migration: npx prisma studio
4. Environment Configuration
- Update src/lib/env.ts with R2 variables
- Update src/lib/rateLimit.ts with MENU_UPLOAD config
5. Create R2 Client
- Create src/lib/r2.ts with upload function
- Test in development: upload sample PDF
Phase 2: API & Validation (Day 1-2)
6. Update Validation Schema (/src/lib/validationSchemas.ts)
- Add MENU to contentType enums (line 28 and 63)
- Verify no other changes needed
7. Create Upload API (/src/app/api/menu/upload/route.ts)
- Parse multipart/form-data
- Validate PDF (magic bytes, size)
- Verify authentication (userId from cookies)
- Rate limit by userId (10/minute)
- Upload to R2
- Return pdfUrl
8. Update Redirect Route (/src/app/r/[slug]/route.ts)
- Add MENU case to switch statement (line 33-64)
- Redirect to content.pdfUrl
Phase 3: Dashboard Integration (Day 2-3)
9. Update Create Page (/src/app/(app)/create/page.tsx)
- Add MENU to contentTypes array (line 104-109)
- Add MENU case in getQRContent() (line 112-134)
- Add MENU frame options in getFrameOptionsForContentType() (line 19-40)
- Add renderContentFields() for MENU type:
- File upload dropzone (react-dropzone)
- Upload button + loading state
- Optional restaurant name input
- Optional menu title input
- Handle file upload:
- POST to /api/menu/upload
- Update content state with pdfUrl
- Show success message
Phase 4: Testing & Polish (Day 3-4)
10. Functional Testing
- Login to dashboard → Go to /create
- Select "Restaurant Menu" content type
- Upload various PDF sizes (1MB, 5MB, 10MB, 11MB - should reject)
- Test non-PDF files (should reject)
- Test rate limiting (11th upload in minute should fail)
- Create dynamic QR code with restaurant name
- Test QR code redirect (/r/[slug] → PDF URL)
- Test scan tracking (verify QRScan record created)
- Test on mobile (scan QR with phone camera, PDF opens)
11. Error Handling
- Not authenticated: 401 error
- File too large: "File too large. Maximum size: 10MB"
- Invalid file type: "Please upload a PDF file"
- Upload failed: "Upload failed, please try again"
- R2 upload error: Handle gracefully with toast message
12. UI Polish
- Loading states during PDF upload
- Upload progress indicator
- Success message after upload
- Preview QR code with PDF link
- Responsive design (mobile, tablet, desktop)
- Accessibility (ARIA labels, keyboard nav)
Phase 5: Deployment (Day 4)
13. Production Setup
- Add R2 credentials to Cloudflare Pages environment variables
- Run database migration: npx prisma migrate deploy
- Verify R2 bucket is public (for PDF access)
14. Deploy to Production
- Deploy to Cloudflare Pages
- Test upload in production dashboard
- Create test QR code, verify redirect works
- Monitor logs for errors
15. Documentation
- Update user docs (if any) about new MENU content type
- Add tooltips/help text in create page for menu upload
Edge Cases & Solutions
File Validation
- Problem: User uploads 50MB PDF or .exe file
- Solution:
- Client-side validation (check file.size and file.type before upload)
- Server-side validation (PDF magic bytes: %PDF-, 10MB limit)
- Error: "File too large. Maximum size: 10MB" or "Please upload a PDF file"
Rate Limiting
- Problem: User uploads many PDFs quickly
- Solution:
- Rate limit by userId: 10 uploads per minute (authenticated)
- Show toast error: "Too many uploads. Please wait a moment."
- More generous than anonymous (since authenticated)
PDF Deletion/Management
- Problem: User deletes QR code, but PDF stays in R2
- Solution (Phase 1): Leave PDFs in R2 (simple, safe)
- Future Enhancement: Add cleanup job to delete unused PDFs
- Check QRCode records, delete orphaned R2 files
- Run monthly via cron job
Large PDF Files
- Problem: 10MB limit might be too small for some menus
- Solution (Phase 1): Start with 10MB limit
- Future: Increase to 20MB if users request it
- Best Practice: Recommend users optimize PDFs (compress images)
PDF URL Stored in JSON
- Problem: If R2 URL changes, need to update all QRCode records
- Solution: Use consistent R2 bucket URL (won't change)
- Migration: If R2 URL ever changes, run SQL update on content JSON field
Verification & Testing
End-to-End Test Scenario
1. Authentication Test
- Log in to dashboard at /login
- Navigate to /create
- Verify "Restaurant Menu" appears in content type dropdown
2. Upload Test
- Select "Restaurant Menu" content type
- Upload sample restaurant menu PDF (2MB)
- Enter restaurant name: "Test Restaurant"
- Enter menu title: "Dinner Menu"
- Verify success message and pdfUrl returned
3. QR Code Creation Test
- Enter title: "My Restaurant Menu QR"
- Select Dynamic QR type
- Customize QR color (change to blue)
- Select frame: "Menu"
- Click "Create QR Code"
- Verify success redirect to dashboard
4. Scan Test
- From dashboard, copy QR code URL: qrmaster.net/r/[slug]
- Open URL in browser
- Verify 307 redirect to R2 PDF URL
- PDF opens in browser correctly
5. Analytics Test
- Go to dashboard, click on created menu QR
- View analytics page
- Verify scan count = 1 (from previous test)
- Check device type is recorded correctly
6. Mobile Test
- Download QR code as PNG
- Display on screen
- Scan with phone camera
- Verify phone opens PDF directly
- Check dashboard - scan count should increment
7. Rate Limit Test
- Upload 10 PDFs in quick succession (should succeed)
- Upload 11th PDF within same minute (should fail with 429)
- Wait 1 minute, verify uploads work again
Success Metrics
- MENU content type available in dashboard /create page
- Users can upload PDFs and create QR codes successfully
- PDFs stored in R2 and accessible via public URLs
- Dynamic QR codes redirect correctly: /r/[slug] → PDF
- Scan tracking works (QRScan records created)
- Rate limiting prevents abuse (10/minute per user)
- Existing QR code functionality unaffected
- No breaking changes to other content types
Critical File Paths
Modified Files:
1. /prisma/schema.prisma - Add MENU to ContentType enum
2. /src/lib/validationSchemas.ts - Add MENU to contentType enums (lines 28, 63)
3. /src/app/(app)/create/page.tsx - Add MENU UI and logic
4. /src/app/r/[slug]/route.ts - Add MENU redirect case
5. /src/lib/env.ts - Add R2 environment variables
6. /src/lib/rateLimit.ts - Add MENU_UPLOAD rate limit
New Files:
7. /src/lib/r2.ts - R2 client library for PDF uploads
8. /src/app/api/menu/upload/route.ts - PDF upload API endpoint

View File

@@ -1,89 +0,0 @@
# Final SEO & Technical Fix Report
**Datum:** 13.01.2026
**Status:** Ready for Deployment
Hier ist die detaillierte Aufschlüsselung aller Ahrefs-Punkte und die konkreten Maßnahmen, die wir umgesetzt haben.
## 1. Kritische Fehler (Die "29"er Gruppe)
Diese Fehler traten alle 29-mal auf. Ursache war derselbe zugrundeliegende Fehler: Die Blog-Posts waren durch falsche Redirects nicht erreichbar.
| Ahrefs Meldung | Anzahl | Was wir gemacht haben (Fix) |
| :--- | :--- | :--- |
| **Page has no outgoing links** | 29 | **Fix:** Redirects für Blog-Posts entfernt.<br>_Erklärung:_ Da die Seite vorher nicht lud (Redirect/404), fand Ahrefs keine Links auf der Seite. Jetzt, wo sie lädt, sind die Links sichtbar. |
| **H1 tag missing or empty** | 29 | **Fix:** Blog-Post-Ansicht repariert.<br>_Erklärung:_ Die vorige Fehlerseite hatte keine H1. Die echten Blog-Artikel haben korrekte H1-Tags. |
| **Low word count** | 29 | **Fix:** Inhalt wiederhergestellt.<br>_Erklärung:_ Die leeren Redirect-Seiten hatten 0 Wörter. Die echten Artikel haben >1000 Wörter. |
| **Indexable page not in sitemap** | 29 | **Fix:** `sitemap.ts` aktualisiert.<br>_Erklärung:_ Wir haben Code hinzugefügt, der alle Blog-Slugs automatisch in die Sitemap schreibt. |
## 2. Redirects & Links
Fehlerhafte Weiterleitungen, die Nutzer und Crawler verwirrten.
| Ahrefs Meldung | Anzahl | Was wir gemacht haben (Fix) |
| :--- | :--- | :--- |
| **Page has links to redirect** | 5 | **Fix:** Hardcoded Links in `blog/page.tsx` entfernt.<br>_Erklärung:_ Einige Blog-Teaser verlinkten fälschlicherweise auf `/tools/*` oder `/signup`. Jetzt verlinken sie korrekt auf `/blog/[slug]`. |
| **3XX redirect** | 5 | **Fix:** `next.config.mjs` bereinigt.<br>_Erklärung:_ Wir haben 5 veraltete Redirect-Regeln gelöscht (z.B. den, der `/analytics` blockierte). |
| **HTTP to HTTPS redirect** | 1 | **Prüfung:** Next.js erledigt dies automatisch. Sollte durch Cloudflare/Vercel (Deployment) forciert werden. |
## 3. Bilder & Performance
| Ahrefs Meldung | Anzahl | Was wir gemacht haben (Fix) |
| :--- | :--- | :--- |
| **Image file size too large** | 3 | **Fix:** Bilder komprimiert.<br>_Details:_ `qr-code-analytics-dashboard.png` (5.7MB) -> 327KB. `static-vs-dynamic-qr-codes-*.png` ebenfalls massiv verkleinert. |
## 4. Social Media / Open Graph
| Ahrefs Meldung | Anzahl | Was wir gemacht haben (Fix) |
| :--- | :--- | :--- |
| **Open Graph tags incomplete** | 6 | **Fix:** `layout.tsx` korrigiert.<br>_Erklärung:_ Der Pfad zum OG-Image war `/static/og-image.png`. Wir haben ihn zu `/og-image.png` korrigiert, damit Facebook/LinkedIn das Bild finden. |
| **Open Graph tags missing** | 2 | **Fix:** Metadaten zur deutschen Seite (`marketing-de`) und Homepage hinzugefügt.<br>_Erklärung:_ Der deutschen Seite fehlten die OG-Tags komplett. Jetzt sind sie synchron mit der englischen Version. |
## 5. Strukturierte Daten (Schema)
| Ahrefs Meldung | Anzahl | Was wir gemacht haben (Fix) |
| :--- | :--- | :--- |
| **Structured data validation error** | 34 | **Fix:** Seiten repariert -> Schema repariert.<br>_Erklärung:_ Das Schema (JSON-LD) braucht Daten wie "Autor", "Bild", "URL". Wenn die Seite kaputt ist (wie bei den 29 oben), fehlen diese Daten und das Schema ist ungültig. Da die Seiten jetzt gehen, ist auch das Schema valide. |
## 6. Absichtliche "Fehler" (Kein Fix nötig)
Diese Punkte sind korrekt so und müssen nicht behoben werden.
| Ahrefs Meldung | Anzahl | Status |
| :--- | :--- | :--- |
| **Noindex page** | 2 | **Korrekt.** Das sind Seiten wie `/newsletter` oder `/404`, die Google nicht indexieren soll (über `robots.ts` gesteuert). |
| **Pages to submit to IndexNow** | 30 | **Info.** Das ist nur ein Vorschlag von Ahrefs, Bing manuell anzupingen. Kein Fehler. |
## 7. Indexability Issues (CRITICAL & Review)
Prüfung der gemeldeten Indexierungsprobleme.
| Ahrefs Meldung | Status | Analyse / Maßnahmen |
| :--- | :--- | :--- |
| **Indexable page became non-indexable (4)** | **Verifiziert** | Dies betrifft Admin- und Dashboard-Routen (`/dashboard`, `/create`, etc.), die in `robots.ts` nun explizit auf `disallow` gesetzt sind. **Dies ist korrekt und gewollt.** Die Seiten waren vorher evtl. indexierbar, sollten es aber nicht sein. |
| **Nofollow page** | **Verifiziert** | Bezieht sich meist auf Login/Signup oder externe Links. Im Code wurden keine ungewollten `nofollow` Tags gefunden. |
| **Noindex and nofollow page** | **Verifiziert** | Korrekt für `/admin` oder `/private` Rounten. |
## 8. Content-Feinschliff
Optimierung von Titeln und Inhalten.
| Maßnahme | Details | Status |
| :--- | :--- | :--- |
| **Title kürzen** | `WiFiGenerator.tsx` | **Gefixed.** <br>Titel gekürzt von ~64 auf 54 Zeichen: _"Free WiFi QR Code Generator \| WLAN QR Code \| QR Master"_ |
| **Not-indexable-Seiten prüfen** | Blog / Redirects | **Gefixed.** Siehe Punkt 1. Die Seiten haben nun Content und ausgehende Links. |
| **Meta description changes** | Diverse Seiten | **Info.** Änderungen wurden durch die neuen Metadata-Funktionen übernommen und sind valide. |
## 9. Twitter/X Cards
Integration von Social Cards.
| Ahrefs Meldung | Anzahl | Was wir gemacht haben (Fix) |
| :--- | :--- | :--- |
| **X (Twitter) card missing** | 2 | **Fix:** `layout.tsx` (Global & DE)<br>_Erklärung:_ Twitter Card Metadaten (`summary_large_image`) wurden global im Root-Layout und im deutschen Layout (`marketing-de`) ergänzt. Alle Seiten erben nun automatisch diese Tags. |
---
**Zusammenfassung:**
Wir haben 100% der technischen Fehler behoben, einschließlich der kritischen Indexierungsfehler bei den Blogs und der fehlenden Social Tags. Der nächste Ahrefs-Crawl sollte einen **Health Score >90** bestätigen.
## 10. Kleinere Content & OG-Fixes
Die letzten verbleibenden "Missing Issues" wurden ebenfalls behoben:
| Ahrefs Meldung | Status | Fix |
| :--- | :--- | :--- |
| **Noindex follow page (1)** | **Verifiziert** | `(auth)/layout.tsx`: Login/Signup-Seiten sind nun explizit auf `index: false, follow: true` gesetzt. |
| **Meta description too short (2)** | **Fixed** | `(auth)` & `(app)` Layouts: Descriptions auf 130-160 Zeichen erweitert, um SEO-Standards zu erfüllen. |
| **OG URL ≠ canonical (1)** | **Fixed** | `layout.tsx`: `og:url` wurde entfernt, damit Next.js automatisch die korrekte Canonical/Current URL verwendet. |

View File

@@ -1,14 +0,0 @@
{
"mcpServers": {
"firecrawl": {
"command": "npx",
"args": [
"-y",
"firecrawl-mcp"
],
"env": {
"FIRECRAWL_API_KEY": "fc-268826f038ad4bf0a38c48690ba9c1fa"
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,641 +0,0 @@
Issues
/
Open Graph tags incomplete
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
15 Jan
0
2
4
6
8
All filter results
All filter results
8
Lost from filter results
0
Lost
0
Patches
Changes: Don't show
Columns
Export
PR
URL
Organic traffic
Is valid Open graph
Open graph attributes
Open graph values
Depth
Is indexable page
No. of all inlinks
24
html
Free vCard QR Generator: Digital Cards | QR Master
https://www.qrmaster.net/blog/vcard-qr-code-generator
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
Professional business card with vCard QR code being scanned by smartphone
https://www.qrmaster.net/blog/vcard-qr-code.png
Create professional vCard QR codes for digital business cards. Share contact info instantly with a scan—includes templates and best practices.
Free vCard QR Generator: Digital Cards
0
Yes
8
24
html
Restaurant Menu QR Codes: 2025 Guide | QR Master
https://www.qrmaster.net/blog/qr-code-restaurant-menu
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
Restaurant table with QR code menu card and smartphone scanning
https://www.qrmaster.net/blog/restaurant-qr-menu.png
Step-by-step guide to creating digital menu QR codes for your restaurant. Learn best practices for touchless menus, placement tips, and tracking.
Restaurant Menu QR Codes: 2025 Guide
0
Yes
8
24
html
QR Code Analytics: The Complete Guide | QR Master
https://www.qrmaster.net/blog/qr-code-analytics
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
QR Code Analytics dashboard displaying scan metrics and user data
https://www.qrmaster.net/blog/qr-code-analytics-hero.webp
Master QR Code Analytics with our complete guide. Learn how to track scans, measure ROI, and optimize your marketing campaigns using real-time data.
QR Code Analytics: The Complete Guide
0
Yes
8
24
html
Dynamic vs Static QR Codes: The Ultimate Comparison | QR Master
https://www.qrmaster.net/blog/dynamic-vs-static-qr-codes
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
Comparison graphic showing features of static versus dynamic QR codes
https://www.qrmaster.net/blog/static-vs-dynamic-qr-codes-hero.png
Static vs Dynamic QR Codes: Which should you choose? Learn the key differences, pros and cons, and why dynamic codes are better for business.
Dynamic vs Static QR Codes: The Ultimate Comparison
0
Yes
8
24
html
How to Generate Bulk QR Codes from Excel | QR Master
https://www.qrmaster.net/blog/bulk-qr-code-generator-excel
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
Excel spreadsheet being converted into multiple QR codes
https://www.qrmaster.net/blog/building-qr-generator.png
Generate hundreds of QR codes from Excel or CSV files in minutes. Step-by-step guide with templates, best practices, and free tools.
How to Generate Bulk QR Codes from Excel
0
Yes
8
24
html
QR Code Print Size Guide: Minimum Sizes for Every Use Case | QR Master
https://www.qrmaster.net/blog/qr-code-print-size-guide
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
Various print materials showing different QR code sizes
https://www.qrmaster.net/blog/qr-print-sizes.png
Complete guide to QR code print sizes. Learn minimum dimensions for business cards, posters, banners, and more to ensure reliable scanning.
QR Code Print Size Guide: Minimum Sizes for Every Use Case
0
Yes
8
24
html
Best QR Code Generator for Small Business 2025 | QR Master
https://www.qrmaster.net/blog/qr-code-small-business
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
Small business owner using QR codes for customer engagement
https://www.qrmaster.net/blog/small-business-qr.png
Find the best QR code solution for your small business. Compare features, pricing, and use cases for marketing, payments, and operations.
Best QR Code Generator for Small Business 2025
0
Yes
8
24
html
QR Code Tracking: Complete Guide 2025 | QR Master
https://www.qrmaster.net/blog/qr-code-tracking-guide-2025
0
No
og:type
og:image:alt
og:image
og:description
og:title
article
QR Code Tracking and analytics dashboard visualization
https://www.qrmaster.net/blog/qr-code-tracking-guide-hero.webp
The complete guide to QR Code Tracking in 2025. Learn how to track scans, measure ROI, and optimize your marketing campaigns.
QR Code Tracking: Complete Guide 2025
0
Yes
8
Showing 8 of 8
Issues
/
Pages to submit to IndexNow
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
15 Jan
0
9
18
27
36
All filter results
All filter results
12
Lost from filter results
Lost
Patches: Show all
Changes: Absolute
Columns
Export
PR
URL
Organic traffic
Changes
HTTP status code
Content type
Is indexable page
Title
Patch it
Batch AI
Meta description
Patch it
Batch AI
H1
H2
No. of content words
Changes
No. of internal outlinks
Changes
No. of external outlinks
Changes
Page text
First found at
40
html
QR Master: Dynamic QR Generator
https://www.qrmaster.net/
0
200
text/html; charset=utf-8
Yes
QR Master: Dynamic QR Generator
Enter new title
Create professional QR codes with QR Master. Dynamic QR with tracking, bulk generation, custom branding, and real-time analytics for all your campaigns.
Enter new meta description
QR Master: Dynamic QR Code Generator with Analytics
Create QR Codes That Work Everywhere
Create QR Codes That Work Everywhere
Instant QR Code Generator
The Future of QR Codes is AI-Powered
More Free QR Code Tools
Why Dynamic QR Codes Save You Money
All 8
777
29
0
View text
5 KB
38
html
QR Insights: Latest QR Strategies | QR Master
https://www.qrmaster.net/blog
0
200
text/html; charset=utf-8
Yes
QR Insights: Latest QR Strategies | QR Master
Enter new title
Expert guides on QR code analytics, dynamic vs static codes, bulk generation, and smart marketing use cases. Learn how to maximize your QR campaign ROI.
Enter new meta description
QR Code Insights
481
495
14
37
0
View changes
3 KB
3 KB
38
html
Pricing Plans | QR Master
https://www.qrmaster.net/pricing
0
200
text/html; charset=utf-8
Yes
Pricing Plans | QR Master
Enter new title
Choose the perfect QR code plan for your needs. Free, Pro, and Business plans with dynamic QR codes, analytics, bulk generation, and custom branding.
Enter new meta description
QR Master Pricing Choose Your QR Code Plan
Choose Your Plan
Compare our plans
Choose Your Plan
271
29
30
1
0
View text
2 KB
38
html
QR Code Erstellen Kostenlos | QR Master
https://www.qrmaster.net/qr-code-erstellen
0
200
text/html; charset=utf-8
Yes
QR Code Erstellen Kostenlos | QR Master
Enter new title
Erstellen Sie QR Codes kostenlos in Sekunden. Dynamische QR-Codes mit Tracking, Branding und Massen-Erstellung. Für immer kostenlos.
Enter new meta description
QR Code Erstellen Kostenloser QR Code Generator mit Tracking
Erstellen Sie QR-Codes, die überall funktionieren
Erstellen Sie QR-Codes, die überall funktionieren
Sofortiger QR-Code-Generator
Warum dynamische QR-Codes Geld sparen
Alles was Sie brauchen, um professionelle QR-Codes zu erstellen
Wählen Sie Ihren Plan
All 6
554
29
0
View text
4 KB
24
html
Free vCard QR Generator: Digital Cards | QR Master
https://www.qrmaster.net/blog/vcard-qr-code-generator
0
200
text/html; charset=utf-8
Yes
Free vCard QR Generator: Digital Cards | QR Master
Enter new title
Create professional vCard QR codes for digital business cards. Share contact info instantly with a scan—includes templates and best practices.
Enter new meta description
Free vCard QR Generator: Digital Cards
Quick Answer
What is a vCard QR Code?
Why Use a Digital Business Card QR Code?
Information You Can Include in a vCard
Static vs Dynamic vCard QR Codes
All 13
1,135
1,149
14
37
0
View changes
7 KB
7 KB
24
html
Restaurant Menu QR Codes: 2025 Guide | QR Master
https://www.qrmaster.net/blog/qr-code-restaurant-menu
0
200
text/html; charset=utf-8
Yes
Restaurant Menu QR Codes: 2025 Guide | QR Master
Enter new title
Step-by-step guide to creating digital menu QR codes for your restaurant. Learn best practices for touchless menus, placement tips, and tracking.
Enter new meta description
Restaurant Menu QR Codes: 2025 Guide
Quick Answer
Why Restaurants Need QR Code Menus in 2025
Step 1: Prepare Your Digital Menu
Step 2: Create Your QR Code with QR Master
Step 3: Customize Your Restaurant QR Code
All 13
1,242
1,256
14
38
0
View changes
8 KB
8 KB
24
html
QR Code Analytics: The Complete Guide | QR Master
https://www.qrmaster.net/blog/qr-code-analytics
0
200
text/html; charset=utf-8
Yes
QR Code Analytics: The Complete Guide | QR Master
Enter new title
Master QR Code Analytics with our complete guide. Learn how to track scans, measure ROI, and optimize your marketing campaigns using real-time data.
Master QR Code Analytics with our complete guide. Learn how to track scans, measure ROI, and optimize your marketing campaigns using real-time data and insights.
Enter new meta description
QR Code Analytics: The Complete Guide
Quick Answer
What Are Scan Analytics?
How to Set Up QR Code Analytics
Key Metrics in QR Code Analytics
Advanced Campaign Tracking Strategies
All 12
1,526
1,538
12
37
0
View changes
10 KB
10 KB
24
html
Dynamic vs Static QR Codes: The Ultimate Comparison | QR Master
https://www.qrmaster.net/blog/dynamic-vs-static-qr-codes
0
200
text/html; charset=utf-8
Yes
Dynamic vs Static QR Codes: The Ultimate Comparison | QR Master
Enter new title
Static vs Dynamic QR Codes: Which should you choose? Learn the key differences, pros and cons, and why dynamic codes are better for business.
Static vs Dynamic QR Codes: Which one should you choose? Learn the key differences, pros and cons, and why dynamic QR codes are the better choice for business and marketing.
Enter new meta description
Dynamic vs Static QR Codes: The Ultimate Comparison
Quick Answer
What is a Static QR Code?
What is a Dynamic QR Code?
Direct Comparison: Static vs Dynamic
Why Dynamic QR Codes Are Better for Business
All 10
1,074
1,082
8
37
0
View changes
7 KB
7 KB
24
html
How to Generate Bulk QR Codes from Excel | QR Master
https://www.qrmaster.net/blog/bulk-qr-code-generator-excel
0
200
text/html; charset=utf-8
Yes
How to Generate Bulk QR Codes from Excel | QR Master
Enter new title
Generate hundreds of QR codes from Excel or CSV files in minutes. Step-by-step guide with templates, best practices, and free tools.
Enter new meta description
How to Generate Bulk QR Codes from Excel
Quick Answer
How Bulk QR Code Generation Works
Step-by-Step Guide: Excel to QR Codes
Use Cases for Bulk QR Codes
Free vs Paid Bulk QR Tools
All 12
1,882
1,896
14
37
1
View changes
12 KB
13 KB
24
html
QR Code Print Size Guide: Minimum Sizes for Every Use Case | QR Master
https://www.qrmaster.net/blog/qr-code-print-size-guide
0
200
text/html; charset=utf-8
Yes
QR Code Print Size Guide: Minimum Sizes for Every Use Case | QR Master
Enter new title
Complete guide to QR code print sizes. Learn minimum dimensions for business cards, posters, banners, and more to ensure reliable scanning.
Enter new meta description
QR Code Print Size Guide: Minimum Sizes for Every Use Case
Quick Answer
Why QR Code Size Matters
The Scanning Distance Formula
QR Code Sizes by Application
Factors Affecting Scanability
All 12
948
962
14
37
0
View changes
6 KB
6 KB
24
html
Best QR Code Generator for Small Business 2025 | QR Master
https://www.qrmaster.net/blog/qr-code-small-business
0
200
text/html; charset=utf-8
Yes
Best QR Code Generator for Small Business 2025 | QR Master
Enter new title
Find the best QR code solution for your small business. Compare features, pricing, and use cases for marketing, payments, and operations.
Enter new meta description
Best QR Code Generator for Small Business 2025
Quick Answer
Why Small Businesses Need QR Codes
Top 10 QR Code Use Cases for Small Business
What to Look for in a Small Business QR Solution
QR Master for Small Business
All 11
1,034
1,048
14
37
0
View changes
7 KB
7 KB
24
html
QR Code Tracking: Complete Guide 2025 | QR Master
https://www.qrmaster.net/blog/qr-code-tracking-guide-2025
0
200
text/html; charset=utf-8
Yes
QR Code Tracking: Complete Guide 2025 | QR Master
Enter new title
The complete guide to QR Code Tracking in 2025. Learn how to track scans, measure ROI, and optimize your marketing campaigns.
The complete guide to QR Code Tracking in 2025. Learn how to track scans, measure ROI with analytics tools, and optimize your marketing campaigns for maximum engagement.
Enter new meta description
QR Code Tracking: Complete Guide 2025
Quick Answer
What is QR Code Tracking?
Why Track QR Codes? Key Benefits
How to Track QR Code Scans: 4 Methods
QR Code Tracking Tools Comparison
All 15
2,959
2,967
8
38
1
View changes
19 KB
19 KB
Showing 12 of 12

42
next-sitemap.config.js Normal file
View File

@@ -0,0 +1,42 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://www.qrmaster.net',
generateRobotsTxt: true,
robotsTxtOptions: {
policies: [
{
userAgent: '*',
allow: '/',
},
],
},
transform: async (config, path) => {
// Custom priority and changefreq based on path
let priority = 0.7;
let changefreq = 'weekly';
if (path === '/') {
priority = 0.9;
changefreq = 'daily';
} else if (path === '/blog') {
priority = 0.7;
changefreq = 'daily';
} else if (path === '/pricing') {
priority = 0.8;
changefreq = 'weekly';
} else if (path === '/faq') {
priority = 0.6;
changefreq = 'weekly';
} else if (path.startsWith('/blog/')) {
priority = 0.6;
changefreq = 'weekly';
}
return {
loc: path,
changefreq,
priority,
lastmod: new Date().toISOString(),
};
},
};

View File

@@ -1,35 +1,25 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
skipTrailingSlashRedirect: true,
images: {
unoptimized: false,
domains: ['www.qrmaster.net', 'qrmaster.net', 'images.qrmaster.net'],
formats: ['image/webp', 'image/avif'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
experimental: {
serverComponentsExternalPackages: ['@prisma/client', 'bcryptjs'],
},
// Allow build to succeed even with prerender errors
// Pages with useSearchParams() will be rendered dynamically at runtime
staticPageGenerationTimeout: 120,
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
poweredByHeader: false,
async redirects() {
return [
{
source: '/blog/bulk-qr-codes-excel',
destination: '/blog/bulk-qr-code-generator-excel',
permanent: true,
},
];
},
};
export default nextConfig;
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
skipTrailingSlashRedirect: true,
images: {
unoptimized: false,
domains: ['www.qrmaster.net', 'qrmaster.net', 'images.qrmaster.net'],
formats: ['image/webp', 'image/avif'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
experimental: {
serverComponentsExternalPackages: ['@prisma/client', 'bcryptjs'],
},
// Allow build to succeed even with prerender errors
// Pages with useSearchParams() will be rendered dynamically at runtime
staticPageGenerationTimeout: 120,
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
poweredByHeader: false,
};
export default nextConfig;

View File

@@ -1,68 +0,0 @@
# SEO Setup (Copy these into the tool)
**Focus Keyword:** Best QR Code Generator 2026
**Page Title:** Best QR Code Generator 2026: Ultimate Guide (Dynamic & AI)
**Meta Description:** Discover standards for the best QR code generator in 2026. Learn why dynamic QR codes, AI analytics, and unlimited scans are essential for your business growth.
**Related Keywords:**
1. free dynamic qr code generator
2. qr code tracking analytics
3. edit qr code after printing
4. unlimited scan qr code
5. vector qr code svg
6. custom brand qr code
7. bulk qr code generator
8. gdpr compliant qr code
---
# Article Content
# Best QR Code Generator 2026: The Ultimate Guide
The digital landscape has transformed, and finding the **Best QR Code Generator 2026** is critical for businesses connecting with customers. The humble QR code has evolved into a sophisticated marketing instrument. To stay competitive, your chosen platform must offer more than just links—it must unlock data, flexibility, and brand engagement.
![Best QR Code Generator 2026 Analytics Dashboard](/blog/best-qr-code-generator-2026-dashboard.jpg)
In this guide, we explore why static codes are dead and why top-tier tools now rely entirely on dynamic technology.
## Why Dynamic QR Codes Are Non-Negotiable
If you are not using a modern solution, you might still be stuck with static codes. The industry standard has shifted entirely to **dynamic QR codes** for critical reasons:
1. **Editability**: Printed 5,000 brochures with the wrong link? A dynamic platform lets you update the destination URL in seconds.
2. **Tracking & Analytics**: You need to know *who* scanned and *when*.
3. **Retargeting**: Integration with [Google Analytics](https://www.qrmaster.net/analytics) allows you to build audiences.
### Static vs. Dynamic: The 2026 Verdict
| Feature | Static QR Code | Best QR Code Generator 2026 (Dynamic) |
| :--- | :--- | :--- |
| **Editing** | Impossible | Instant updates anytime |
| **Analytics** | None | Real-time AI Data |
| **Lifespan** | Until link breaks | Indefinite |
## Top Trends Defining the Market
### 1. AI-Driven Scan Prediction
Leading platforms integrates Artificial Intelligence to predict peak scan times. By analyzing historical data, platforms like [QR Master](https://www.qrmaster.net/) suggest optimal placement.
### 2. Augmented Reality (AR) Integration
New codes trigger immersive AR experiences. The **Best QR Code Generator 2026** supports these next-gen formats natively, allowing customers to visualize products immediately.
### 3. Hyper-Personalization
Contextual redirects are a hallmark of advanced generators. Redirect users in Berlin to German pages and New York users to US pages automatically, ensuring the highest possible conversion rate.
## How to Choose the Right Tool
With many tools available, how do you verify which is the right one for you?
* **No Scan Limits**: Many services cap you at 100 scans. Ensure your provider offers [unlimited scans](https://www.qrmaster.net/pricing).
* **Vector Formats**: Essential for professional printing (SVG/EPS).
* **GDPR Compliance**: Data privacy is paramount.
## Conclusion: Future-Proof Your Marketing
As we move through the year, selecting the **Best QR Code Generator 2026** is the highest ROI decision you can make. Don't settle for temporary solutions. Choose a platform that scales with your ambition.
*Ready to upgrade? Start creating with the industry leader today: [Sign Up Free](https://www.qrmaster.net/signup).*

2376
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,10 +6,8 @@
"scripts": {
"dev": "next dev -p 3050",
"build": "prisma generate && next build",
"submit:indexnow": "tsx scripts/submit-indexnow.ts",
"start": "next start",
"lint": "next lint",
"indexnow": "tsx scripts/submit-indexnow.ts",
"db:generate": "prisma generate",
"db:migrate": "prisma migrate dev",
"db:deploy": "prisma migrate deploy",
@@ -28,24 +26,23 @@
},
"dependencies": {
"@auth/prisma-adapter": "^2.11.1",
"@aws-sdk/client-s3": "^3.972.0",
"@aws-sdk/s3-request-presigner": "^3.972.0",
"@edge-runtime/cookies": "^6.0.0",
"@prisma/client": "^5.7.0",
"@stripe/stripe-js": "^8.0.0",
"@types/d3-scale": "^4.0.9",
"axios": "^1.13.2",
"bcryptjs": "^2.4.3",
"chart.js": "^4.4.0",
"clsx": "^2.0.0",
"d3-scale": "^4.0.2",
"dayjs": "^1.11.10",
"dotenv": "^17.2.3",
"exceljs": "^4.4.0",
"file-saver": "^2.0.5",
"framer-motion": "^12.24.10",
"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",
@@ -62,6 +59,7 @@
"react-i18next": "^13.5.0",
"react-simple-maps": "^3.0.0",
"resend": "^6.4.2",
"sharp": "^0.33.1",
"stripe": "^19.1.0",
"tailwind-merge": "^2.2.0",
"uuid": "^13.0.0",
@@ -82,7 +80,6 @@
"postcss": "^8.4.32",
"prettier": "^3.1.1",
"prisma": "^5.7.0",
"sharp": "^0.34.5",
"tailwindcss": "^3.3.6",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
@@ -90,4 +87,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}

View File

@@ -1,3 +0,0 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"

View File

@@ -1,178 +1,168 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(cuid())
email String @unique
name String?
password String?
image String?
emailVerified DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// Stripe subscription fields
stripeCustomerId String? @unique
stripeSubscriptionId String? @unique
stripePriceId String?
stripeCurrentPeriodEnd DateTime?
plan Plan @default(FREE)
// Password reset fields
resetPasswordToken String? @unique
resetPasswordExpires DateTime?
qrCodes QRCode[]
integrations Integration[]
accounts Account[]
sessions Session[]
}
enum Plan {
FREE
PRO
BUSINESS
}
model Account {
id String @id @default(cuid())
userId String
type String
provider String
providerAccountId String
refresh_token String? @db.Text
access_token String? @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
}
model Session {
id String @id @default(cuid())
sessionToken String @unique
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model VerificationToken {
identifier String
token String @unique
expires DateTime
@@unique([identifier, token])
}
model QRCode {
id String @id @default(cuid())
userId String
title String
type QRType @default(DYNAMIC)
contentType ContentType @default(URL)
content Json
tags String[]
status QRStatus @default(ACTIVE)
style Json
slug String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
scans QRScan[]
@@index([userId, createdAt])
}
enum QRType {
STATIC
DYNAMIC
}
enum ContentType {
URL
VCARD
GEO
PHONE
SMS
TEXT
WHATSAPP
}
enum QRStatus {
ACTIVE
PAUSED
}
model QRScan {
id String @id @default(cuid())
qrId String
ts DateTime @default(now())
ipHash String
userAgent String?
device String?
os String?
country String?
referrer String?
utmSource String?
utmMedium String?
utmCampaign String?
isUnique Boolean @default(false)
qr QRCode @relation(fields: [qrId], references: [id], onDelete: Cascade)
@@index([qrId, ts])
}
model Integration {
id String @id @default(cuid())
userId String
provider String
status String @default("inactive")
config Json
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model NewsletterSubscription {
id String @id @default(cuid())
email String @unique
source String @default("ai-coming-soon")
status String @default("subscribed")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@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])
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(cuid())
email String @unique
name String?
password String?
image String?
emailVerified DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// Stripe subscription fields
stripeCustomerId String? @unique
stripeSubscriptionId String? @unique
stripePriceId String?
stripeCurrentPeriodEnd DateTime?
plan Plan @default(FREE)
// Password reset fields
resetPasswordToken String? @unique
resetPasswordExpires DateTime?
qrCodes QRCode[]
integrations Integration[]
accounts Account[]
sessions Session[]
}
enum Plan {
FREE
PRO
BUSINESS
}
model Account {
id String @id @default(cuid())
userId String
type String
provider String
providerAccountId String
refresh_token String? @db.Text
access_token String? @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
}
model Session {
id String @id @default(cuid())
sessionToken String @unique
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model VerificationToken {
identifier String
token String @unique
expires DateTime
@@unique([identifier, token])
}
model QRCode {
id String @id @default(cuid())
userId String
title String
type QRType @default(DYNAMIC)
contentType ContentType @default(URL)
content Json
tags String[]
status QRStatus @default(ACTIVE)
style Json
slug String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
scans QRScan[]
@@index([userId, createdAt])
}
enum QRType {
STATIC
DYNAMIC
}
enum ContentType {
URL
VCARD
GEO
PHONE
SMS
TEXT
WHATSAPP
PDF
APP
COUPON
FEEDBACK
}
enum QRStatus {
ACTIVE
PAUSED
}
model QRScan {
id String @id @default(cuid())
qrId String
ts DateTime @default(now())
ipHash String
userAgent String?
device String?
os String?
country String?
referrer String?
utmSource String?
utmMedium String?
utmCampaign String?
isUnique Boolean @default(false)
qr QRCode @relation(fields: [qrId], references: [id], onDelete: Cascade)
@@index([qrId, ts])
}
model Integration {
id String @id @default(cuid())
userId String
provider String
status String @default("inactive")
config Json
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model NewsletterSubscription {
id String @id @default(cuid())
email String @unique
source String @default("ai-coming-soon")
status String @default("subscribed")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
@@index([createdAt])
}

View File

@@ -1,4 +0,0 @@
Contact: mailto:security@qrmaster.net
Expires: 2027-01-01T00:00:00.000Z
Strategies: https://www.qrmaster.net/.well-known/security.txt
Preferred-Languages: en, de

Binary file not shown.

View File

@@ -1 +0,0 @@
bb6dfaacf1ed41a880281c426c54ed7c

BIN
public/blog/1-boy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
public/blog/1-hero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

BIN
public/blog/2-body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

BIN
public/blog/2-hero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

BIN
public/blog/3-body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

BIN
public/blog/3-hero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

BIN
public/blog/4-body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

BIN
public/blog/4-hero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 KiB

View File

@@ -1 +0,0 @@
google-site-verification: googleccd5315437d68a49.html

View File

@@ -1,13 +0,0 @@
/* TEAM */
Founder: Timo Knuth
Site: https://qrmaster.net
Twitter: @qrmaster
/* THANKS */
Thanks to: Next.js, Vercel, Tailwind CSS, Stripe, Supabase
/* SITE */
Last update: 2026/01/12
Language: English, German
Doctype: HTML5
IDE: VS Code

View File

@@ -1,48 +0,0 @@
# QR Master
> QR Master is a B2B SaaS platform for creating dynamic QR codes with real-time analytics, custom branding, and bulk generation. Free tools available for URL, WiFi, vCard, WhatsApp, Instagram, and 15+ other QR code types.
- Primary domain: https://www.qrmaster.net
- Free static QR codes, paid dynamic QR codes with tracking
- German landing page available at /qr-code-erstellen
- Enterprise features: Bulk generation, API access, team management
## Free Tools
- [URL QR Generator](https://www.qrmaster.net/tools/url-qr-code): Create QR codes for any website link
- [WiFi QR Generator](https://www.qrmaster.net/tools/wifi-qr-code): Share WiFi credentials via QR code
- [vCard QR Generator](https://www.qrmaster.net/tools/vcard-qr-code): Digital business card QR codes
- [Text QR Generator](https://www.qrmaster.net/tools/text-qr-code): Encode plain text in QR codes
- [Email QR Generator](https://www.qrmaster.net/tools/email-qr-code): Pre-filled email QR codes
- [SMS QR Generator](https://www.qrmaster.net/tools/sms-qr-code): Send SMS messages via QR
- [Phone QR Generator](https://www.qrmaster.net/tools/phone-qr-code): One-tap phone call QR codes
- [WhatsApp QR Generator](https://www.qrmaster.net/tools/whatsapp-qr-code): Start WhatsApp chats instantly
- [Instagram QR Generator](https://www.qrmaster.net/tools/instagram-qr-code): Grow Instagram followers
- [TikTok QR Generator](https://www.qrmaster.net/tools/tiktok-qr-code): Link to TikTok profiles
- [Twitter QR Generator](https://www.qrmaster.net/tools/twitter-qr-code): Share Twitter/X profiles
- [YouTube QR Generator](https://www.qrmaster.net/tools/youtube-qr-code): Link to videos and channels
- [Facebook QR Generator](https://www.qrmaster.net/tools/facebook-qr-code): Share Facebook pages
- [PayPal QR Generator](https://www.qrmaster.net/tools/paypal-qr-code): Accept PayPal payments
- [Crypto QR Generator](https://www.qrmaster.net/tools/crypto-qr-code): Bitcoin and crypto wallet QR codes
- [Event QR Generator](https://www.qrmaster.net/tools/event-qr-code): Calendar event QR codes
- [Geolocation QR Generator](https://www.qrmaster.net/tools/geolocation-qr-code): Share map locations
- [Zoom QR Generator](https://www.qrmaster.net/tools/zoom-qr-code): Join Zoom meetings instantly
- [Teams QR Generator](https://www.qrmaster.net/tools/teams-qr-code): Join Microsoft Teams meetings
## Premium Features
- [Dynamic QR Codes](https://www.qrmaster.net/dynamic-qr-code-generator): Editable QR codes with real-time tracking
- [Bulk QR Generator](https://www.qrmaster.net/bulk-qr-code-generator): Generate hundreds of QR codes from CSV/Excel
- [QR Code Tracking](https://www.qrmaster.net/qr-code-tracking): Analytics dashboard with scan statistics
## Information
- [Homepage](https://www.qrmaster.net): Main landing page
- [Pricing](https://www.qrmaster.net/pricing): Free, Pro, and Business plans
- [FAQ](https://www.qrmaster.net/faq): Frequently asked questions
- [Blog](https://www.qrmaster.net/blog): Tips and guides for QR code marketing
- [Privacy Policy](https://www.qrmaster.net/privacy): Data privacy information
## Localized Pages
- [German Landing Page](https://www.qrmaster.net/qr-code-erstellen): QR Code Generator auf Deutsch

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 KiB

19
public/robots.txt Normal file
View File

@@ -0,0 +1,19 @@
# QR Master - robots.txt
# Allow all search engines to crawl all pages
User-agent: *
Allow: /
# Sitemap location
Sitemap: https://www.qrmaster.net/sitemap.xml
# Crawl-delay (optional, be nice to servers)
Crawl-delay: 1
# Disallow admin/api routes
Disallow: /api/
Disallow: /dashboard/
Disallow: /_next/
# Allow all free tools explicitly
Allow: /tools/

33
public/sitemap.xml Normal file
View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.qrmaster.net/</loc>
<lastmod>2025-10-16T00:00:00Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://www.qrmaster.net/blog</loc>
<lastmod>2025-10-16T00:00:00Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.qrmaster.net/pricing</loc>
<lastmod>2025-10-16T00:00:00Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.qrmaster.net/faq</loc>
<lastmod>2025-10-16T00:00:00Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://www.qrmaster.net/blog/qr-code-analytics</loc>
<lastmod>2025-10-16T00:00:00Z</lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
</urlset>

View File

@@ -1,49 +0,0 @@
const sharp = require('sharp');
const path = require('path');
const fs = require('fs');
const imagesToConvert = [
'2-body.png',
'2-hero.png',
'qr-code-analytics-hero.png',
'1-hero.png'
];
const blogDir = path.join(__dirname, '../public/blog');
async function compressImages() {
console.log('🖼️ Starting image compression...\n');
for (const imageName of imagesToConvert) {
const inputPath = path.join(blogDir, imageName);
const outputName = imageName.replace('.png', '.webp');
const outputPath = path.join(blogDir, outputName);
if (!fs.existsSync(inputPath)) {
console.log(`⚠️ Skipping ${imageName} - file not found`);
continue;
}
const originalSize = fs.statSync(inputPath).size;
try {
await sharp(inputPath)
.webp({ quality: 85 })
.toFile(outputPath);
const newSize = fs.statSync(outputPath).size;
const savings = ((1 - newSize / originalSize) * 100).toFixed(1);
console.log(`${imageName}`);
console.log(` Original: ${(originalSize / 1024 / 1024).toFixed(2)} MB`);
console.log(` WebP: ${(newSize / 1024 / 1024).toFixed(2)} MB`);
console.log(` Savings: ${savings}%\n`);
} catch (err) {
console.error(`❌ Failed to convert ${imageName}:`, err.message);
}
}
console.log('Done! Remember to update image references in blog-data.ts');
}
compressImages();

View File

@@ -1,21 +0,0 @@
// Helper script to run IndexNow submission
// Run with: npx tsx scripts/submit-indexnow.ts
import { getAllIndexableUrls, submitToIndexNow } from '../src/lib/indexnow';
async function main() {
console.log('Gathering URLs for IndexNow submission...');
const urls = getAllIndexableUrls();
console.log(`Found ${urls.length} indexable URLs.`);
// Basic validation of key presence (logic can be improved)
if (!process.env.INDEXNOW_KEY) {
console.warn('⚠️ WARNING: INDEXNOW_KEY environment variable is not set. Using placeholder.');
// In production, you'd fail here. For dev/demo, we proceed but expect failure from API.
}
await submitToIndexNow(urls);
}
main().catch(console.error);

View File

@@ -1,64 +0,0 @@
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
console.log('🔄 Starting Database Diagnostics...');
try {
// 1. Test Connection
console.log('1⃣ Testing basic connection...');
await prisma.$connect();
console.log('✅ Connected to database successfully.');
// 2. Test Lead Table Existence
console.log('2⃣ Testing Lead table access...');
try {
const count = await prisma.lead.count();
console.log(`✅ Lead table found. Current count: ${count}`);
} catch (e: any) {
console.error('❌ FAILED to access Lead table.');
if (e.code === 'P2021') {
console.error(' 👉 Error P2021: The table "Lead" does not exist in the current database.');
console.error(' 👉 SOLUTION: Run "npx prisma migrate deploy"');
} else {
console.error(' 👉 Error:', e.message);
}
throw e; // rethrow to stop
}
// 3. Test Writing a dummy lead (optional, rolling back transaction)
console.log('3⃣ Testing write permission...');
await prisma.$transaction(async (tx) => {
const lead = await tx.lead.create({
data: {
email: 'test_diagnostic_script@example.com',
source: 'diagnostic-script',
reprintCost: 0,
updatesPerYear: 0,
annualSavings: 0
}
});
console.log('✅ Successfully created test lead with ID:', lead.id);
// We purposefully throw an error to rollback this transaction so we don't dirty the DB
throw new Error('ROLLBACK_TEST');
}).catch((e) => {
if (e.message === 'ROLLBACK_TEST') {
console.log('✅ Transaction rollback successful (cleaning up test data).');
} else {
throw e;
}
});
console.log('\n🎉 ALL CHECKS PASSED! The database is effectively readable and writable.');
} catch (error) {
console.error('\n💥 DIAGNOSTICS FAILED');
console.error(error);
process.exit(1);
} finally {
await prisma.$disconnect();
}
}
main();

View File

@@ -1,34 +0,0 @@
import { db } from '../src/lib/db';
async function main() {
try {
console.log('Verifying Lead model...');
// Type assertion to bypass potential type generation issues locally if they exist
const leadCount = await (db as any).lead.count();
console.log(`Current lead count: ${leadCount}`);
const testLead = await (db as any).lead.create({
data: {
email: 'test_verify@example.com',
source: 'verification-script',
reprintCost: 100,
updatesPerYear: 12,
annualSavings: 1200,
},
});
console.log('Successfully created test lead:', testLead.id);
// Clean up
await (db as any).lead.delete({
where: { id: testLead.id }
});
console.log('Successfully deleted test lead');
} catch (error) {
console.error('Verification failed:', error);
process.exit(1);
}
}
main();

156
seo_2026_jan.md Normal file
View File

@@ -0,0 +1,156 @@
SEO Opportunity Report & Implementation Plan (Jan 2026)
1. Executive Summary
An analysis of the provided Google Keyword Planner data (Jan 22, 2026) reveals significant low-competition, high-volume traffic opportunities that were previously untapped. We have immediately capitalized on the Barcode opportunity and have a clear path to capture Custom QR intent.
2. Key Data Findings ("Hidden Gems")
We identified three specific clusters where search volume is high but competition is exceptionally low.
A. The "QR Barcode" Anomaly (Gold Mine) 🏆
Users are confused about the terminology, searching for "qr barcode" or "bar code generator" instead of just "barcode".
Keywords: qr barcode, bar code generator, scan code generator
Volume: 10k 100k (High)
Competition: Low / Medium
Opportunity: Most competitors optimize for "Barcode Generator". By targeting the "wrong" terms users actually type, we can win easy traffic.
B. The "Free" Intent
High volume, but users are specifically looking for "free" and "no signup".
Keyword: free qr code generator (100k 1M)
Keyword: qr code generator free (100k 1M)
Opportunity: Aggressive targeting of these exact match phrases on the homepage metadata.
C. The "Custom" Gap
Users want customization but don't always use the term "design".
Keyword: custom qr code generator
Volume: 1k 10k
Competition: Low
Current Status: MISSING. We do not have a dedicated landing page for this high-intent cluster.
3. Actions Already Implemented ✅
We have immediately updated the metadata to capture the traffic identified in findings A and B.
1. Barcode Generator Optimization
File:
src/app/(marketing)/tools/barcode-generator/page.tsx
Action: Updated <title> and meta description.
New Target: "QR Barcode" and "Bar Code Generator".
Why: To capture the 100k+ users searching for these specific variants.
2. Homepage Optimization
File:
src/app/(marketing)/page.tsx
Action: Injected high-volume keyword tags.
New Target: qr generator, free qr code generator, custom qr code generator.
Why: To signal relevance to Google for the broadest "head terms".
4. Implementation Plan: "Custom QR Code" Landing Page 🚀
To capture the 1k10k/month users searching for "custom qr code generator" (Finding C), we need a dedicated landing page. This page will focus on design features (colors, logos, frames) rather than just "generating" a code.
Phase 1: Page Structure (New File)
Path: src/app/(marketing)/tools/custom-qr-code-generator/page.tsx
Content Strategy:
H1: "Free Custom QR Code Generator with Logo & Colors"
Hero: Visual emphasis on beautiful codes, not black-and-white ones.
Live Editor Demo: (Reuse existing QRCodeGeneratorClient but pre-opened "Design" tab).
Features Section:
"Add Your Logo"
"Custom Colors & Gradients"
"Unique Frames & Shapes"
FAQ: Targeting specific "custom" questions (vector formats, scanning reliability).
Phase 2: Internal Linking
Add link to /tools/custom-qr-code-generator in the Footer and Main Navigation under "Tools".
Link from Homepage "Features" section.
Phase 3: Metadata Strategy
title: 'Custom QR Code Generator Add Logo, Colors & Frames',
description: 'Create unique custom QR codes with your logo, colors, and frames. Free online customizer with high-quality vector download (SVG/PNG).',
keywords: ['custom qr code generator', 'qr code with logo', 'qr code design', 'creative qr code', 'branded qr code']
5. Next Steps
Approval: Confirm this plan to build the custom-qr-code-generator page.
Execution: I will create the directory and page file.
Verify: Check that the new page renders and is linked correctly.
new findings
Das ist super, dass du die Dateien hochgeladen hast! Denn: Du hast die Daten bereits.
Ich habe deine Excel-Listen analysiert und das Problem gefunden: In deiner Ansicht im Tool hieß die Spalte vielleicht anders oder war versteckt, aber in der Datei heißt sie Avg. monthly searches. Das ist exakt das Suchvolumen, das du gesucht hast.
Hier sind die echten "Schätze" direkt aus deiner Datei, gefiltert nach meiner Strategie:
1. Die "Low Hanging Fruits" (Viel Traffic, fast 0 Konkurrenz)
Das sind die Keywords, bei denen du SOFORT ranken kannst, weil die großen Player schlafen.
call qr code
Suchvolumen: 50.000 (!)
Wettbewerb-Index: 0 (Das ist extrem selten! Absolut gar keine Konkurrenz auf Google Ads).
Idee: Mach eine Seite "Telefon-QR-Code erstellen". Leute wollen, dass beim Scannen direkt eine Nummer gewählt wird. Das ist eine riesige Nische.
generate website qr code
Suchvolumen: 50.000
Wettbewerb-Index: 17 (Sehr gering).
CPC: 6,16 € (Das ist der Jackpot: Viel Traffic, wenig Konkurrenz UND hoher Wert).
bar code generator
Suchvolumen: 500.000
Wettbewerb-Index: 3 (Fast nichts).
Bestätigt meine frühere Analyse: Das ist dein Traffic-Bringer.
2. Die "Goldminen" (Hoher Klickpreis / High Ticket)
Hier zahlen Firmen richtig Geld. Wenn du hier rankst, sind die Nutzer sehr wertvoll.
manage qr codes
CPC (Gebot): 18,77 €
Das suchen Firmen, die viele Codes verwalten müssen (Agenturen, Großkunden). Perfekt für dein "Pro"-Abo.
dynamic code generator
CPC: 15,62 €
Das Kern-Keyword für dein Business-Modell.
qr tracking
CPC: 12,51 €
Wettbewerb ist hier höher, aber der Umsatz pro Kunde auch.
3. Der Trend-Tipp (+900% Wachstum)
free bulk qr code generator (Massen-Erstellung)
Trend: +900%
Viele Leute suchen nach einer Möglichkeit, 100 Codes auf einmal zu erstellen (z.B. für Mitarbeiterausweise oder Inventar). Wenn du so ein Feature ("Bulk Upload") hast oder baust, bist du Marktführer.
Was du jetzt tun musst (in Excel oder Google Sheets):
Du brauchst das Tool gar nicht mehr zwingend. Du kannst einfach in deiner Datei filtern:
Such die Spalte Avg. monthly searches -> Das ist dein Suchvolumen.
Such die Spalte Competition (indexed value) -> Das ist die Härte (0-100).
Filter: Avg. monthly searches > 1000 UND Competition (indexed value) < 20.
Damit findest du genau die oben genannten Chancen. Soll ich dir für eines dieser Keywords (z.B. den "Call QR Code" mit Index 0) eine Gliederung schreiben?

View File

@@ -1,743 +0,0 @@
Issues
/
Multiple H1 tags
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
0
1
2
3
4
All filter results
All filter results
3
Lost from filter results
0
Lost
0
Patches
Changes: Don't show
Columns
Export
PR
URL
Organic traffic
HTTP status code
Depth
H1
H1 length
No. of H1
Is indexable page
40
html
QR Master: Dynamic QR Generator
https://www.qrmaster.net/
0
200
0
QR Master: Dynamic QR Code Generator with Analytics
Create QR Codes That Work Everywhere
51
36
2
Yes
38
html
Pricing Plans | QR Master
https://www.qrmaster.net/pricing
0
200
0
QR Master Pricing Choose Your QR Code Plan
Choose Your Plan
44
16
2
Yes
38
html
QR Code Erstellen Kostenlos | QR Master
https://www.qrmaster.net/qr-code-erstellen
0
200
0
QR Code Erstellen Kostenloser QR Code Generator mit Tracking
Erstellen Sie QR-Codes, die überall funktionieren
62
49
2
Yes
Showing 3 of 3
Issues
/
Open Graph tags missing
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
0
1
2
3
4
All filter results
All filter results
2
Lost from filter results
0
Lost
0
Patches
Changes: Don't show
Columns
Export
PR
URL
Organic traffic
Is valid Open graph
Open graph attributes
Open graph values
Depth
Is indexable page
No. of all inlinks
39
html
Login to QR Master | Access Your Dashboard
https://www.qrmaster.net/login
0
0
Yes
38
38
html
Create Free Account | QR Master
https://www.qrmaster.net/signup
0
0
Yes
37
Showing 2 of 2
Issues
/
X (Twitter) card missing
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
0
1
2
3
4
All filter results
All filter results
2
Lost from filter results
0
Lost
0
Patches
Changes: Don't show
Columns
Export
PR
URL
Organic traffic
Is valid X (Twitter) card
X (Twitter) card attributes
X (Twitter) card values
Depth
Is indexable page
No. of all inlinks
39
html
Login to QR Master | Access Your Dashboard
https://www.qrmaster.net/login
0
0
Yes
38
38
html
Create Free Account | QR Master
https://www.qrmaster.net/signup
0
0
Yes
37
Showing 2 of 2
Issues
/
Slow page
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
0
2
4
6
8
All filter results
All filter results
8
Lost from filter results
0
Lost
0
Patches
Changes: Don't show
Columns
Export
PR
URL
Organic traffic
HTTP status code
Size (bytes)
Time to first byte (ms)
Loading time (ms)
Depth
Is indexable page
No. of all inlinks
First found at
39
html
QR Master FAQ: Dynamic & Bulk QR | QR Master
https://www.qrmaster.net/faq
0
200
9,957
3,291
3,295
0
Yes
38
38
html
Free WhatsApp QR Code Generator | Start Chats Instantly | QR Master
https://www.qrmaster.net/tools/whatsapp-qr-code
0
200
17,196
22,105
22,108
0
Yes
36
38
html
QR Insights: Latest QR Strategies | QR Master
https://www.qrmaster.net/blog
0
200
9,739
23,152
23,153
0
Yes
36
38
html
Free PayPal QR Code Generator | Accept Payments Instantly | QR Master
https://www.qrmaster.net/tools/paypal-qr-code
0
200
17,661
16,253
16,254
0
Yes
36
38
html
Free vCard QR Code Generator | QR Master
https://www.qrmaster.net/tools/vcard-qr-code
0
200
19,120
17,305
17,328
0
Yes
36
38
html
Free Text QR Code Generator | Text zu QR Code | QR Master
https://www.qrmaster.net/tools/text-qr-code
0
200
17,089
27,995
28,036
0
Yes
36
38
html
Free Crypto QR Code Generator | Krypto QR Code Erstellen | QR Master
https://www.qrmaster.net/tools/crypto-qr-code
0
200
17,093
10,033
10,069
0
Yes
36
18
html
Newsletter Admin | QR Master | QR Master
https://www.qrmaster.net/newsletter
0
200
7,334
11,826
11,830
1
No
36
https://www.qrmaster.net/
Showing 8 of 8
Issues
/
Structured data has schema.org validation error
Why and how to fix
Submit to IndexNow
Create new issue
All URLs
Pages
Resources
Content
Links
Redirects
Indexability
Sitemaps
Ahrefs metrics
Word or phrase
URL
Advanced filter
Crawl history
Hide chart
12 Jan
13 Jan
13 Jan
14 Jan
14 Jan
0
10
20
30
40
All filter results
All filter results
12
Lost from filter results
25
Lost
1
Patches
Changes: Don't show
Columns
Export
PR
URL
Organic traffic
Schema items
Structured data issues
Is indexable page
38
html
QR Insights: Latest QR Strategies | QR Master
https://www.qrmaster.net/blog
0
BreadcrumbList
Organization
WebSite
Schema.org validation error
View issues
Yes
38
html
QR Code Tracking & Analytics - Track Scans | QR Master | QR Master
https://www.qrmaster.net/qr-code-tracking
0
BreadcrumbList
HowTo
Organization
SoftwareApplication
WebSite
Schema.org validation error
View issues
Yes
38
html
Bulk QR Code Generator | Create from Excel | QR Master | QR Master
https://www.qrmaster.net/bulk-qr-code-generator
0
BreadcrumbList
FAQPage
HowTo
Organization
SoftwareApplication
All 6
Schema.org validation error
View issues
Yes
24
html
Free vCard QR Generator: Digital Cards | QR Master
https://www.qrmaster.net/blog/vcard-qr-code-generator
0
BlogPosting
BreadcrumbList
HowTo
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
Restaurant Menu QR Codes: 2025 Guide | QR Master
https://www.qrmaster.net/blog/qr-code-restaurant-menu
0
BlogPosting
BreadcrumbList
HowTo
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
QR Code Analytics: The Complete Guide | QR Master
https://www.qrmaster.net/blog/qr-code-analytics
0
BlogPosting
BreadcrumbList
HowTo
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
Dynamic vs Static QR Codes: The Ultimate Comparison | QR Master
https://www.qrmaster.net/blog/dynamic-vs-static-qr-codes
0
BlogPosting
BreadcrumbList
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
How to Generate Bulk QR Codes from Excel | QR Master
https://www.qrmaster.net/blog/bulk-qr-code-generator-excel
0
BlogPosting
BreadcrumbList
HowTo
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
QR Code Print Size Guide: Minimum Sizes for Every Use Case | QR Master
https://www.qrmaster.net/blog/qr-code-print-size-guide
0
BlogPosting
BreadcrumbList
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
Best QR Code Generator for Small Business 2025 | QR Master
https://www.qrmaster.net/blog/qr-code-small-business
0
BlogPosting
BreadcrumbList
Organization
WebSite
Schema.org validation error
View issues
Yes
24
html
QR Code Tracking: Complete Guide 2025 | QR Master
https://www.qrmaster.net/blog/qr-code-tracking-guide-2025
0
BlogPosting
BreadcrumbList
HowTo
Organization
WebSite
Schema.org validation error
View issues
Yes
21
html
Dynamic QR Code Generator | Edit & Track QR | QR Master | QR Master
https://www.qrmaster.net/dynamic-qr-code-generator
0
BreadcrumbList
FAQPage
HowTo
Organization
SoftwareApplication
All 6
Schema.org validation error
View issues
Yes
Showing 12 of 12

View File

@@ -1,68 +0,0 @@
# SEO Remaining Tasks
This document contains a list of all SEO issues identified in the Ahrefs and Seobility reports that still need to be addressed in the codebase.
## 1. Content & Metadata Issues
- [ ] **Fix Missing H1 Tags on Core Pages**
- Affected Pages: `/`, `/pricing`, `/login`, `/signup`, `/faq`, `/privacy`, `/newsletter`, `/create`.
- **Issue:** These pages are Client Side Rendered (CSR) or lack a server-side `<h1>` tag in the initial HTML payload.
- **Action:** Add an `<h1>` (visible or `sr-only`) to the Server Component or ensure the Client Component renders it immediately.
- [ ] **Fix Low Word Count / Thin Content**
- Affected Pages: `/`, `/pricing`, `/login`, `/signup`, `/faq`, `/privacy`.
- **Issue:** Crawlers see 0 words on these pages because the content is rendered via JavaScript (`use client`).
- **Action:** Implement Server Side Rendering (SSR) for the main content or add `sr-only` semantic fallbacks for crawlers.
- [ ] **Expand Meta Descriptions**
- Affected Pages: `/`, `/pricing`, `/login`, `/signup`, `/newsletter`, `/privacy`, `/faq`, `/qr-code-erstellen`, Blog entries.
- **Issue:** Meta descriptions are too short (< 80 characters) or duplicates.
- **Action:** Update `generateMetadata` in `page.tsx` files to have descriptions between 110-160 characters.
- [ ] **Fix Page Titles**
- Affected Pages: `/qr-code-erstellen`, Blog posts.
- **Issue:** Titles are too long (> 60-70 characters) or have keyword stuffing/repetition.
- **Action:** Shorten titles to be concise and click-worthy, avoiding simple concatenation of keywords.
- [ ] **Fix Duplicate Content & Titles**
- Affected Pages: `/pricing`, `/newsletter`, `/login`, `/signup`.
- **Issue:** These pages likely share the same metadata or layout without unique content in the crawler's eyes.
- **Action:** Ensure each page has unique `title` and `description` in `generateMetadata`.
## 2. Technical SEO
- [ ] **Fix 307 Redirects to 301**
- **Issue:** Blog posts and legacy URLs are redirecting with status `307` (Temporary) instead of `301` (Permanent).
- **Affected Paths:**
- `/blog/vcard-qr-code-generator` -> `/create`
- `/blog/qr-code-restaurant-menu` -> `/dynamic-qr-code-generator`
- `/blog/bulk-qr-code-generator` -> `/bulk-qr-code-generator`
- **Action:** Locate these redirects (likely in `next.config.js` or `middleware.ts` or component logic) and change status to 301.
- [ ] **Fix Indexing of Protected/Private Pages**
- **Issue:** Ahrefs is flagging `/pricing` as "Indexable" but likely encountering issues. Verify if `/pricing` should be indexed.
- **Action:** Ensure public pages like Pricing are NOT in `(app)` group which has `noindex` in layout, or override the `robots` meta in `pricing/page.tsx`.
- [ ] **Fix "No Outgoing Links"**
- **Issue:** Crawlers see pages as dead ends because links are injected via JS.
- **Action:** Ensure standard `<a>` or `Link` tags are present in the initial HTML.
## 3. Link Profile
- [ ] **Improve Internal Link Texts**
- **Issue:** "Click here" or full URL used as anchor text.
- **Action:** Use descriptive keywords for links (e.g., "See our pricing" instead of "Click here").
- [ ] **Fix Alternate Links (hreflang)**
- **Issue:** Mismatch in `hreflang` or missing self-referencing canonicals.
- **Action:** Verify `alternates` configuration in `layout.tsx` or `page.tsx` matches the actual URL structure.
## 4. Performance & Images
- [ ] **Optimize Large Images**
- **Files:** `/blog/1-boy.png`, `/blog/2-body.png` (~4MB each).
- **Action:** Convert to WebP/AVIF and resize to < 500KB.
- [ ] **Improve Page Speed**
- **Issue:** Response time for `/qr-code-erstellen` is slow.
- **Action:** Check for expensive server-side operations or optimize database queries.

View File

@@ -1,22 +0,0 @@
# Seobility SEO Findings & Status
## Structure & Internal Linking
- [FIXED] **Improve Internal Link Texts**
- *Status:* Replaced "Read more" with "Read Article" in `blog/page.tsx`.
- [VERIFIED] **Pages with few internal links (9 pages)**
- *Status:* Core pages. `MarketingLayout` ensures Footer/Nav links exist on all these pages. Design choice.
## Onpage & Content
- [PARTIAL] **Problems with Page Titles (13 pages)**
- *Fixed:* Word repetition (Duplication).
- *Remaining:* "Too long" titles (e.g. `QR Code Analytics: Track...`).
- [VERIFIED] **Keywords not in text**
- *Action:* Content reviewed. Titles match page intent. Modern SEO prefers natural language over exact keyword stuffing.
- [RESOLVED] **Identical HTML Pages**
- *Status:* `privacy`, `faq`, `newsletter`. Verified as False Positives (Unique content found) or Admin Page confusion (`newsletter`).
## Technical
- [VERIFIED] **H1 Headings**
- *Status:* **False Positive in Report**. Code review confirms `<h1 className="sr-only">` tags are present on all core pages (Login, Signup, etc.). Crawlers can read this.
- [FIXED] **Duplicate Meta Descriptions**
- *Status:* Addressed by fixing metadata on core pages.

View File

@@ -1,254 +0,0 @@
'use client';
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { usePathname, useRouter } from 'next/navigation';
import { Button } from '@/components/ui/Button';
import { Dropdown, DropdownItem } from '@/components/ui/Dropdown';
import { Footer } from '@/components/ui/Footer';
import { useTranslation } from '@/hooks/useTranslation';
interface User {
id: string;
name: string | null;
email: string;
plan: string | null;
}
export default function AppLayout({
children,
}: {
children: React.ReactNode;
}) {
const pathname = usePathname();
const router = useRouter();
const { t } = useTranslation();
const [sidebarOpen, setSidebarOpen] = useState(false);
const [user, setUser] = useState<User | null>(null);
// Fetch user data on mount
useEffect(() => {
const fetchUser = async () => {
try {
const response = await fetch('/api/user');
if (response.ok) {
const userData = await response.json();
setUser(userData);
}
} catch (error) {
console.error('Error fetching user:', error);
}
};
fetchUser();
}, []);
const handleSignOut = async () => {
// Track logout event before clearing data
try {
const { trackEvent, resetUser } = await import('@/components/PostHogProvider');
trackEvent('user_logout');
resetUser(); // Reset PostHog user session
} catch (error) {
console.error('PostHog tracking error:', error);
}
// Clear all cookies
document.cookie.split(";").forEach(c => {
document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/");
});
// Clear localStorage
localStorage.clear();
// Redirect to home
router.push('/');
};
// Get user initials for avatar (e.g., "Timo Schmidt" -> "TS")
const getUserInitials = () => {
if (!user) return 'U';
if (user.name) {
const names = user.name.trim().split(' ');
if (names.length >= 2) {
return (names[0][0] + names[names.length - 1][0]).toUpperCase();
}
return user.name.substring(0, 2).toUpperCase();
}
// Fallback to email
return user.email.substring(0, 1).toUpperCase();
};
// Get display name (first name or full name)
const getDisplayName = () => {
if (!user) return 'User';
if (user.name) {
return user.name;
}
// Fallback to email without domain
return user.email.split('@')[0];
};
const navigation = [
{
name: t('nav.dashboard'),
href: '/dashboard',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
),
},
{
name: t('nav.create_qr'),
href: '/create',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 4v16m8-8H4" />
</svg>
),
},
{
name: t('nav.bulk_creation'),
href: '/bulk-creation',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
),
},
{
name: t('nav.analytics'),
href: '/analytics',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
),
},
{
name: t('nav.pricing'),
href: '/pricing',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
),
},
{
name: t('nav.settings'),
href: '/settings',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
),
},
];
return (
<div className="min-h-screen bg-gray-50">
{/* Mobile sidebar backdrop */}
{sidebarOpen && (
<div
className="fixed inset-0 bg-black bg-opacity-50 z-40 lg:hidden"
onClick={() => setSidebarOpen(false)}
/>
)}
{/* Sidebar */}
<aside
className={`fixed top-0 left-0 z-50 h-full w-64 bg-white border-r border-gray-200 transform transition-transform lg:translate-x-0 ${sidebarOpen ? 'translate-x-0' : '-translate-x-full'
}`}
>
<div className="flex items-center justify-between p-4 border-b border-gray-200">
<Link href="/" className="flex items-center space-x-2">
<img src="/logo.svg" alt="QR Master" className="w-8 h-8" />
<span className="text-xl font-bold text-gray-900">QR Master</span>
</Link>
<button
className="lg:hidden"
onClick={() => setSidebarOpen(false)}
>
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<nav className="p-4 space-y-1">
{navigation.map((item) => {
const isActive = pathname === item.href;
return (
<Link
key={item.name}
href={item.href}
className={`flex items-center space-x-3 px-3 py-2 rounded-lg transition-colors ${isActive
? 'bg-primary-50 text-primary-600'
: 'text-gray-700 hover:bg-gray-100'
}`}
>
{item.icon}
<span className="font-medium">{item.name}</span>
</Link>
);
})}
</nav>
</aside>
{/* Main content */}
<div className="lg:ml-64">
{/* Top bar */}
<header className="bg-white border-b border-gray-200">
<div className="flex items-center justify-between px-4 py-3">
<button
className="lg:hidden"
onClick={() => setSidebarOpen(true)}
>
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
<div className="flex items-center space-x-4 ml-auto">
{/* User Menu */}
<Dropdown
align="right"
trigger={
<button className="flex items-center space-x-2 text-gray-700 hover:text-gray-900">
<div className="w-8 h-8 bg-primary-100 rounded-full flex items-center justify-center">
<span className="text-sm font-medium text-primary-600">
{getUserInitials()}
</span>
</div>
<span className="hidden md:block font-medium">
{getDisplayName()}
</span>
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
</svg>
</button>
}
>
<DropdownItem onClick={handleSignOut}>
Sign Out
</DropdownItem>
</Dropdown>
</div>
</div>
</header>
{/* Page content */}
<main className="p-6">
{children}
</main>
{/* Footer */}
<Footer variant="dashboard" />
</div>
</div>
);
}

View File

@@ -14,6 +14,20 @@ import { calculateContrast, cn } from '@/lib/utils';
import { useTranslation } from '@/hooks/useTranslation';
import { useCsrf } from '@/hooks/useCsrf';
import { showToast } from '@/components/ui/Toast';
import {
Globe, User, MapPin, Phone, FileText, Smartphone, Ticket, Star, HelpCircle, Upload
} from 'lucide-react';
// Tooltip component for form field help
const Tooltip = ({ text }: { text: string }) => (
<div className="group relative inline-block ml-1">
<HelpCircle className="w-4 h-4 text-gray-400 cursor-help" />
<div className="absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-48 text-center">
{text}
<div className="absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-gray-900"></div>
</div>
</div>
);
// Content-type specific frame options
const getFrameOptionsForContentType = (contentType: string) => {
@@ -34,6 +48,14 @@ const getFrameOptionsForContentType = (contentType: string) => {
return [...baseOptions, { id: 'chatme', label: 'Chat Me' }, { id: 'whatsapp', label: 'WhatsApp' }];
case 'TEXT':
return [...baseOptions, { id: 'read', label: 'Read' }, { id: 'info', label: 'Info' }];
case 'PDF':
return [...baseOptions, { id: 'download', label: 'Download' }, { id: 'view', label: 'View PDF' }];
case 'APP':
return [...baseOptions, { id: 'getapp', label: 'Get App' }, { id: 'download', label: 'Download' }];
case 'COUPON':
return [...baseOptions, { id: 'redeem', label: 'Redeem' }, { id: 'save', label: 'Save Offer' }];
case 'FEEDBACK':
return [...baseOptions, { id: 'review', label: 'Review' }, { id: 'feedback', label: 'Feedback' }];
default:
return [...baseOptions, { id: 'website', label: 'Website' }, { id: 'visit', label: 'Visit' }];
}
@@ -44,6 +66,7 @@ export default function CreatePage() {
const { t } = useTranslation();
const { fetchWithCsrf } = useCsrf();
const [loading, setLoading] = useState(false);
const [uploading, setUploading] = useState(false);
const [userPlan, setUserPlan] = useState<string>('FREE');
const qrRef = useRef<HTMLDivElement>(null);
@@ -102,10 +125,14 @@ export default function CreatePage() {
const hasGoodContrast = contrast >= 4.5;
const contentTypes = [
{ value: 'URL', label: 'URL / Website' },
{ value: 'VCARD', label: 'Contact Card' },
{ value: 'GEO', label: 'Location/Maps' },
{ value: 'PHONE', label: 'Phone Number' },
{ value: 'URL', label: 'URL / Website', icon: Globe },
{ value: 'VCARD', label: 'Contact Card', icon: User },
{ value: 'GEO', label: 'Location / Maps', icon: MapPin },
{ value: 'PHONE', label: 'Phone Number', icon: Phone },
{ value: 'PDF', label: 'PDF / File', icon: FileText },
{ value: 'APP', label: 'App Download', icon: Smartphone },
{ value: 'COUPON', label: 'Coupon / Discount', icon: Ticket },
{ value: 'FEEDBACK', label: 'Feedback / Review', icon: Star },
];
// Get QR content based on content type
@@ -128,6 +155,14 @@ export default function CreatePage() {
return content.text || 'Sample text';
case 'WHATSAPP':
return `https://wa.me/${content.phone || '+1234567890'}${content.message ? `?text=${encodeURIComponent(content.message)}` : ''}`;
case 'PDF':
return content.fileUrl || 'https://example.com/file.pdf';
case 'APP':
return content.fallbackUrl || content.iosUrl || content.androidUrl || 'https://example.com/app';
case 'COUPON':
return `Coupon: ${content.code || 'SAVE20'} - ${content.discount || '20% OFF'}`;
case 'FEEDBACK':
return content.feedbackUrl || 'https://example.com/feedback';
default:
return 'https://example.com';
}
@@ -398,6 +433,208 @@ export default function CreatePage() {
/>
</div>
);
case 'PDF':
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
if (!file) return;
// 10MB limit
if (file.size > 10 * 1024 * 1024) {
showToast('File size too large (max 10MB)', 'error');
return;
}
setUploading(true);
const formData = new FormData();
formData.append('file', file);
try {
const response = await fetch('/api/upload', {
method: 'POST',
body: formData,
});
const data = await response.json();
if (response.ok) {
setContent({ ...content, fileUrl: data.url, fileName: data.filename });
showToast('File uploaded successfully!', 'success');
} else {
showToast(data.error || 'Upload failed', 'error');
}
} catch (error) {
console.error('Upload error:', error);
showToast('Error uploading file', 'error');
} finally {
setUploading(false);
}
};
return (
<>
<div>
<div className="flex items-center mb-1">
<label className="block text-sm font-medium text-gray-700">Upload Menu / PDF</label>
<Tooltip text="Upload your menu PDF (Max 10MB). Hosted securely." />
</div>
<div className="mt-2 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-lg hover:bg-gray-50 transition-colors relative">
<div className="space-y-1 text-center">
{uploading ? (
<div className="flex flex-col items-center">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500 mb-2"></div>
<p className="text-sm text-gray-500">Uploading...</p>
</div>
) : content.fileUrl ? (
<div className="flex flex-col items-center">
<div className="mx-auto h-12 w-12 text-primary-500 bg-primary-50 rounded-full flex items-center justify-center mb-2">
<FileText className="h-6 w-6" />
</div>
<p className="text-sm text-green-600 font-medium mb-1">Upload Complete!</p>
<a href={content.fileUrl} target="_blank" rel="noopener noreferrer" className="text-xs text-primary-500 hover:underline break-all max-w-xs mb-3 block">
{content.fileName || 'View File'}
</a>
<label htmlFor="file-upload" className="cursor-pointer bg-white py-2 px-3 border border-gray-300 rounded-md shadow-sm text-sm leading-4 font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
<span>Replace File</span>
<input id="file-upload" name="file-upload" type="file" className="sr-only" accept=".pdf,image/*" onChange={handleFileUpload} />
</label>
</div>
) : (
<>
<Upload className="mx-auto h-12 w-12 text-gray-400" />
<div className="flex text-sm text-gray-600 justify-center">
<label htmlFor="file-upload" className="relative cursor-pointer bg-white rounded-md font-medium text-primary-600 hover:text-primary-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-primary-500">
<span>Upload a file</span>
<input id="file-upload" name="file-upload" type="file" className="sr-only" accept=".pdf,image/*" onChange={handleFileUpload} />
</label>
<p className="pl-1">or drag and drop</p>
</div>
<p className="text-xs text-gray-500">PDF, PNG, JPG up to 10MB</p>
</>
)}
</div>
</div>
</div>
{content.fileUrl && (
<Input
label="File Name / Menu Title"
value={content.fileName || ''}
onChange={(e) => setContent({ ...content, fileName: e.target.value })}
placeholder="Product Catalog 2026"
/>
)}
</>
);
case 'APP':
return (
<>
<div>
<div className="flex items-center mb-1">
<label className="block text-sm font-medium text-gray-700">iOS App Store URL</label>
<Tooltip text="Link to your app in the Apple App Store" />
</div>
<Input
value={content.iosUrl || ''}
onChange={(e) => setContent({ ...content, iosUrl: e.target.value })}
placeholder="https://apps.apple.com/app/..."
/>
</div>
<div>
<div className="flex items-center mb-1">
<label className="block text-sm font-medium text-gray-700">Android Play Store URL</label>
<Tooltip text="Link to your app in the Google Play Store" />
</div>
<Input
value={content.androidUrl || ''}
onChange={(e) => setContent({ ...content, androidUrl: e.target.value })}
placeholder="https://play.google.com/store/apps/..."
/>
</div>
<div>
<div className="flex items-center mb-1">
<label className="block text-sm font-medium text-gray-700">Fallback URL</label>
<Tooltip text="Where desktop users go (e.g., your website). QR detects device automatically!" />
</div>
<Input
value={content.fallbackUrl || ''}
onChange={(e) => setContent({ ...content, fallbackUrl: e.target.value })}
placeholder="https://yourapp.com"
/>
</div>
</>
);
case 'COUPON':
return (
<>
<Input
label="Coupon Code"
value={content.code || ''}
onChange={(e) => setContent({ ...content, code: e.target.value })}
placeholder="SUMMER20"
required
/>
<Input
label="Discount"
value={content.discount || ''}
onChange={(e) => setContent({ ...content, discount: e.target.value })}
placeholder="20% OFF"
required
/>
<Input
label="Title"
value={content.title || ''}
onChange={(e) => setContent({ ...content, title: e.target.value })}
placeholder="Summer Sale 2026"
/>
<Input
label="Description (optional)"
value={content.description || ''}
onChange={(e) => setContent({ ...content, description: e.target.value })}
placeholder="Valid on all products"
/>
<Input
label="Expiry Date (optional)"
type="date"
value={content.expiryDate || ''}
onChange={(e) => setContent({ ...content, expiryDate: e.target.value })}
/>
<Input
label="Redeem URL (optional)"
value={content.redeemUrl || ''}
onChange={(e) => setContent({ ...content, redeemUrl: e.target.value })}
placeholder="https://shop.example.com?coupon=SUMMER20"
/>
</>
);
case 'FEEDBACK':
return (
<>
<Input
label="Business Name"
value={content.businessName || ''}
onChange={(e) => setContent({ ...content, businessName: e.target.value })}
placeholder="Your Restaurant Name"
required
/>
<div>
<div className="flex items-center mb-1">
<label className="block text-sm font-medium text-gray-700">Google Review URL</label>
<Tooltip text="Redirect satisfied customers to leave a Google review." />
</div>
<Input
value={content.googleReviewUrl || ''}
onChange={(e) => setContent({ ...content, googleReviewUrl: e.target.value })}
placeholder="https://search.google.com/local/writereview?placeid=..."
/>
</div>
<Input
label="Thank You Message"
value={content.thankYouMessage || ''}
onChange={(e) => setContent({ ...content, thankYouMessage: e.target.value })}
placeholder="Thanks for your feedback!"
/>
</>
);
default:
return null;
}
@@ -428,12 +665,31 @@ export default function CreatePage() {
required
/>
<Select
label="Content Type"
value={contentType}
onChange={(e) => setContentType(e.target.value)}
options={contentTypes}
/>
{/* Custom Content Type Selector with Icons */}
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">Content Type</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
{contentTypes.map((type) => {
const Icon = type.icon;
return (
<button
key={type.value}
type="button"
onClick={() => setContentType(type.value)}
className={cn(
"flex flex-col items-center gap-2 p-3 rounded-lg border-2 transition-all text-sm",
contentType === type.value
? "border-primary-500 bg-primary-50 text-primary-700"
: "border-gray-200 hover:border-gray-300 text-gray-600"
)}
>
<Icon className="w-5 h-5" />
<span className="text-xs font-medium text-center">{type.label}</span>
</button>
);
})}
</div>
</div>
{renderContentFields()}
</CardContent>

View File

@@ -1,38 +1,254 @@
import type { Metadata } from 'next';
import '@/styles/globals.css';
import { Suspense } from 'react';
import { Providers } from '@/components/Providers';
import AppLayout from './AppLayout';
'use client';
export const metadata: Metadata = {
title: 'Dashboard | QR Master',
description: 'Manage your QR Master dashboard. Create dynamic QR codes, view real-time scan analytics, and configure your account settings in one secure place.',
robots: { index: false, follow: false },
icons: {
icon: [
{ url: '/favicon.svg', type: 'image/svg+xml' },
{ url: '/logo.svg', type: 'image/svg+xml' },
],
apple: '/logo.svg',
},
};
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { usePathname, useRouter } from 'next/navigation';
import { Button } from '@/components/ui/Button';
import { Dropdown, DropdownItem } from '@/components/ui/Dropdown';
import { Footer } from '@/components/ui/Footer';
import { useTranslation } from '@/hooks/useTranslation';
export default function RootAppLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className="font-sans">
<Providers>
<Suspense fallback={null}>
<AppLayout>
{children}
</AppLayout>
</Suspense>
</Providers>
</body>
</html>
);
interface User {
id: string;
name: string | null;
email: string;
plan: string | null;
}
export default function AppLayout({
children,
}: {
children: React.ReactNode;
}) {
const pathname = usePathname();
const router = useRouter();
const { t } = useTranslation();
const [sidebarOpen, setSidebarOpen] = useState(false);
const [user, setUser] = useState<User | null>(null);
// Fetch user data on mount
useEffect(() => {
const fetchUser = async () => {
try {
const response = await fetch('/api/user');
if (response.ok) {
const userData = await response.json();
setUser(userData);
}
} catch (error) {
console.error('Error fetching user:', error);
}
};
fetchUser();
}, []);
const handleSignOut = async () => {
// Track logout event before clearing data
try {
const { trackEvent, resetUser } = await import('@/components/PostHogProvider');
trackEvent('user_logout');
resetUser(); // Reset PostHog user session
} catch (error) {
console.error('PostHog tracking error:', error);
}
// Clear all cookies
document.cookie.split(";").forEach(c => {
document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/");
});
// Clear localStorage
localStorage.clear();
// Redirect to home
router.push('/');
};
// Get user initials for avatar (e.g., "Timo Schmidt" -> "TS")
const getUserInitials = () => {
if (!user) return 'U';
if (user.name) {
const names = user.name.trim().split(' ');
if (names.length >= 2) {
return (names[0][0] + names[names.length - 1][0]).toUpperCase();
}
return user.name.substring(0, 2).toUpperCase();
}
// Fallback to email
return user.email.substring(0, 1).toUpperCase();
};
// Get display name (first name or full name)
const getDisplayName = () => {
if (!user) return 'User';
if (user.name) {
return user.name;
}
// Fallback to email without domain
return user.email.split('@')[0];
};
const navigation = [
{
name: t('nav.dashboard'),
href: '/dashboard',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
),
},
{
name: t('nav.create_qr'),
href: '/create',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 4v16m8-8H4" />
</svg>
),
},
{
name: t('nav.bulk_creation'),
href: '/bulk-creation',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
),
},
{
name: t('nav.analytics'),
href: '/analytics',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
),
},
{
name: t('nav.pricing'),
href: '/pricing',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
),
},
{
name: t('nav.settings'),
href: '/settings',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
),
},
];
return (
<div className="min-h-screen bg-gray-50">
{/* Mobile sidebar backdrop */}
{sidebarOpen && (
<div
className="fixed inset-0 bg-black bg-opacity-50 z-40 lg:hidden"
onClick={() => setSidebarOpen(false)}
/>
)}
{/* Sidebar */}
<aside
className={`fixed top-0 left-0 z-50 h-full w-64 bg-white border-r border-gray-200 transform transition-transform lg:translate-x-0 ${sidebarOpen ? 'translate-x-0' : '-translate-x-full'
}`}
>
<div className="flex items-center justify-between p-4 border-b border-gray-200">
<Link href="/" className="flex items-center space-x-2">
<img src="/logo.svg" alt="QR Master" className="w-8 h-8" />
<span className="text-xl font-bold text-gray-900">QR Master</span>
</Link>
<button
className="lg:hidden"
onClick={() => setSidebarOpen(false)}
>
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<nav className="p-4 space-y-1">
{navigation.map((item) => {
const isActive = pathname === item.href;
return (
<Link
key={item.name}
href={item.href}
className={`flex items-center space-x-3 px-3 py-2 rounded-lg transition-colors ${isActive
? 'bg-primary-50 text-primary-600'
: 'text-gray-700 hover:bg-gray-100'
}`}
>
{item.icon}
<span className="font-medium">{item.name}</span>
</Link>
);
})}
</nav>
</aside>
{/* Main content */}
<div className="lg:ml-64">
{/* Top bar */}
<header className="bg-white border-b border-gray-200">
<div className="flex items-center justify-between px-4 py-3">
<button
className="lg:hidden"
onClick={() => setSidebarOpen(true)}
>
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
<div className="flex items-center space-x-4 ml-auto">
{/* User Menu */}
<Dropdown
align="right"
trigger={
<button className="flex items-center space-x-2 text-gray-700 hover:text-gray-900">
<div className="w-8 h-8 bg-primary-100 rounded-full flex items-center justify-center">
<span className="text-sm font-medium text-primary-600">
{getUserInitials()}
</span>
</div>
<span className="hidden md:block font-medium">
{getDisplayName()}
</span>
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
</svg>
</button>
}
>
<DropdownItem onClick={handleSignOut}>
Sign Out
</DropdownItem>
</Dropdown>
</div>
</div>
</header>
{/* Page content */}
<main className="p-6">
{children}
</main>
{/* Footer */}
<Footer variant="dashboard" />
</div>
</div>
);
}

View File

@@ -1,269 +1,268 @@
'use client';
import React, { useState, useEffect } from 'react';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Badge } from '@/components/ui/Badge';
import { showToast } from '@/components/ui/Toast';
import { useRouter } from 'next/navigation';
import { BillingToggle } from '@/components/ui/BillingToggle';
import { ObfuscatedMailto } from '@/components/ui/ObfuscatedMailto';
export default function PricingClient() {
const router = useRouter();
const [loading, setLoading] = useState<string | null>(null);
const [currentPlan, setCurrentPlan] = useState<string>('FREE');
const [currentInterval, setCurrentInterval] = useState<'month' | 'year' | null>(null);
const [billingPeriod, setBillingPeriod] = useState<'month' | 'year'>('month');
useEffect(() => {
// Fetch current user plan
const fetchUserPlan = async () => {
try {
const response = await fetch('/api/user/plan');
if (response.ok) {
const data = await response.json();
setCurrentPlan(data.plan || 'FREE');
setCurrentInterval(data.interval || null);
}
} catch (error) {
console.error('Error fetching user plan:', error);
}
};
fetchUserPlan();
}, []);
const handleUpgrade = async (plan: 'PRO' | 'BUSINESS') => {
setLoading(plan);
try {
const response = await fetch('/api/stripe/create-checkout-session', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
plan,
billingInterval: billingPeriod === 'month' ? 'month' : 'year',
}),
});
if (!response.ok) {
throw new Error('Failed to create checkout session');
}
const { url } = await response.json();
window.location.href = url;
} catch (error) {
console.error('Error creating checkout session:', error);
showToast('Failed to start checkout. Please try again.', 'error');
setLoading(null);
}
};
const handleDowngrade = async () => {
// Show confirmation dialog
const confirmed = window.confirm(
'Are you sure you want to downgrade to the Free plan? Your subscription will be canceled immediately and you will lose access to premium features.'
);
if (!confirmed) {
return;
}
setLoading('FREE');
try {
const response = await fetch('/api/stripe/cancel-subscription', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'Failed to cancel subscription');
}
showToast('Successfully downgraded to Free plan', 'success');
// Refresh to update the plan
setTimeout(() => {
window.location.reload();
}, 1500);
} catch (error: any) {
console.error('Error canceling subscription:', error);
showToast(error.message || 'Failed to downgrade. Please try again.', 'error');
setLoading(null);
}
};
// Helper function to check if this is the user's exact current plan (plan + interval)
const isCurrentPlanWithInterval = (planType: string, interval: 'month' | 'year') => {
return currentPlan === planType && currentInterval === interval;
};
// Helper function to check if user has this plan but different interval
const hasPlanDifferentInterval = (planType: string) => {
return currentPlan === planType && currentInterval && currentInterval !== billingPeriod;
};
const selectedInterval = billingPeriod === 'month' ? 'month' : 'year';
const plans = [
{
key: 'free',
name: 'Free',
price: '€0',
period: 'forever',
showDiscount: false,
features: [
'3 dynamic QR codes',
'Unlimited static QR codes',
'Basic scan tracking',
'Standard QR design templates',
'Download as SVG/PNG',
],
buttonText: currentPlan === 'FREE' ? 'Current Plan' : 'Downgrade to Free',
buttonVariant: 'outline' as const,
disabled: currentPlan === 'FREE',
popular: false,
onDowngrade: handleDowngrade,
},
{
key: 'pro',
name: 'Pro',
price: billingPeriod === 'month' ? '€9' : '€90',
period: billingPeriod === 'month' ? 'per month' : 'per year',
showDiscount: billingPeriod === 'year',
features: [
'50 dynamic QR codes',
'Unlimited static QR codes',
'Advanced analytics (scans, devices, locations)',
'Custom branding (colors & logos)',
],
buttonText: isCurrentPlanWithInterval('PRO', selectedInterval)
? 'Current Plan'
: hasPlanDifferentInterval('PRO')
? `Switch to ${billingPeriod === 'month' ? 'Monthly' : 'Yearly'}`
: 'Upgrade to Pro',
buttonVariant: 'primary' as const,
disabled: isCurrentPlanWithInterval('PRO', selectedInterval),
popular: true,
onUpgrade: () => handleUpgrade('PRO'),
},
{
key: 'business',
name: 'Business',
price: billingPeriod === 'month' ? '€29' : '€290',
period: billingPeriod === 'month' ? 'per month' : 'per year',
showDiscount: billingPeriod === 'year',
features: [
'500 dynamic QR codes',
'Unlimited static QR codes',
'Everything from Pro',
'Bulk QR Creation (up to 1,000)',
'Priority email support',
'Advanced tracking & insights',
],
buttonText: isCurrentPlanWithInterval('BUSINESS', selectedInterval)
? 'Current Plan'
: hasPlanDifferentInterval('BUSINESS')
? `Switch to ${billingPeriod === 'month' ? 'Monthly' : 'Yearly'}`
: 'Upgrade to Business',
buttonVariant: 'primary' as const,
disabled: isCurrentPlanWithInterval('BUSINESS', selectedInterval),
popular: false,
onUpgrade: () => handleUpgrade('BUSINESS'),
},
];
return (
<div className="container mx-auto px-4 py-12">
<div className="text-center mb-12">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
Choose Your Plan
</h2>
<p className="text-xl text-gray-600">
Select the perfect plan for your QR code needs
</p>
</div>
<div className="flex justify-center mb-8">
<BillingToggle value={billingPeriod} onChange={setBillingPeriod} />
</div>
<div className="grid md:grid-cols-3 gap-8 max-w-6xl mx-auto">
{plans.map((plan) => (
<Card
key={plan.key}
className={plan.popular ? 'border-primary-500 shadow-xl relative' : ''}
>
{plan.popular && (
<div className="absolute -top-4 left-1/2 transform -translate-x-1/2">
<Badge variant="info" className="px-3 py-1">
Most Popular
</Badge>
</div>
)}
<CardHeader className="text-center pb-8">
<CardTitle className="text-2xl mb-4">
{plan.name}
</CardTitle>
<div className="flex flex-col items-center">
<div className="flex items-baseline justify-center">
<span className="text-4xl font-bold">
{plan.price}
</span>
<span className="text-gray-600 ml-2">
{plan.period}
</span>
</div>
{plan.showDiscount && (
<Badge variant="success" className="mt-2">
Save 16%
</Badge>
)}
</div>
</CardHeader>
<CardContent className="space-y-6">
<ul className="space-y-3">
{plan.features.map((feature: string, index: number) => (
<li key={index} className="flex items-start space-x-3">
<svg className="w-5 h-5 text-success-500 flex-shrink-0 mt-0.5" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span className="text-gray-700">{feature}</span>
</li>
))}
</ul>
<Button
variant={plan.buttonVariant}
className="w-full"
size="lg"
disabled={plan.disabled || loading === plan.key.toUpperCase()}
onClick={plan.key === 'free' ? (plan as any).onDowngrade : (plan as any).onUpgrade}
>
{loading === plan.key.toUpperCase() ? 'Processing...' : plan.buttonText}
</Button>
</CardContent>
</Card>
))}
</div>
<div className="text-center mt-12">
<p className="text-gray-600">
All plans include unlimited static QR codes and basic customization.
</p>
<p className="text-gray-600 mt-2">
Need help choosing? <ObfuscatedMailto email="support@qrmaster.net" className="text-primary-600 hover:text-primary-700 underline">Contact our team</ObfuscatedMailto>
</p>
</div>
</div>
);
}
'use client';
import React, { useState, useEffect } from 'react';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Badge } from '@/components/ui/Badge';
import { showToast } from '@/components/ui/Toast';
import { useRouter } from 'next/navigation';
import { BillingToggle } from '@/components/ui/BillingToggle';
export default function PricingPage() {
const router = useRouter();
const [loading, setLoading] = useState<string | null>(null);
const [currentPlan, setCurrentPlan] = useState<string>('FREE');
const [currentInterval, setCurrentInterval] = useState<'month' | 'year' | null>(null);
const [billingPeriod, setBillingPeriod] = useState<'month' | 'year'>('month');
useEffect(() => {
// Fetch current user plan
const fetchUserPlan = async () => {
try {
const response = await fetch('/api/user/plan');
if (response.ok) {
const data = await response.json();
setCurrentPlan(data.plan || 'FREE');
setCurrentInterval(data.interval || null);
}
} catch (error) {
console.error('Error fetching user plan:', error);
}
};
fetchUserPlan();
}, []);
const handleUpgrade = async (plan: 'PRO' | 'BUSINESS') => {
setLoading(plan);
try {
const response = await fetch('/api/stripe/create-checkout-session', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
plan,
billingInterval: billingPeriod === 'month' ? 'month' : 'year',
}),
});
if (!response.ok) {
throw new Error('Failed to create checkout session');
}
const { url } = await response.json();
window.location.href = url;
} catch (error) {
console.error('Error creating checkout session:', error);
showToast('Failed to start checkout. Please try again.', 'error');
setLoading(null);
}
};
const handleDowngrade = async () => {
// Show confirmation dialog
const confirmed = window.confirm(
'Are you sure you want to downgrade to the Free plan? Your subscription will be canceled immediately and you will lose access to premium features.'
);
if (!confirmed) {
return;
}
setLoading('FREE');
try {
const response = await fetch('/api/stripe/cancel-subscription', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || 'Failed to cancel subscription');
}
showToast('Successfully downgraded to Free plan', 'success');
// Refresh to update the plan
setTimeout(() => {
window.location.reload();
}, 1500);
} catch (error: any) {
console.error('Error canceling subscription:', error);
showToast(error.message || 'Failed to downgrade. Please try again.', 'error');
setLoading(null);
}
};
// Helper function to check if this is the user's exact current plan (plan + interval)
const isCurrentPlanWithInterval = (planType: string, interval: 'month' | 'year') => {
return currentPlan === planType && currentInterval === interval;
};
// Helper function to check if user has this plan but different interval
const hasPlanDifferentInterval = (planType: string) => {
return currentPlan === planType && currentInterval && currentInterval !== billingPeriod;
};
const selectedInterval = billingPeriod === 'month' ? 'month' : 'year';
const plans = [
{
key: 'free',
name: 'Free',
price: '€0',
period: 'forever',
showDiscount: false,
features: [
'3 dynamic QR codes',
'Unlimited static QR codes',
'Basic scan tracking',
'Standard QR design templates',
'Download as SVG/PNG',
],
buttonText: currentPlan === 'FREE' ? 'Current Plan' : 'Downgrade to Free',
buttonVariant: 'outline' as const,
disabled: currentPlan === 'FREE',
popular: false,
onDowngrade: handleDowngrade,
},
{
key: 'pro',
name: 'Pro',
price: billingPeriod === 'month' ? '€9' : '€90',
period: billingPeriod === 'month' ? 'per month' : 'per year',
showDiscount: billingPeriod === 'year',
features: [
'50 dynamic QR codes',
'Unlimited static QR codes',
'Advanced analytics (scans, devices, locations)',
'Custom branding (colors & logos)',
],
buttonText: isCurrentPlanWithInterval('PRO', selectedInterval)
? 'Current Plan'
: hasPlanDifferentInterval('PRO')
? `Switch to ${billingPeriod === 'month' ? 'Monthly' : 'Yearly'}`
: 'Upgrade to Pro',
buttonVariant: 'primary' as const,
disabled: isCurrentPlanWithInterval('PRO', selectedInterval),
popular: true,
onUpgrade: () => handleUpgrade('PRO'),
},
{
key: 'business',
name: 'Business',
price: billingPeriod === 'month' ? '€29' : '€290',
period: billingPeriod === 'month' ? 'per month' : 'per year',
showDiscount: billingPeriod === 'year',
features: [
'500 dynamic QR codes',
'Unlimited static QR codes',
'Everything from Pro',
'Bulk QR Creation (up to 1,000)',
'Priority email support',
'Advanced tracking & insights',
],
buttonText: isCurrentPlanWithInterval('BUSINESS', selectedInterval)
? 'Current Plan'
: hasPlanDifferentInterval('BUSINESS')
? `Switch to ${billingPeriod === 'month' ? 'Monthly' : 'Yearly'}`
: 'Upgrade to Business',
buttonVariant: 'primary' as const,
disabled: isCurrentPlanWithInterval('BUSINESS', selectedInterval),
popular: false,
onUpgrade: () => handleUpgrade('BUSINESS'),
},
];
return (
<div className="container mx-auto px-4 py-12">
<div className="text-center mb-12">
<h1 className="text-4xl font-bold text-gray-900 mb-4">
Choose Your Plan
</h1>
<p className="text-xl text-gray-600">
Select the perfect plan for your QR code needs
</p>
</div>
<div className="flex justify-center mb-8">
<BillingToggle value={billingPeriod} onChange={setBillingPeriod} />
</div>
<div className="grid md:grid-cols-3 gap-8 max-w-6xl mx-auto">
{plans.map((plan) => (
<Card
key={plan.key}
className={plan.popular ? 'border-primary-500 shadow-xl relative' : ''}
>
{plan.popular && (
<div className="absolute -top-4 left-1/2 transform -translate-x-1/2">
<Badge variant="info" className="px-3 py-1">
Most Popular
</Badge>
</div>
)}
<CardHeader className="text-center pb-8">
<CardTitle className="text-2xl mb-4">
{plan.name}
</CardTitle>
<div className="flex flex-col items-center">
<div className="flex items-baseline justify-center">
<span className="text-4xl font-bold">
{plan.price}
</span>
<span className="text-gray-600 ml-2">
{plan.period}
</span>
</div>
{plan.showDiscount && (
<Badge variant="success" className="mt-2">
Save 16%
</Badge>
)}
</div>
</CardHeader>
<CardContent className="space-y-6">
<ul className="space-y-3">
{plan.features.map((feature: string, index: number) => (
<li key={index} className="flex items-start space-x-3">
<svg className="w-5 h-5 text-success-500 flex-shrink-0 mt-0.5" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span className="text-gray-700">{feature}</span>
</li>
))}
</ul>
<Button
variant={plan.buttonVariant}
className="w-full"
size="lg"
disabled={plan.disabled || loading === plan.key.toUpperCase()}
onClick={plan.key === 'free' ? (plan as any).onDowngrade : (plan as any).onUpgrade}
>
{loading === plan.key.toUpperCase() ? 'Processing...' : plan.buttonText}
</Button>
</CardContent>
</Card>
))}
</div>
<div className="text-center mt-12">
<p className="text-gray-600">
All plans include unlimited static QR codes and basic customization.
</p>
<p className="text-gray-600 mt-2">
Need help choosing? <a href="mailto:support@qrmaster.net" className="text-primary-600 hover:text-primary-700 underline">Contact our team</a>
</p>
</div>
</div>
);
}

View File

@@ -1,264 +1,459 @@
'use client';
import React, { useState, useEffect } from 'react';
import { useRouter, useParams } from 'next/navigation';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Input } from '@/components/ui/Input';
import { showToast } from '@/components/ui/Toast';
import { useCsrf } from '@/hooks/useCsrf';
export default function EditQRPage() {
const router = useRouter();
const params = useParams();
const qrId = params.id as string;
const { fetchWithCsrf, loading: csrfLoading } = useCsrf();
const [loading, setLoading] = useState(true);
const [saving, setSaving] = useState(false);
const [qrCode, setQrCode] = useState<any>(null);
const [title, setTitle] = useState('');
const [content, setContent] = useState<any>({});
useEffect(() => {
const fetchQRCode = async () => {
try {
const response = await fetch(`/api/qrs/${qrId}`);
if (response.ok) {
const data = await response.json();
setQrCode(data);
setTitle(data.title);
setContent(data.content || {});
} else {
showToast('Failed to load QR code', 'error');
router.push('/dashboard');
}
} catch (error) {
console.error('Error fetching QR code:', error);
showToast('Failed to load QR code', 'error');
router.push('/dashboard');
} finally {
setLoading(false);
}
};
fetchQRCode();
}, [qrId, router]);
const handleSave = async () => {
setSaving(true);
try {
const response = await fetchWithCsrf(`/api/qrs/${qrId}`, {
method: 'PATCH',
body: JSON.stringify({
title,
content,
}),
});
if (response.ok) {
showToast('QR code updated successfully!', 'success');
router.push('/dashboard');
} else {
const error = await response.json();
showToast(error.error || 'Failed to update QR code', 'error');
}
} catch (error) {
console.error('Error updating QR code:', error);
showToast('Failed to update QR code', 'error');
} finally {
setSaving(false);
}
};
if (loading) {
return (
<div className="flex items-center justify-center min-h-screen">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto mb-4"></div>
<p className="text-gray-600">Loading QR code...</p>
</div>
</div>
);
}
if (!qrCode) {
return null;
}
// Static QR codes cannot be edited
if (qrCode.type === 'STATIC') {
return (
<div className="max-w-2xl mx-auto mt-12">
<Card>
<CardContent className="p-12 text-center">
<div className="w-20 h-20 bg-warning-100 rounded-full flex items-center justify-center mx-auto mb-6">
<svg className="w-10 h-10 text-warning-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
</div>
<h2 className="text-2xl font-bold text-gray-900 mb-2">Static QR Code</h2>
<p className="text-gray-600 mb-8">
Static QR codes cannot be edited because their content is embedded directly in the QR code image.
</p>
<Button onClick={() => router.push('/dashboard')}>
Back to Dashboard
</Button>
</CardContent>
</Card>
</div>
);
}
return (
<div className="max-w-3xl mx-auto">
<div className="mb-8">
<h1 className="text-3xl font-bold text-gray-900">Edit QR Code</h1>
<p className="text-gray-600 mt-2">Update your dynamic QR code content</p>
</div>
<Card>
<CardHeader>
<CardTitle>QR Code Details</CardTitle>
</CardHeader>
<CardContent className="space-y-6">
<Input
label="Title"
value={title}
onChange={(e) => setTitle(e.target.value)}
placeholder="Enter QR code title"
required
/>
{qrCode.contentType === 'URL' && (
<Input
label="URL"
type="url"
value={content.url || ''}
onChange={(e) => setContent({ ...content, url: e.target.value })}
placeholder="https://example.com"
required
/>
)}
{qrCode.contentType === 'PHONE' && (
<Input
label="Phone Number"
type="tel"
value={content.phone || ''}
onChange={(e) => setContent({ ...content, phone: e.target.value })}
placeholder="+1234567890"
required
/>
)}
{qrCode.contentType === 'VCARD' && (
<>
<Input
label="First Name"
value={content.firstName || ''}
onChange={(e) => setContent({ ...content, firstName: e.target.value })}
placeholder="John"
required
/>
<Input
label="Last Name"
value={content.lastName || ''}
onChange={(e) => setContent({ ...content, lastName: e.target.value })}
placeholder="Doe"
required
/>
<Input
label="Email"
type="email"
value={content.email || ''}
onChange={(e) => setContent({ ...content, email: e.target.value })}
placeholder="john@example.com"
/>
<Input
label="Phone"
value={content.phone || ''}
onChange={(e) => setContent({ ...content, phone: e.target.value })}
placeholder="+1234567890"
/>
<Input
label="Organization"
value={content.organization || ''}
onChange={(e) => setContent({ ...content, organization: e.target.value })}
placeholder="Company Name"
/>
<Input
label="Job Title"
value={content.title || ''}
onChange={(e) => setContent({ ...content, title: e.target.value })}
placeholder="CEO"
/>
</>
)}
{qrCode.contentType === 'GEO' && (
<>
<Input
label="Latitude"
type="number"
step="any"
value={content.latitude || ''}
onChange={(e) => setContent({ ...content, latitude: parseFloat(e.target.value) || 0 })}
placeholder="37.7749"
required
/>
<Input
label="Longitude"
type="number"
step="any"
value={content.longitude || ''}
onChange={(e) => setContent({ ...content, longitude: parseFloat(e.target.value) || 0 })}
placeholder="-122.4194"
required
/>
<Input
label="Location Label (Optional)"
value={content.label || ''}
onChange={(e) => setContent({ ...content, label: e.target.value })}
placeholder="Golden Gate Bridge"
/>
</>
)}
{qrCode.contentType === 'TEXT' && (
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
Text Content
</label>
<textarea
value={content.text || ''}
onChange={(e) => setContent({ ...content, text: e.target.value })}
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"
rows={4}
placeholder="Enter your text content"
required
/>
</div>
)}
<div className="flex justify-end space-x-4 pt-4">
<Button
variant="outline"
onClick={() => router.push('/dashboard')}
>
Cancel
</Button>
<Button
onClick={handleSave}
loading={saving}
disabled={csrfLoading || saving}
>
{csrfLoading ? 'Loading...' : 'Save Changes'}
</Button>
</div>
</CardContent>
</Card>
</div>
);
}
'use client';
import React, { useState, useEffect } from 'react';
import { useRouter, useParams } from 'next/navigation';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Input } from '@/components/ui/Input';
import { showToast } from '@/components/ui/Toast';
import { useCsrf } from '@/hooks/useCsrf';
import { Upload, FileText, HelpCircle } from 'lucide-react';
// Tooltip component for form field help
const Tooltip = ({ text }: { text: string }) => (
<div className="group relative inline-block ml-1">
<HelpCircle className="w-4 h-4 text-gray-400 cursor-help" />
<div className="absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-48 text-center">
{text}
<div className="absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-gray-900"></div>
</div>
</div>
);
export default function EditQRPage() {
const router = useRouter();
const params = useParams();
const qrId = params.id as string;
const { fetchWithCsrf, loading: csrfLoading } = useCsrf();
const [loading, setLoading] = useState(true);
const [saving, setSaving] = useState(false);
const [uploading, setUploading] = useState(false);
const [qrCode, setQrCode] = useState<any>(null);
const [title, setTitle] = useState('');
const [content, setContent] = useState<any>({});
useEffect(() => {
const fetchQRCode = async () => {
try {
const response = await fetch(`/api/qrs/${qrId}`);
if (response.ok) {
const data = await response.json();
setQrCode(data);
setTitle(data.title);
setContent(data.content || {});
} else {
showToast('Failed to load QR code', 'error');
router.push('/dashboard');
}
} catch (error) {
console.error('Error fetching QR code:', error);
showToast('Failed to load QR code', 'error');
router.push('/dashboard');
} finally {
setLoading(false);
}
};
fetchQRCode();
}, [qrId, router]);
const handleFileUpload = async (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
if (!file) return;
// 10MB limit
if (file.size > 10 * 1024 * 1024) {
showToast('File size too large (max 10MB)', 'error');
return;
}
setUploading(true);
const formData = new FormData();
formData.append('file', file);
try {
const response = await fetch('/api/upload', {
method: 'POST',
body: formData,
});
const data = await response.json();
if (response.ok) {
setContent({ ...content, fileUrl: data.url, fileName: data.filename });
showToast('File uploaded successfully!', 'success');
} else {
showToast(data.error || 'Upload failed', 'error');
}
} catch (error) {
console.error('Upload error:', error);
showToast('Error uploading file', 'error');
} finally {
setUploading(false);
}
};
const handleSave = async () => {
setSaving(true);
try {
const response = await fetchWithCsrf(`/api/qrs/${qrId}`, {
method: 'PATCH',
body: JSON.stringify({
title,
content,
}),
});
if (response.ok) {
showToast('QR code updated successfully!', 'success');
router.push('/dashboard');
} else {
const error = await response.json();
showToast(error.error || 'Failed to update QR code', 'error');
}
} catch (error) {
console.error('Error updating QR code:', error);
showToast('Failed to update QR code', 'error');
} finally {
setSaving(false);
}
};
if (loading) {
return (
<div className="flex items-center justify-center min-h-screen">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto mb-4"></div>
<p className="text-gray-600">Loading QR code...</p>
</div>
</div>
);
}
if (!qrCode) {
return null;
}
// Static QR codes cannot be edited
if (qrCode.type === 'STATIC') {
return (
<div className="max-w-2xl mx-auto mt-12">
<Card>
<CardContent className="p-12 text-center">
<div className="w-20 h-20 bg-warning-100 rounded-full flex items-center justify-center mx-auto mb-6">
<svg className="w-10 h-10 text-warning-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
</div>
<h2 className="text-2xl font-bold text-gray-900 mb-2">Static QR Code</h2>
<p className="text-gray-600 mb-8">
Static QR codes cannot be edited because their content is embedded directly in the QR code image.
</p>
<Button onClick={() => router.push('/dashboard')}>
Back to Dashboard
</Button>
</CardContent>
</Card>
</div>
);
}
return (
<div className="max-w-3xl mx-auto">
<div className="mb-8">
<h1 className="text-3xl font-bold text-gray-900">Edit QR Code</h1>
<p className="text-gray-600 mt-2">Update your dynamic QR code content</p>
</div>
<Card>
<CardHeader>
<CardTitle>QR Code Details</CardTitle>
</CardHeader>
<CardContent className="space-y-6">
<Input
label="Title"
value={title}
onChange={(e) => setTitle(e.target.value)}
placeholder="Enter QR code title"
required
/>
{qrCode.contentType === 'URL' && (
<Input
label="URL"
type="url"
value={content.url || ''}
onChange={(e) => setContent({ ...content, url: e.target.value })}
placeholder="https://example.com"
required
/>
)}
{qrCode.contentType === 'PHONE' && (
<Input
label="Phone Number"
type="tel"
value={content.phone || ''}
onChange={(e) => setContent({ ...content, phone: e.target.value })}
placeholder="+1234567890"
required
/>
)}
{qrCode.contentType === 'VCARD' && (
<>
<Input
label="First Name"
value={content.firstName || ''}
onChange={(e) => setContent({ ...content, firstName: e.target.value })}
placeholder="John"
required
/>
<Input
label="Last Name"
value={content.lastName || ''}
onChange={(e) => setContent({ ...content, lastName: e.target.value })}
placeholder="Doe"
required
/>
<Input
label="Email"
type="email"
value={content.email || ''}
onChange={(e) => setContent({ ...content, email: e.target.value })}
placeholder="john@example.com"
/>
<Input
label="Phone"
value={content.phone || ''}
onChange={(e) => setContent({ ...content, phone: e.target.value })}
placeholder="+1234567890"
/>
<Input
label="Organization"
value={content.organization || ''}
onChange={(e) => setContent({ ...content, organization: e.target.value })}
placeholder="Company Name"
/>
<Input
label="Job Title"
value={content.title || ''}
onChange={(e) => setContent({ ...content, title: e.target.value })}
placeholder="CEO"
/>
</>
)}
{qrCode.contentType === 'GEO' && (
<>
<Input
label="Latitude"
type="number"
step="any"
value={content.latitude || ''}
onChange={(e) => setContent({ ...content, latitude: parseFloat(e.target.value) || 0 })}
placeholder="37.7749"
required
/>
<Input
label="Longitude"
type="number"
step="any"
value={content.longitude || ''}
onChange={(e) => setContent({ ...content, longitude: parseFloat(e.target.value) || 0 })}
placeholder="-122.4194"
required
/>
<Input
label="Location Label (Optional)"
value={content.label || ''}
onChange={(e) => setContent({ ...content, label: e.target.value })}
placeholder="Golden Gate Bridge"
/>
</>
)}
{qrCode.contentType === 'TEXT' && (
<div>
<label className="block text-sm font-medium text-gray-700 mb-2">
Text Content
</label>
<textarea
value={content.text || ''}
onChange={(e) => setContent({ ...content, text: e.target.value })}
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"
rows={4}
placeholder="Enter your text content"
required
/>
</div>
)}
{qrCode.contentType === 'PDF' && (
<>
<div>
<div className="flex items-center mb-1">
<label className="block text-sm font-medium text-gray-700">Upload Menu / PDF</label>
<Tooltip text="Upload your menu PDF (Max 10MB). Hosted securely." />
</div>
<div className="mt-2 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-lg hover:bg-gray-50 transition-colors relative">
<div className="space-y-1 text-center">
{uploading ? (
<div className="flex flex-col items-center">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500 mb-2"></div>
<p className="text-sm text-gray-500">Uploading...</p>
</div>
) : content.fileUrl ? (
<div className="flex flex-col items-center">
<div className="mx-auto h-12 w-12 text-primary-500 bg-primary-50 rounded-full flex items-center justify-center mb-2">
<FileText className="h-6 w-6" />
</div>
<p className="text-sm text-green-600 font-medium mb-1">Upload Complete!</p>
<a href={content.fileUrl} target="_blank" rel="noopener noreferrer" className="text-xs text-primary-500 hover:underline break-all max-w-xs mb-3 block">
{content.fileName || 'View File'}
</a>
<label htmlFor="file-upload" className="cursor-pointer bg-white py-2 px-3 border border-gray-300 rounded-md shadow-sm text-sm leading-4 font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
<span>Replace File</span>
<input id="file-upload" name="file-upload" type="file" className="sr-only" accept=".pdf,image/*" onChange={handleFileUpload} />
</label>
</div>
) : (
<>
<Upload className="mx-auto h-12 w-12 text-gray-400" />
<div className="flex text-sm text-gray-600 justify-center">
<label htmlFor="file-upload" className="relative cursor-pointer bg-white rounded-md font-medium text-primary-600 hover:text-primary-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-primary-500">
<span>Upload a file</span>
<input id="file-upload" name="file-upload" type="file" className="sr-only" accept=".pdf,image/*" onChange={handleFileUpload} />
</label>
<p className="pl-1">or drag and drop</p>
</div>
<p className="text-xs text-gray-500">PDF, PNG, JPG up to 10MB</p>
</>
)}
</div>
</div>
</div>
{content.fileUrl && (
<Input
label="File Name / Menu Title"
value={content.fileName || ''}
onChange={(e) => setContent({ ...content, fileName: e.target.value })}
placeholder="Product Catalog 2026"
/>
)}
</>
)}
{qrCode.contentType === 'APP' && (
<>
<Input
label="iOS App Store URL"
value={content.iosUrl || ''}
onChange={(e) => setContent({ ...content, iosUrl: e.target.value })}
placeholder="https://apps.apple.com/app/..."
/>
<Input
label="Android Play Store URL"
value={content.androidUrl || ''}
onChange={(e) => setContent({ ...content, androidUrl: e.target.value })}
placeholder="https://play.google.com/store/apps/..."
/>
<Input
label="Fallback URL (Desktop)"
value={content.fallbackUrl || ''}
onChange={(e) => setContent({ ...content, fallbackUrl: e.target.value })}
placeholder="https://yourapp.com"
/>
</>
)}
{qrCode.contentType === 'COUPON' && (
<>
<Input
label="Coupon Code"
value={content.code || ''}
onChange={(e) => setContent({ ...content, code: e.target.value })}
placeholder="SUMMER20"
required
/>
<Input
label="Discount"
value={content.discount || ''}
onChange={(e) => setContent({ ...content, discount: e.target.value })}
placeholder="20% OFF"
required
/>
<Input
label="Title"
value={content.title || ''}
onChange={(e) => setContent({ ...content, title: e.target.value })}
placeholder="Summer Sale 2026"
/>
<Input
label="Description (optional)"
value={content.description || ''}
onChange={(e) => setContent({ ...content, description: e.target.value })}
placeholder="Valid on all products"
/>
<Input
label="Expiry Date (optional)"
type="date"
value={content.expiryDate || ''}
onChange={(e) => setContent({ ...content, expiryDate: e.target.value })}
/>
<Input
label="Redeem URL (optional)"
value={content.redeemUrl || ''}
onChange={(e) => setContent({ ...content, redeemUrl: e.target.value })}
placeholder="https://shop.example.com"
/>
</>
)}
{qrCode.contentType === 'FEEDBACK' && (
<>
<Input
label="Business Name"
value={content.businessName || ''}
onChange={(e) => setContent({ ...content, businessName: e.target.value })}
placeholder="Your Restaurant Name"
required
/>
<Input
label="Google Review URL (optional)"
value={content.googleReviewUrl || ''}
onChange={(e) => setContent({ ...content, googleReviewUrl: e.target.value })}
placeholder="https://search.google.com/local/writereview?placeid=..."
/>
<Input
label="Thank You Message"
value={content.thankYouMessage || ''}
onChange={(e) => setContent({ ...content, thankYouMessage: e.target.value })}
placeholder="Thanks for your feedback!"
/>
</>
)}
<div className="flex justify-end space-x-4 pt-4">
<Button
variant="outline"
onClick={() => router.push('/dashboard')}
>
Cancel
</Button>
<Button
onClick={handleSave}
loading={saving}
disabled={csrfLoading || saving}
>
{csrfLoading ? 'Loading...' : 'Save Changes'}
</Button>
</div>
</CardContent>
</Card>
</div>
);
}

View File

@@ -0,0 +1,196 @@
'use client';
import React, { useState, useEffect } from 'react';
import { useParams, useRouter } from 'next/navigation';
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Star, ArrowLeft, ChevronLeft, ChevronRight, MessageSquare } from 'lucide-react';
interface Feedback {
id: string;
rating: number;
comment: string;
date: string;
}
interface FeedbackStats {
total: number;
avgRating: number;
distribution: { [key: number]: number };
}
interface Pagination {
page: number;
totalPages: number;
hasMore: boolean;
}
export default function FeedbackListPage() {
const params = useParams();
const router = useRouter();
const qrId = params.id as string;
const [feedbacks, setFeedbacks] = useState<Feedback[]>([]);
const [stats, setStats] = useState<FeedbackStats | null>(null);
const [pagination, setPagination] = useState<Pagination>({ page: 1, totalPages: 1, hasMore: false });
const [loading, setLoading] = useState(true);
const [currentPage, setCurrentPage] = useState(1);
useEffect(() => {
fetchFeedback(currentPage);
}, [qrId, currentPage]);
const fetchFeedback = async (page: number) => {
setLoading(true);
try {
const res = await fetch(`/api/qrs/${qrId}/feedback?page=${page}&limit=20`);
if (res.ok) {
const data = await res.json();
setFeedbacks(data.feedbacks);
setStats(data.stats);
setPagination(data.pagination);
}
} catch (error) {
console.error('Error fetching feedback:', error);
} finally {
setLoading(false);
}
};
const renderStars = (rating: number) => (
<div className="flex gap-0.5">
{[1, 2, 3, 4, 5].map((star) => (
<Star
key={star}
className={`w-4 h-4 ${star <= rating ? 'text-amber-400 fill-amber-400' : 'text-gray-200'}`}
/>
))}
</div>
);
if (loading && !stats) {
return (
<div className="flex items-center justify-center min-h-[400px]">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600"></div>
</div>
);
}
return (
<div className="max-w-4xl mx-auto">
{/* Header */}
<div className="mb-8">
<Link href={`/qr/${qrId}`} className="inline-flex items-center text-gray-500 hover:text-gray-700 mb-4">
<ArrowLeft className="w-4 h-4 mr-2" />
Back to QR Code
</Link>
<h1 className="text-3xl font-bold text-gray-900">Customer Feedback</h1>
<p className="text-gray-600 mt-1">{stats?.total || 0} total responses</p>
</div>
{/* Stats Overview */}
{stats && (
<Card className="mb-8">
<CardContent className="p-6">
<div className="flex flex-col md:flex-row md:items-center gap-8">
{/* Average Rating */}
<div className="text-center md:text-left">
<div className="text-5xl font-bold text-gray-900 mb-1">{stats.avgRating}</div>
<div className="flex justify-center md:justify-start mb-1">
{renderStars(Math.round(stats.avgRating))}
</div>
<p className="text-sm text-gray-500">{stats.total} reviews</p>
</div>
{/* Distribution */}
<div className="flex-1 space-y-2">
{[5, 4, 3, 2, 1].map((rating) => {
const count = stats.distribution[rating] || 0;
const percentage = stats.total > 0 ? (count / stats.total) * 100 : 0;
return (
<div key={rating} className="flex items-center gap-3">
<span className="text-sm text-gray-600 w-12">{rating} stars</span>
<div className="flex-1 h-2 bg-gray-100 rounded-full overflow-hidden">
<div
className="h-full bg-amber-400 rounded-full transition-all"
style={{ width: `${percentage}%` }}
/>
</div>
<span className="text-sm text-gray-500 w-12 text-right">{count}</span>
</div>
);
})}
</div>
</div>
</CardContent>
</Card>
)}
{/* Feedback List */}
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<MessageSquare className="w-5 h-5" />
All Reviews
</CardTitle>
</CardHeader>
<CardContent>
{feedbacks.length === 0 ? (
<div className="text-center py-12 text-gray-500">
<Star className="w-12 h-12 mx-auto mb-4 text-gray-300" />
<p>No feedback received yet</p>
</div>
) : (
<div className="divide-y divide-gray-100">
{feedbacks.map((feedback) => (
<div key={feedback.id} className="py-4">
<div className="flex items-center justify-between mb-2">
{renderStars(feedback.rating)}
<span className="text-sm text-gray-400">
{new Date(feedback.date).toLocaleDateString('en-US', {
month: 'short',
day: 'numeric',
year: 'numeric',
})}
</span>
</div>
{feedback.comment && (
<p className="text-gray-700">{feedback.comment}</p>
)}
</div>
))}
</div>
)}
{/* Pagination */}
{pagination.totalPages > 1 && (
<div className="flex items-center justify-between mt-6 pt-6 border-t">
<Button
variant="outline"
size="sm"
onClick={() => setCurrentPage((p) => Math.max(1, p - 1))}
disabled={currentPage === 1}
>
<ChevronLeft className="w-4 h-4 mr-1" />
Previous
</Button>
<span className="text-sm text-gray-500">
Page {currentPage} of {pagination.totalPages}
</span>
<Button
variant="outline"
size="sm"
onClick={() => setCurrentPage((p) => p + 1)}
disabled={!pagination.hasMore}
>
Next
<ChevronRight className="w-4 h-4 ml-1" />
</Button>
</div>
)}
</CardContent>
</Card>
</div>
);
}

View File

@@ -0,0 +1,287 @@
'use client';
import React, { useState, useEffect } from 'react';
import { useParams, useRouter } from 'next/navigation';
import Link from 'next/link';
import { QRCodeSVG } from 'qrcode.react';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Badge } from '@/components/ui/Badge';
import {
ArrowLeft, Edit, ExternalLink, Star, MessageSquare,
BarChart3, Copy, Check, Pause, Play
} from 'lucide-react';
import { showToast } from '@/components/ui/Toast';
import { useCsrf } from '@/hooks/useCsrf';
interface QRCode {
id: string;
title: string;
type: 'STATIC' | 'DYNAMIC';
contentType: string;
content: any;
slug: string;
status: 'ACTIVE' | 'PAUSED';
style: any;
createdAt: string;
_count?: { scans: number };
}
interface FeedbackStats {
total: number;
avgRating: number;
distribution: { [key: number]: number };
}
export default function QRDetailPage() {
const params = useParams();
const router = useRouter();
const qrId = params.id as string;
const { fetchWithCsrf } = useCsrf();
const [qrCode, setQrCode] = useState<QRCode | null>(null);
const [feedbackStats, setFeedbackStats] = useState<FeedbackStats | null>(null);
const [loading, setLoading] = useState(true);
const [copied, setCopied] = useState(false);
useEffect(() => {
fetchQRCode();
}, [qrId]);
const fetchQRCode = async () => {
try {
const res = await fetch(`/api/qrs/${qrId}`);
if (res.ok) {
const data = await res.json();
setQrCode(data);
// Fetch feedback stats if it's a feedback QR
if (data.contentType === 'FEEDBACK') {
const feedbackRes = await fetch(`/api/qrs/${qrId}/feedback?limit=1`);
if (feedbackRes.ok) {
const feedbackData = await feedbackRes.json();
setFeedbackStats(feedbackData.stats);
}
}
} else {
showToast('QR code not found', 'error');
router.push('/dashboard');
}
} catch (error) {
console.error('Error fetching QR code:', error);
} finally {
setLoading(false);
}
};
const copyLink = async () => {
const url = `${window.location.origin}/r/${qrCode?.slug}`;
await navigator.clipboard.writeText(url);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
showToast('Link copied!', 'success');
};
const toggleStatus = async () => {
if (!qrCode) return;
const newStatus = qrCode.status === 'ACTIVE' ? 'PAUSED' : 'ACTIVE';
try {
const res = await fetchWithCsrf(`/api/qrs/${qrId}`, {
method: 'PATCH',
body: JSON.stringify({ status: newStatus }),
});
if (res.ok) {
setQrCode({ ...qrCode, status: newStatus });
showToast(`QR code ${newStatus === 'ACTIVE' ? 'activated' : 'paused'}`, 'success');
}
} catch (error) {
showToast('Failed to update status', 'error');
}
};
const renderStars = (rating: number) => (
<div className="flex gap-0.5">
{[1, 2, 3, 4, 5].map((star) => (
<Star
key={star}
className={`w-4 h-4 ${star <= rating ? 'text-amber-400 fill-amber-400' : 'text-gray-200'}`}
/>
))}
</div>
);
if (loading) {
return (
<div className="flex items-center justify-center min-h-[400px]">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600"></div>
</div>
);
}
if (!qrCode) return null;
const qrUrl = `${typeof window !== 'undefined' ? window.location.origin : ''}/r/${qrCode.slug}`;
return (
<div className="max-w-6xl mx-auto">
{/* Header */}
<div className="mb-8">
<Link href="/dashboard" className="inline-flex items-center text-gray-500 hover:text-gray-700 mb-4">
<ArrowLeft className="w-4 h-4 mr-2" />
Back to Dashboard
</Link>
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div>
<h1 className="text-3xl font-bold text-gray-900">{qrCode.title}</h1>
<div className="flex items-center gap-2 mt-2">
<Badge variant={qrCode.type === 'DYNAMIC' ? 'info' : 'default'}>
{qrCode.type}
</Badge>
<Badge variant={qrCode.status === 'ACTIVE' ? 'success' : 'warning'}>
{qrCode.status}
</Badge>
<Badge>{qrCode.contentType}</Badge>
</div>
</div>
<div className="flex gap-2">
{qrCode.type === 'DYNAMIC' && (
<>
<Button variant="outline" size="sm" onClick={toggleStatus}>
{qrCode.status === 'ACTIVE' ? <Pause className="w-4 h-4 mr-1" /> : <Play className="w-4 h-4 mr-1" />}
{qrCode.status === 'ACTIVE' ? 'Pause' : 'Activate'}
</Button>
<Link href={`/qr/${qrId}/edit`}>
<Button variant="outline" size="sm">
<Edit className="w-4 h-4 mr-1" /> Edit
</Button>
</Link>
</>
)}
</div>
</div>
</div>
<div className="grid lg:grid-cols-3 gap-8">
{/* Left: QR Code */}
<div>
<Card>
<CardContent className="p-6 flex flex-col items-center">
<div className="bg-white p-4 rounded-xl shadow-sm mb-4">
<QRCodeSVG
value={qrUrl}
size={200}
fgColor={qrCode.style?.foregroundColor || '#000000'}
bgColor={qrCode.style?.backgroundColor || '#FFFFFF'}
/>
</div>
<div className="w-full space-y-2">
<Button variant="outline" className="w-full" onClick={copyLink}>
{copied ? <Check className="w-4 h-4 mr-2" /> : <Copy className="w-4 h-4 mr-2" />}
{copied ? 'Copied!' : 'Copy Link'}
</Button>
<a href={qrUrl} target="_blank" rel="noopener noreferrer" className="block">
<Button variant="outline" className="w-full">
<ExternalLink className="w-4 h-4 mr-2" /> Open Link
</Button>
</a>
</div>
</CardContent>
</Card>
</div>
{/* Right: Stats & Info */}
<div className="lg:col-span-2 space-y-6">
{/* Quick Stats */}
<div className="grid grid-cols-2 sm:grid-cols-3 gap-4">
<Card>
<CardContent className="p-4 text-center">
<BarChart3 className="w-6 h-6 mx-auto mb-2 text-indigo-500" />
<p className="text-2xl font-bold text-gray-900">{qrCode._count?.scans || 0}</p>
<p className="text-sm text-gray-500">Total Scans</p>
</CardContent>
</Card>
<Card>
<CardContent className="p-4 text-center">
<p className="text-2xl font-bold text-gray-900">{qrCode.type}</p>
<p className="text-sm text-gray-500">QR Type</p>
</CardContent>
</Card>
<Card>
<CardContent className="p-4 text-center">
<p className="text-2xl font-bold text-gray-900">
{new Date(qrCode.createdAt).toLocaleDateString('en-US', { month: 'short', day: 'numeric' })}
</p>
<p className="text-sm text-gray-500">Created</p>
</CardContent>
</Card>
</div>
{/* Feedback Summary (only for FEEDBACK type) */}
{qrCode.contentType === 'FEEDBACK' && (
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Star className="w-5 h-5 text-amber-400" />
Customer Feedback
</CardTitle>
</CardHeader>
<CardContent>
{feedbackStats && feedbackStats.total > 0 ? (
<div className="flex flex-col sm:flex-row sm:items-center gap-6 mb-4">
{/* Average */}
<div className="text-center sm:text-left">
<div className="text-4xl font-bold text-gray-900">{feedbackStats.avgRating}</div>
{renderStars(Math.round(feedbackStats.avgRating))}
<p className="text-sm text-gray-500 mt-1">{feedbackStats.total} reviews</p>
</div>
{/* Distribution */}
<div className="flex-1 space-y-1">
{[5, 4, 3, 2, 1].map((rating) => {
const count = feedbackStats.distribution[rating] || 0;
const pct = feedbackStats.total > 0 ? (count / feedbackStats.total) * 100 : 0;
return (
<div key={rating} className="flex items-center gap-2 text-sm">
<span className="w-8 text-gray-500">{rating}</span>
<div className="flex-1 h-2 bg-gray-100 rounded-full overflow-hidden">
<div className="h-full bg-amber-400 rounded-full" style={{ width: `${pct}%` }} />
</div>
<span className="w-8 text-gray-400 text-right">{count}</span>
</div>
);
})}
</div>
</div>
) : (
<p className="text-gray-500 mb-4">No feedback received yet. Share your QR code to collect reviews!</p>
)}
<Link href={`/qr/${qrId}/feedback`} className="block">
<Button variant="outline" className="w-full">
<MessageSquare className="w-4 h-4 mr-2" />
View All Feedback
</Button>
</Link>
</CardContent>
</Card>
)}
{/* Content Info */}
<Card>
<CardHeader>
<CardTitle>Content Details</CardTitle>
</CardHeader>
<CardContent>
<pre className="bg-gray-50 p-4 rounded-lg text-sm overflow-auto">
{JSON.stringify(qrCode.content, null, 2)}
</pre>
</CardContent>
</Card>
</div>
</div>
</div>
);
}

View File

@@ -1,38 +1,11 @@
import '@/styles/globals.css';
import { Providers } from '@/components/Providers';
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Authentication | QR Master',
description: 'Securely login or sign up to QR Master to manage your dynamic QR codes, track analytics, and access premium features. Your gateway to professional QR management.',
icons: {
icon: [
{ url: '/favicon.svg', type: 'image/svg+xml' },
{ url: '/logo.svg', type: 'image/svg+xml' },
],
apple: '/logo.svg',
},
};
export default function AuthRootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className="font-sans">
<Providers>
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white">
{children}
<div className="py-6 text-center text-sm text-slate-500 space-x-4">
<a href="/" className="hover:text-primary-600 transition-colors">Home</a>
<a href="/privacy" className="hover:text-primary-600 transition-colors">Privacy</a>
<a href="/faq" className="hover:text-primary-600 transition-colors">FAQ</a>
</div>
</div>
</Providers>
</body>
</html>
);
export default function AuthLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white">
{children}
</div>
);
}

View File

@@ -1,164 +0,0 @@
'use client';
import React, { useState, useEffect } from 'react';
import { useRouter, useSearchParams } from 'next/navigation';
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Input } from '@/components/ui/Input';
import { Button } from '@/components/ui/Button';
import { useTranslation } from '@/hooks/useTranslation';
import { useCsrf } from '@/hooks/useCsrf';
export default function LoginClientPage() {
const router = useRouter();
const searchParams = useSearchParams();
const { t } = useTranslation();
const { fetchWithCsrf, loading: csrfLoading } = useCsrf();
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [loading, setLoading] = useState(false);
const [error, setError] = useState('');
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setLoading(true);
setError('');
try {
const response = await fetchWithCsrf('/api/auth/simple-login', {
method: 'POST',
body: JSON.stringify({ email, password }),
});
const data = await response.json();
if (response.ok && data.success) {
// Store user in localStorage for client-side
localStorage.setItem('user', JSON.stringify(data.user));
// Track successful login with PostHog
try {
const { identifyUser, trackEvent } = await import('@/components/PostHogProvider');
identifyUser(data.user.id, {
email: data.user.email,
name: data.user.name,
plan: data.user.plan || 'FREE',
});
trackEvent('user_login', {
method: 'email',
email: data.user.email,
});
} catch (error) {
console.error('PostHog tracking error:', error);
}
// Check for redirect parameter
const redirectUrl = searchParams.get('redirect') || '/dashboard';
router.push(redirectUrl);
router.refresh();
} else {
setError(data.error || 'Invalid email or password');
}
} catch (err) {
setError('An error occurred. Please try again.');
} finally {
setLoading(false);
}
};
const handleGoogleSignIn = () => {
// Redirect to Google OAuth API route
window.location.href = '/api/auth/google';
};
return (
<Card>
<CardContent className="p-6">
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-50 text-red-600 p-3 rounded-lg text-sm">
{error}
</div>
)}
<Input
label="Email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="you@example.com"
required
/>
<Input
label="Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
required
/>
<div className="flex items-center justify-between">
<label className="flex items-center">
<input type="checkbox" className="mr-2" />
<span className="text-sm text-gray-600">Remember me</span>
</label>
<Link href="/forgot-password" className="text-sm text-primary-600 hover:text-primary-700">
Forgot password?
</Link>
</div>
<Button type="submit" className="w-full" loading={loading} disabled={csrfLoading || loading}>
{csrfLoading ? 'Loading...' : 'Sign In'}
</Button>
<div className="relative my-6">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-gray-300"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<Button
type="button"
variant="outline"
className="w-full"
onClick={handleGoogleSignIn}
>
<svg className="w-5 h-5 mr-2" viewBox="0 0 24 24">
<path
fill="#4285F4"
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
/>
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg>
Sign in with Google
</Button>
</form>
<div className="mt-6 text-center">
<p className="text-sm text-gray-600">
Don't have an account?{' '}
<Link href="/signup" className="text-primary-600 hover:text-primary-700 font-medium">
Sign up
</Link>
</p>
</div>
</CardContent>
</Card>
);
}

View File

@@ -1,68 +1,187 @@
import React, { Suspense } from 'react';
import type { Metadata } from 'next';
import Link from 'next/link';
import LoginClientPage from './ClientPage';
export const metadata: Metadata = {
title: {
absolute: 'Login to QR Master | Access Your Dashboard'
},
description: 'Sign in to QR Master to create, manage, and track your QR codes. Access your dashboard and view analytics.',
alternates: {
canonical: 'https://www.qrmaster.net/login',
},
openGraph: {
title: 'Login to QR Master | Access Your Dashboard',
description: 'Sign in to QR Master to create, manage, and track your QR codes.',
url: 'https://www.qrmaster.net/login',
type: 'website',
images: [{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master Login',
}],
},
twitter: {
card: 'summary_large_image',
title: 'Login to QR Master | Access Your Dashboard',
description: 'Sign in to QR Master to create, manage, and track your QR codes.',
images: ['https://www.qrmaster.net/og-image.png'],
},
};
export default function LoginPage() {
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Welcome Back</h1>
<p className="text-gray-600 mt-2">Sign in to your account</p>
<Link href="/" className="text-sm text-primary-600 hover:text-primary-700 font-medium mt-2 inline-block border border-primary-600 hover:border-primary-700 px-4 py-2 rounded-lg transition-colors">
Back to Home
</Link>
</div>
<Suspense fallback={
<div className="bg-white rounded-xl shadow-sm border border-slate-200 p-8 flex items-center justify-center min-h-[400px]">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"></div>
</div>
}>
<LoginClientPage />
</Suspense>
<p className="text-center text-sm text-gray-500 mt-6">
By signing in, you agree to our{' '}
<Link href="/privacy" className="text-primary-600 hover:text-primary-700">
Privacy Policy
</Link>
</p>
</div>
</div>
);
'use client';
import React, { useState, useEffect } from 'react';
import { useRouter, useSearchParams } from 'next/navigation';
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Input } from '@/components/ui/Input';
import { Button } from '@/components/ui/Button';
import { useTranslation } from '@/hooks/useTranslation';
import { useCsrf } from '@/hooks/useCsrf';
export default function LoginPage() {
const router = useRouter();
const searchParams = useSearchParams();
const { t } = useTranslation();
const { fetchWithCsrf, loading: csrfLoading } = useCsrf();
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [loading, setLoading] = useState(false);
const [error, setError] = useState('');
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setLoading(true);
setError('');
try {
const response = await fetchWithCsrf('/api/auth/simple-login', {
method: 'POST',
body: JSON.stringify({ email, password }),
});
const data = await response.json();
if (response.ok && data.success) {
// Store user in localStorage for client-side
localStorage.setItem('user', JSON.stringify(data.user));
// Track successful login with PostHog
try {
const { identifyUser, trackEvent } = await import('@/components/PostHogProvider');
identifyUser(data.user.id, {
email: data.user.email,
name: data.user.name,
plan: data.user.plan || 'FREE',
});
trackEvent('user_login', {
method: 'email',
email: data.user.email,
});
} catch (error) {
console.error('PostHog tracking error:', error);
}
// Check for redirect parameter
const redirectUrl = searchParams.get('redirect') || '/dashboard';
router.push(redirectUrl);
router.refresh();
} else {
setError(data.error || 'Invalid email or password');
}
} catch (err) {
setError('An error occurred. Please try again.');
} finally {
setLoading(false);
}
};
const handleGoogleSignIn = () => {
// Redirect to Google OAuth API route
window.location.href = '/api/auth/google';
};
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Welcome Back</h1>
<p className="text-gray-600 mt-2">Sign in to your account</p>
<Link href="/" className="text-sm text-primary-600 hover:text-primary-700 font-medium mt-2 inline-block border border-primary-600 hover:border-primary-700 px-4 py-2 rounded-lg transition-colors">
Back to Home
</Link>
</div>
<Card>
<CardContent className="p-6">
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-50 text-red-600 p-3 rounded-lg text-sm">
{error}
</div>
)}
<Input
label="Email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="you@example.com"
required
/>
<Input
label="Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
required
/>
<div className="flex items-center justify-between">
<label className="flex items-center">
<input type="checkbox" className="mr-2" />
<span className="text-sm text-gray-600">Remember me</span>
</label>
<Link href="/forgot-password" className="text-sm text-primary-600 hover:text-primary-700">
Forgot password?
</Link>
</div>
<Button type="submit" className="w-full" loading={loading} disabled={csrfLoading || loading}>
{csrfLoading ? 'Loading...' : 'Sign In'}
</Button>
<div className="relative my-6">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-gray-300"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<Button
type="button"
variant="outline"
className="w-full"
onClick={handleGoogleSignIn}
>
<svg className="w-5 h-5 mr-2" viewBox="0 0 24 24">
<path
fill="#4285F4"
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
/>
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg>
Sign in with Google
</Button>
</form>
<div className="mt-6 text-center">
<p className="text-sm text-gray-600">
Don't have an account?{' '}
<Link href="/signup" className="text-primary-600 hover:text-primary-700 font-medium">
Sign up
</Link>
</p>
</div>
</CardContent>
</Card>
<p className="text-center text-sm text-gray-500 mt-6">
By signing in, you agree to our{' '}
<Link href="/privacy" className="text-primary-600 hover:text-primary-700">
Privacy Policy
</Link>
</p>
</div>
</div>
);
}

View File

@@ -1,218 +1,208 @@
'use client';
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { useSearchParams, useRouter } from 'next/navigation';
import { Card, CardContent } from '@/components/ui/Card';
import { Input } from '@/components/ui/Input';
import { Button } from '@/components/ui/Button';
import { useCsrf } from '@/hooks/useCsrf';
import { Suspense } from 'react';
function ResetPasswordContent() {
const { fetchWithCsrf, loading: csrfLoading } = useCsrf();
const searchParams = useSearchParams();
const router = useRouter();
const [token, setToken] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [loading, setLoading] = useState(false);
const [success, setSuccess] = useState(false);
const [error, setError] = useState('');
useEffect(() => {
const tokenParam = searchParams.get('token');
if (!tokenParam) {
setError('Invalid or missing reset token. Please request a new password reset link.');
} else {
setToken(tokenParam);
}
}, [searchParams]);
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setLoading(true);
setError('');
// Validate passwords match
if (password !== confirmPassword) {
setError('Passwords do not match');
setLoading(false);
return;
}
// Validate password length
if (password.length < 8) {
setError('Password must be at least 8 characters long');
setLoading(false);
return;
}
try {
const response = await fetchWithCsrf('/api/auth/reset-password', {
method: 'POST',
body: JSON.stringify({ token, password }),
});
const data = await response.json();
if (response.ok) {
setSuccess(true);
// Redirect to login after 3 seconds
setTimeout(() => {
router.push('/login');
}, 3000);
} else {
setError(data.error || 'Failed to reset password');
}
} catch (err) {
setError('An error occurred. Please try again.');
} finally {
setLoading(false);
}
};
if (success) {
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Password Reset Successful</h1>
<p className="text-gray-600 mt-2">Your password has been updated</p>
</div>
<Card>
<CardContent className="p-6">
<div className="text-center">
<div className="inline-flex items-center justify-center w-16 h-16 bg-green-100 rounded-full mb-4">
<svg className="w-8 h-8 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
</svg>
</div>
<p className="text-gray-700 mb-4">
Your password has been successfully reset!
</p>
<p className="text-sm text-gray-600 mb-6">
Redirecting you to the login page in 3 seconds...
</p>
<Link href="/login" className="block">
<Button variant="primary" className="w-full">
Go to Login
</Button>
</Link>
</div>
</CardContent>
</Card>
</div>
</div>
);
}
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Reset Your Password</h1>
<p className="text-gray-600 mt-2">Enter your new password below</p>
</div>
<Card>
<CardContent className="p-6">
{!token ? (
<div className="text-center">
<div className="inline-flex items-center justify-center w-16 h-16 bg-red-100 rounded-full mb-4">
<svg className="w-8 h-8 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
</svg>
</div>
<p className="text-red-600 mb-4">{error}</p>
<Link href="/forgot-password" className="block">
<Button variant="primary" className="w-full">
Request New Reset Link
</Button>
</Link>
</div>
) : (
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-50 text-red-600 p-3 rounded-lg text-sm">
{error}
</div>
)}
<Input
label="New Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="Enter new password"
required
disabled={loading || csrfLoading}
minLength={8}
/>
<Input
label="Confirm Password"
type="password"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
placeholder="Confirm new password"
required
disabled={loading || csrfLoading}
minLength={8}
/>
<div className="text-xs text-gray-500">
Password must be at least 8 characters long
</div>
<Button
type="submit"
className="w-full"
loading={loading}
disabled={csrfLoading || loading}
>
{csrfLoading ? 'Loading...' : 'Reset Password'}
</Button>
<div className="text-center">
<Link href="/login" className="text-sm text-primary-600 hover:text-primary-700 font-medium">
Back to Login
</Link>
</div>
</form>
)}
</CardContent>
</Card>
<p className="text-center text-sm text-gray-500 mt-6">
Remember your password?{' '}
<Link href="/login" className="text-primary-600 hover:text-primary-700 font-medium">
Sign in
</Link>
</p>
</div>
</div>
);
}
export default function ResetPasswordPage() {
return (
<Suspense fallback={<div className="min-h-screen flex items-center justify-center">Loading...</div>}>
<ResetPasswordContent />
</Suspense>
);
}
'use client';
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { useSearchParams, useRouter } from 'next/navigation';
import { Card, CardContent } from '@/components/ui/Card';
import { Input } from '@/components/ui/Input';
import { Button } from '@/components/ui/Button';
import { useCsrf } from '@/hooks/useCsrf';
export default function ResetPasswordPage() {
const { fetchWithCsrf, loading: csrfLoading } = useCsrf();
const searchParams = useSearchParams();
const router = useRouter();
const [token, setToken] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [loading, setLoading] = useState(false);
const [success, setSuccess] = useState(false);
const [error, setError] = useState('');
useEffect(() => {
const tokenParam = searchParams.get('token');
if (!tokenParam) {
setError('Invalid or missing reset token. Please request a new password reset link.');
} else {
setToken(tokenParam);
}
}, [searchParams]);
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setLoading(true);
setError('');
// Validate passwords match
if (password !== confirmPassword) {
setError('Passwords do not match');
setLoading(false);
return;
}
// Validate password length
if (password.length < 8) {
setError('Password must be at least 8 characters long');
setLoading(false);
return;
}
try {
const response = await fetchWithCsrf('/api/auth/reset-password', {
method: 'POST',
body: JSON.stringify({ token, password }),
});
const data = await response.json();
if (response.ok) {
setSuccess(true);
// Redirect to login after 3 seconds
setTimeout(() => {
router.push('/login');
}, 3000);
} else {
setError(data.error || 'Failed to reset password');
}
} catch (err) {
setError('An error occurred. Please try again.');
} finally {
setLoading(false);
}
};
if (success) {
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Password Reset Successful</h1>
<p className="text-gray-600 mt-2">Your password has been updated</p>
</div>
<Card>
<CardContent className="p-6">
<div className="text-center">
<div className="inline-flex items-center justify-center w-16 h-16 bg-green-100 rounded-full mb-4">
<svg className="w-8 h-8 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
</svg>
</div>
<p className="text-gray-700 mb-4">
Your password has been successfully reset!
</p>
<p className="text-sm text-gray-600 mb-6">
Redirecting you to the login page in 3 seconds...
</p>
<Link href="/login" className="block">
<Button variant="primary" className="w-full">
Go to Login
</Button>
</Link>
</div>
</CardContent>
</Card>
</div>
</div>
);
}
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Reset Your Password</h1>
<p className="text-gray-600 mt-2">Enter your new password below</p>
</div>
<Card>
<CardContent className="p-6">
{!token ? (
<div className="text-center">
<div className="inline-flex items-center justify-center w-16 h-16 bg-red-100 rounded-full mb-4">
<svg className="w-8 h-8 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
</svg>
</div>
<p className="text-red-600 mb-4">{error}</p>
<Link href="/forgot-password" className="block">
<Button variant="primary" className="w-full">
Request New Reset Link
</Button>
</Link>
</div>
) : (
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-50 text-red-600 p-3 rounded-lg text-sm">
{error}
</div>
)}
<Input
label="New Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="Enter new password"
required
disabled={loading || csrfLoading}
minLength={8}
/>
<Input
label="Confirm Password"
type="password"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
placeholder="Confirm new password"
required
disabled={loading || csrfLoading}
minLength={8}
/>
<div className="text-xs text-gray-500">
Password must be at least 8 characters long
</div>
<Button
type="submit"
className="w-full"
loading={loading}
disabled={csrfLoading || loading}
>
{csrfLoading ? 'Loading...' : 'Reset Password'}
</Button>
<div className="text-center">
<Link href="/login" className="text-sm text-primary-600 hover:text-primary-700 font-medium">
Back to Login
</Link>
</div>
</form>
)}
</CardContent>
</Card>
<p className="text-center text-sm text-gray-500 mt-6">
Remember your password?{' '}
<Link href="/login" className="text-primary-600 hover:text-primary-700 font-medium">
Sign in
</Link>
</p>
</div>
</div>
);
}

View File

@@ -1,185 +0,0 @@
'use client';
import React, { useState } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Input } from '@/components/ui/Input';
import { Button } from '@/components/ui/Button';
import { useTranslation } from '@/hooks/useTranslation';
import { useCsrf } from '@/hooks/useCsrf';
export default function SignupClientPage() {
const router = useRouter();
const { t } = useTranslation();
const { fetchWithCsrf } = useCsrf();
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [loading, setLoading] = useState(false);
const [error, setError] = useState('');
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setLoading(true);
setError('');
if (password !== confirmPassword) {
setError('Passwords do not match');
setLoading(false);
return;
}
if (password.length < 8) {
setError('Password must be at least 8 characters');
setLoading(false);
return;
}
try {
const response = await fetchWithCsrf('/api/auth/signup', {
method: 'POST',
body: JSON.stringify({ name, email, password }),
});
const data = await response.json();
if (response.ok && data.success) {
// Store user in localStorage for client-side
localStorage.setItem('user', JSON.stringify(data.user));
// Track successful signup with PostHog
try {
const { identifyUser, trackEvent } = await import('@/components/PostHogProvider');
identifyUser(data.user.id, {
email: data.user.email,
name: data.user.name,
plan: data.user.plan || 'FREE',
signupMethod: 'email',
});
trackEvent('user_signup', {
method: 'email',
email: data.user.email,
});
} catch (error) {
console.error('PostHog tracking error:', error);
}
// Redirect to dashboard
router.push('/dashboard');
router.refresh();
} else {
setError(data.error || 'Failed to create account');
}
} catch (err) {
setError('An error occurred. Please try again.');
} finally {
setLoading(false);
}
};
const handleGoogleSignIn = () => {
// Redirect to Google OAuth API route
window.location.href = '/api/auth/google';
};
return (
<Card>
<CardContent className="p-6">
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-50 text-red-600 p-3 rounded-lg text-sm">
{error}
</div>
)}
<Input
label="Full Name"
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="John Doe"
required
/>
<Input
label="Email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="you@example.com"
required
/>
<Input
label="Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
required
/>
<Input
label="Confirm Password"
type="password"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
placeholder="••••••••"
required
/>
<Button type="submit" className="w-full" loading={loading}>
Create Account
</Button>
<div className="relative my-6">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-gray-300"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<Button
type="button"
variant="outline"
className="w-full"
onClick={handleGoogleSignIn}
>
<svg className="w-5 h-5 mr-2" viewBox="0 0 24 24">
<path
fill="#4285F4"
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
/>
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg>
Sign up with Google
</Button>
</form>
<div className="mt-6 text-center">
<p className="text-sm text-gray-600">
Already have an account?{' '}
<Link href="/login" className="text-primary-600 hover:text-primary-700 font-medium">
Sign in
</Link>
</p>
</div>
</CardContent>
</Card>
);
}

View File

@@ -1,69 +1,208 @@
import React, { Suspense } from 'react';
import type { Metadata } from 'next';
import Link from 'next/link';
import SignupClientPage from './ClientPage';
export const metadata: Metadata = {
title: {
absolute: 'Create Free Account | QR Master'
},
description: 'Sign up for QR Master to create free QR codes. Start with tracking, customization, and bulk generation features.',
alternates: {
canonical: 'https://www.qrmaster.net/signup',
},
openGraph: {
title: 'Create Free Account | QR Master',
description: 'Sign up for QR Master to create free QR codes with tracking and customization.',
url: 'https://www.qrmaster.net/signup',
type: 'website',
images: [{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master Sign Up',
}],
},
twitter: {
card: 'summary_large_image',
title: 'Create Free Account | QR Master',
description: 'Sign up for QR Master to create free QR codes with tracking and customization.',
images: ['https://www.qrmaster.net/og-image.png'],
},
};
export default function SignupPage() {
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Create Account</h1>
<p className="text-gray-600 mt-2">Start creating QR codes in seconds</p>
<Link href="/" className="text-sm text-primary-600 hover:text-primary-700 font-medium mt-2 inline-block border border-primary-600 hover:border-primary-700 px-4 py-2 rounded-lg transition-colors">
Back to Home
</Link>
</div>
<Suspense fallback={
<div className="bg-white rounded-xl shadow-sm border border-slate-200 p-8 flex items-center justify-center min-h-[500px]">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"></div>
</div>
}>
<SignupClientPage />
</Suspense>
<p className="text-center text-sm text-gray-500 mt-6">
By signing up, you agree to our{' '}
<Link href="/privacy" className="text-primary-600 hover:text-primary-700">
Privacy Policy
</Link>
</p>
</div>
</div>
);
'use client';
import React, { useState } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Input } from '@/components/ui/Input';
import { Button } from '@/components/ui/Button';
import { useTranslation } from '@/hooks/useTranslation';
import { useCsrf } from '@/hooks/useCsrf';
export default function SignupPage() {
const router = useRouter();
const { t } = useTranslation();
const { fetchWithCsrf } = useCsrf();
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [loading, setLoading] = useState(false);
const [error, setError] = useState('');
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setLoading(true);
setError('');
if (password !== confirmPassword) {
setError('Passwords do not match');
setLoading(false);
return;
}
if (password.length < 8) {
setError('Password must be at least 8 characters');
setLoading(false);
return;
}
try {
const response = await fetchWithCsrf('/api/auth/signup', {
method: 'POST',
body: JSON.stringify({ name, email, password }),
});
const data = await response.json();
if (response.ok && data.success) {
// Store user in localStorage for client-side
localStorage.setItem('user', JSON.stringify(data.user));
// Track successful signup with PostHog
try {
const { identifyUser, trackEvent } = await import('@/components/PostHogProvider');
identifyUser(data.user.id, {
email: data.user.email,
name: data.user.name,
plan: data.user.plan || 'FREE',
signupMethod: 'email',
});
trackEvent('user_signup', {
method: 'email',
email: data.user.email,
});
} catch (error) {
console.error('PostHog tracking error:', error);
}
// Redirect to dashboard
router.push('/dashboard');
router.refresh();
} else {
setError(data.error || 'Failed to create account');
}
} catch (err) {
setError('An error occurred. Please try again.');
} finally {
setLoading(false);
}
};
const handleGoogleSignIn = () => {
// Redirect to Google OAuth API route
window.location.href = '/api/auth/google';
};
return (
<div className="min-h-screen bg-gradient-to-br from-primary-50 to-white flex items-center justify-center p-4">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<Link href="/" className="inline-flex items-center space-x-2 mb-6">
<img src="/logo.svg" alt="QR Master" className="w-10 h-10" />
<span className="text-2xl font-bold text-gray-900">QR Master</span>
</Link>
<h1 className="text-3xl font-bold text-gray-900">Create Account</h1>
<p className="text-gray-600 mt-2">Start creating QR codes in seconds</p>
<Link href="/" className="text-sm text-primary-600 hover:text-primary-700 font-medium mt-2 inline-block border border-primary-600 hover:border-primary-700 px-4 py-2 rounded-lg transition-colors">
Back to Home
</Link>
</div>
<Card>
<CardContent className="p-6">
<form onSubmit={handleSubmit} className="space-y-4">
{error && (
<div className="bg-red-50 text-red-600 p-3 rounded-lg text-sm">
{error}
</div>
)}
<Input
label="Full Name"
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="John Doe"
required
/>
<Input
label="Email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="you@example.com"
required
/>
<Input
label="Password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
required
/>
<Input
label="Confirm Password"
type="password"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
placeholder="••••••••"
required
/>
<Button type="submit" className="w-full" loading={loading}>
Create Account
</Button>
<div className="relative my-6">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-gray-300"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<Button
type="button"
variant="outline"
className="w-full"
onClick={handleGoogleSignIn}
>
<svg className="w-5 h-5 mr-2" viewBox="0 0 24 24">
<path
fill="#4285F4"
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
/>
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg>
Sign up with Google
</Button>
</form>
<div className="mt-6 text-center">
<p className="text-sm text-gray-600">
Already have an account?{' '}
<Link href="/login" className="text-primary-600 hover:text-primary-700 font-medium">
Sign in
</Link>
</p>
</div>
</CardContent>
</Card>
<p className="text-center text-sm text-gray-500 mt-6">
By signing up, you agree to our{' '}
<Link href="/privacy" className="text-primary-600 hover:text-primary-700">
Privacy Policy
</Link>
</p>
</div>
</div>
);
}

View File

@@ -1,287 +0,0 @@
'use client';
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { Button } from '@/components/ui/Button';
import { Footer } from '@/components/ui/Footer';
import en from '@/i18n/en.json';
import { ChevronDown, Wifi, Contact, MessageCircle, QrCode, Link2, Type, Mail, MessageSquare, Phone, Calendar, MapPin, Facebook, Instagram, Twitter, Youtube, Music, Bitcoin, CreditCard, Video, Users } from 'lucide-react';
import { cn } from '@/lib/utils';
import { AnimatePresence, motion } from 'framer-motion';
export default function MarketingLayout({
children,
}: {
children: React.ReactNode;
}) {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const [scrolled, setScrolled] = useState(false);
const [toolsOpen, setToolsOpen] = useState(false);
const [mobileToolsOpen, setMobileToolsOpen] = useState(false);
const pathname = usePathname();
useEffect(() => {
const handleScroll = () => {
setScrolled(window.scrollY > 20);
};
// Check immediately on mount
handleScroll();
window.addEventListener('scroll', handleScroll, { passive: true });
return () => window.removeEventListener('scroll', handleScroll);
}, []);
// Close simple menus when path changes
useEffect(() => {
setMobileMenuOpen(false);
setToolsOpen(false);
}, [pathname]);
// Default to English for general marketing pages
const t = en;
const tools = [
{ name: 'URL / Link', description: 'Link to any website', href: '/tools/url-qr-code', icon: Link2, color: 'text-blue-500', bgColor: 'bg-blue-50' },
{ name: 'Text', description: 'Plain text message', href: '/tools/text-qr-code', icon: Type, color: 'text-slate-500', bgColor: 'bg-slate-50' },
{ name: 'WiFi', description: 'Share WiFi credentials', href: '/tools/wifi-qr-code', icon: Wifi, color: 'text-indigo-500', bgColor: 'bg-indigo-50' },
{ name: 'VCard', description: 'Digital business card', href: '/tools/vcard-qr-code', icon: Contact, color: 'text-pink-500', bgColor: 'bg-pink-50' },
{ name: 'WhatsApp', description: 'Start a chat', href: '/tools/whatsapp-qr-code', icon: MessageCircle, color: 'text-green-500', bgColor: 'bg-green-50' },
{ name: 'Email', description: 'Compose an email', href: '/tools/email-qr-code', icon: Mail, color: 'text-amber-500', bgColor: 'bg-amber-50' },
{ name: 'SMS', description: 'Send a text message', href: '/tools/sms-qr-code', icon: MessageSquare, color: 'text-cyan-500', bgColor: 'bg-cyan-50' },
{ name: 'Phone', description: 'Start a call', href: '/tools/phone-qr-code', icon: Phone, color: 'text-violet-500', bgColor: 'bg-violet-50' },
{ name: 'Event', description: 'Add calendar event', href: '/tools/event-qr-code', icon: Calendar, color: 'text-red-500', bgColor: 'bg-red-50' },
{ name: 'Location', description: 'Share a place', href: '/tools/geolocation-qr-code', icon: MapPin, color: 'text-emerald-500', bgColor: 'bg-emerald-50' },
{ name: 'Facebook', description: 'Facebook profile/page', href: '/tools/facebook-qr-code', icon: Facebook, color: 'text-blue-600', bgColor: 'bg-blue-50' },
{ name: 'Instagram', description: 'Instagram profile', href: '/tools/instagram-qr-code', icon: Instagram, color: 'text-pink-600', bgColor: 'bg-pink-50' },
{ name: 'Twitter / X', description: 'Twitter profile', href: '/tools/twitter-qr-code', icon: Twitter, color: 'text-sky-500', bgColor: 'bg-sky-50' },
{ name: 'YouTube', description: 'YouTube video/channel', href: '/tools/youtube-qr-code', icon: Youtube, color: 'text-red-600', bgColor: 'bg-red-50' },
{ name: 'TikTok', description: 'TikTok profile', href: '/tools/tiktok-qr-code', icon: Music, color: 'text-slate-800', bgColor: 'bg-slate-100' },
{ name: 'Crypto', description: 'Share wallet address', href: '/tools/crypto-qr-code', icon: Bitcoin, color: 'text-orange-500', bgColor: 'bg-orange-50' },
{ name: 'PayPal', description: 'Receive payments', href: '/tools/paypal-qr-code', icon: CreditCard, color: 'text-blue-700', bgColor: 'bg-blue-50' },
{ name: 'Zoom', description: 'Join Zoom meeting', href: '/tools/zoom-qr-code', icon: Video, color: 'text-sky-500', bgColor: 'bg-sky-50' },
{ name: 'Teams', description: 'Join Teams meeting', href: '/tools/teams-qr-code', icon: Users, color: 'text-violet-500', bgColor: 'bg-violet-50' },
];
return (
<div className="min-h-screen bg-white">
{/* Server-rendered navigation links for SEO (crawlers) - Placed first for priority */}
<div className="sr-only" aria-hidden="false">
<nav aria-label="Site Map">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/pricing">Pricing</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/faq">FAQ</a></li>
<li><a href="/login">Login</a></li>
<li><a href="/signup">Sign Up</a></li>
{/* Tools */}
<li><a href="/tools/url-qr-code">URL QR Code</a></li>
<li><a href="/tools/text-qr-code">Text QR Code</a></li>
<li><a href="/tools/wifi-qr-code">WiFi QR Code</a></li>
<li><a href="/tools/vcard-qr-code">vCard QR Code</a></li>
<li><a href="/tools/whatsapp-qr-code">WhatsApp QR Code</a></li>
<li><a href="/tools/email-qr-code">Email QR Code</a></li>
<li><a href="/tools/sms-qr-code">SMS QR Code</a></li>
<li><a href="/tools/phone-qr-code">Phone QR Code</a></li>
<li><a href="/tools/event-qr-code">Event QR Code</a></li>
<li><a href="/tools/geolocation-qr-code">Location QR Code</a></li>
<li><a href="/tools/facebook-qr-code">Facebook QR Code</a></li>
<li><a href="/tools/instagram-qr-code">Instagram QR Code</a></li>
<li><a href="/tools/twitter-qr-code">Twitter QR Code</a></li>
<li><a href="/tools/youtube-qr-code">YouTube QR Code</a></li>
<li><a href="/tools/tiktok-qr-code">TikTok QR Code</a></li>
<li><a href="/tools/crypto-qr-code">Crypto QR Code</a></li>
<li><a href="/tools/paypal-qr-code">PayPal QR Code</a></li>
<li><a href="/tools/zoom-qr-code">Zoom QR Code</a></li>
<li><a href="/tools/teams-qr-code">Teams QR Code</a></li>
</ul>
</nav>
</div>
{/* Header */}
<header
className="fixed top-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-md border-b border-slate-200 shadow-sm"
>
<nav className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl h-20 flex items-center justify-between">
{/* Logo */}
<Link href="/" className="flex items-center space-x-2.5 group">
<div className="relative w-9 h-9 flex items-center justify-center bg-indigo-600 rounded-lg shadow-indigo-200 shadow-lg group-hover:scale-105 transition-transform duration-200">
<QrCode className="w-5 h-5 text-white" />
</div>
<span className="text-xl font-bold text-slate-900 tracking-tight group-hover:text-indigo-600 transition-colors">QR Master</span>
</Link>
{/* Desktop Navigation */}
<div className="hidden md:flex items-center space-x-1">
{/* Tools Dropdown */}
<div
className="relative group px-3 py-2"
onMouseEnter={() => setToolsOpen(true)}
onMouseLeave={() => setToolsOpen(false)}
>
<button className="flex items-center space-x-1 text-sm font-medium text-slate-600 group-hover:text-slate-900 transition-colors">
<span>{t.nav.tools}</span>
<ChevronDown className={cn("w-4 h-4 transition-transform duration-200", toolsOpen && "rotate-180")} />
</button>
<AnimatePresence>
{toolsOpen && (
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 10 }}
transition={{ duration: 0.15 }}
className="absolute left-1/2 -translate-x-1/2 top-full mt-2 w-[750px] bg-white rounded-2xl shadow-lg border border-slate-100 p-4 overflow-hidden"
>
<div className="grid grid-cols-3 gap-1">
{tools.map((tool) => (
<Link
key={tool.name}
href={tool.href}
className="flex items-center space-x-3 p-2.5 rounded-xl transition-colors hover:bg-slate-50"
>
<div className={cn("p-2 rounded-lg shrink-0", tool.bgColor, tool.color)}>
<tool.icon className="w-4 h-4" />
</div>
<div>
<div className="text-sm font-semibold text-slate-900">{tool.name}</div>
<p className="text-xs text-slate-500 leading-snug">{tool.description}</p>
</div>
</Link>
))}
</div>
<div className="mt-3 pt-3 border-t border-slate-100 -mx-4 -mb-4 px-4 py-3 text-center bg-slate-50/50">
<p className="text-xs text-slate-500 font-medium">{t.nav.all_free}</p>
</div>
</motion.div>
)}
</AnimatePresence>
</div>
<Link href="/#features" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.features}
</Link>
<Link href="/#pricing" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.pricing}
</Link>
<Link href="/blog" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.blog}
</Link>
<Link href="/#faq" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.faq}
</Link>
</div>
<div className="hidden md:flex items-center space-x-4">
<Link href="/login" className="text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.login}
</Link>
<Link href="/signup">
<Button className={cn(
"font-semibold shadow-lg shadow-indigo-500/20 transition-all hover:scale-105",
scrolled ? "bg-blue-600 text-white hover:bg-blue-700" : "bg-blue-600 text-white hover:bg-blue-700"
)}>
{t.nav.cta || "Get Started Free"}
</Button>
</Link>
</div>
{/* Mobile Menu Button - Always dark */}
<button
className="md:hidden p-2 text-slate-900"
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
aria-label="Toggle menu"
>
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
{mobileMenuOpen ? (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
) : (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
)}
</svg>
</button>
</nav>
{/* Mobile Menu */}
<AnimatePresence>
{mobileMenuOpen && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
className="md:hidden bg-white border-b border-slate-100 overflow-hidden"
>
<div className="container mx-auto px-4 py-6 space-y-2">
{/* Free Tools Accordion */}
<button
onClick={() => setMobileToolsOpen(!mobileToolsOpen)}
className="flex items-center justify-between w-full px-4 py-3 rounded-xl hover:bg-slate-50 text-slate-700 font-semibold"
>
<span>{t.nav.tools}</span>
<ChevronDown className={cn("w-5 h-5 transition-transform", mobileToolsOpen && "rotate-180")} />
</button>
<AnimatePresence>
{mobileToolsOpen && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
className="overflow-hidden"
>
<div className="max-h-[50vh] overflow-y-auto pl-4 space-y-1 border-l-2 border-slate-100 ml-4">
{tools.map((tool) => (
<Link
key={tool.name}
href={tool.href}
className="flex items-center gap-3 px-4 py-2.5 rounded-lg hover:bg-slate-50 text-slate-600 text-sm"
onClick={() => { setMobileMenuOpen(false); setMobileToolsOpen(false); }}
>
<tool.icon className={cn("w-4 h-4", tool.color)} />
{tool.name}
</Link>
))}
</div>
</motion.div>
)}
</AnimatePresence>
<div className="h-px bg-slate-100 my-2"></div>
<Link href="/#features" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.features}</Link>
<Link href="/#pricing" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.pricing}</Link>
<Link href="/blog" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.blog}</Link>
<Link href="/#faq" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.faq}</Link>
<div className="grid grid-cols-2 gap-4 pt-4">
<Link href="/login" onClick={() => setMobileMenuOpen(false)}>
<Button variant="outline" className="w-full justify-center">{t.nav.login}</Button>
</Link>
<Link href="/signup" onClick={() => setMobileMenuOpen(false)}>
<Button className="w-full justify-center bg-indigo-600 hover:bg-indigo-700">{t.nav.cta}</Button>
</Link>
</div>
</div>
</motion.div>
)}
</AnimatePresence>
</header>
{/* Main Content */}
<main className="pt-20">
{/* Server-rendered navigation links for SEO (crawlers) */}
{children}
</main>
{/* Footer */}
<Footer t={t} />
</div >
);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,118 +1,182 @@
import React from 'react';
import type { Metadata } from 'next';
import Link from 'next/link';
import Image from 'next/image';
import SeoJsonLd from '@/components/SeoJsonLd';
import { websiteSchema, breadcrumbSchema } from '@/lib/schema';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Badge } from '@/components/ui/Badge';
import Breadcrumbs, { BreadcrumbItem } from '@/components/Breadcrumbs';
import { blogPostList } from '@/lib/blog-data';
function truncateAtWord(text: string, maxLength: number): string {
if (text.length <= maxLength) return text;
const truncated = text.slice(0, maxLength);
const lastSpace = truncated.lastIndexOf(' ');
return lastSpace > 0 ? truncated.slice(0, lastSpace) : truncated;
}
export async function generateMetadata(): Promise<Metadata> {
const title = truncateAtWord('QR Insights: Latest QR Strategies', 60);
const description = truncateAtWord(
'Expert guides on QR code analytics, dynamic vs static codes, bulk generation, and smart marketing use cases. Learn how to maximize your QR campaign ROI.',
160
);
return {
title,
description,
alternates: {
canonical: 'https://www.qrmaster.net/blog',
languages: {
'x-default': 'https://www.qrmaster.net/blog',
en: 'https://www.qrmaster.net/blog',
},
},
openGraph: {
title,
description,
url: 'https://www.qrmaster.net/blog',
type: 'website',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Insights - QR Code Marketing & Analytics Blog',
},
],
},
twitter: {
title,
description,
},
};
}
export default function BlogPage() {
const breadcrumbItems: BreadcrumbItem[] = [
{ name: 'Home', url: '/' },
{ name: 'Blog', url: '/blog' },
];
return (
<>
<SeoJsonLd data={[websiteSchema(), breadcrumbSchema(breadcrumbItems)]} />
<div className="py-20 bg-gradient-to-b from-gray-50 to-white">
<div className="container mx-auto px-4">
<Breadcrumbs items={breadcrumbItems} />
<div className="text-center mb-16">
<h1 className="text-4xl lg:text-5xl font-bold text-gray-900 mb-6">
QR Code Insights
</h1>
<p className="text-xl text-gray-600 max-w-2xl mx-auto">
Expert guides on dynamic QR codes, campaign tracking, UTM analytics, and smart marketing use cases.
Discover how-to tutorials and best practices for QR code analytics.
</p>
</div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8 max-w-6xl mx-auto">
{blogPostList.map((post: any) => (
<Link key={post.slug} href={post.link || `/blog/${post.slug}`}>
<Card hover className="h-full overflow-hidden shadow-md hover:shadow-xl transition-all duration-300">
<div className="relative h-56 overflow-hidden">
<Image
src={post.image}
alt={`${post.title} - QR code guide showing ${post.category.toLowerCase()} strategies`}
width={800}
height={600}
className="w-full h-full object-cover transition-transform duration-500 hover:scale-110"
/>
</div>
<CardHeader className="pb-3">
<div className="flex items-center justify-between mb-3">
<Badge variant="info">{post.category}</Badge>
<span className="text-sm text-gray-500 font-medium">{post.readTime} read</span>
</div>
<CardTitle className="text-xl leading-tight mb-3">{post.title}</CardTitle>
</CardHeader>
<CardContent className="pt-0">
<p className="text-gray-600 mb-4 leading-relaxed">{post.excerpt}</p>
<div className="flex items-center justify-between pt-4 border-t border-gray-100">
<p className="text-sm text-gray-500">{post.date}</p>
<span className="text-primary-600 text-sm font-medium">
{post.link ? 'Try Now →' : 'Read Article →'}
</span>
</div>
</CardContent>
</Card>
</Link>
))}
</div>
</div>
</div>
</>
);
}
import React from 'react';
import type { Metadata } from 'next';
import Link from 'next/link';
import Image from 'next/image';
import SeoJsonLd from '@/components/SeoJsonLd';
import { websiteSchema, breadcrumbSchema } from '@/lib/schema';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card';
import { Badge } from '@/components/ui/Badge';
import Breadcrumbs, { BreadcrumbItem } from '@/components/Breadcrumbs';
function truncateAtWord(text: string, maxLength: number): string {
if (text.length <= maxLength) return text;
const truncated = text.slice(0, maxLength);
const lastSpace = truncated.lastIndexOf(' ');
return lastSpace > 0 ? truncated.slice(0, lastSpace) : truncated;
}
export async function generateMetadata(): Promise<Metadata> {
const title = truncateAtWord('QR Insights: Latest QR Strategies', 60);
const description = truncateAtWord(
'Expert guides on QR analytics, dynamic codes & smart marketing uses.',
160
);
return {
title,
description,
alternates: {
canonical: 'https://www.qrmaster.net/blog',
languages: {
'x-default': 'https://www.qrmaster.net/blog',
en: 'https://www.qrmaster.net/blog',
},
},
openGraph: {
title,
description,
url: 'https://www.qrmaster.net/blog',
type: 'website',
},
twitter: {
title,
description,
},
};
}
const blogPosts = [
// NEW POSTS (January 2026)
{
slug: 'qr-code-restaurant-menu',
title: 'How to Create a QR Code for Restaurant Menu',
excerpt: 'Step-by-step guide to creating digital menu QR codes for your restaurant. Learn best practices for touchless menus, placement tips, and tracking.',
date: 'January 5, 2026',
readTime: '12 Min',
category: 'Restaurant',
image: '/blog/restaurant-qr-menu.png',
},
{
slug: 'vcard-qr-code-generator',
title: 'Free vCard QR Code Generator: Digital Business Cards',
excerpt: 'Create professional vCard QR codes for digital business cards. Share contact info instantly with a scan—includes templates and best practices.',
date: 'January 5, 2026',
readTime: '10 Min',
category: 'Business Cards',
image: '/blog/vcard-qr-code.png',
},
{
slug: 'qr-code-small-business',
title: 'Best QR Code Generator for Small Business: 2025 Guide',
excerpt: 'Find the best QR code solution for your small business. Compare features, pricing, and use cases for marketing, payments, and operations.',
date: 'January 5, 2026',
readTime: '14 Min',
category: 'Business',
image: '/blog/small-business-qr.png',
},
{
slug: 'qr-code-print-size-guide',
title: 'QR Code Print Size Guide: Minimum Sizes for Every Use Case',
excerpt: 'Complete guide to QR code print sizes. Learn minimum dimensions for business cards, posters, banners, and more to ensure reliable scanning.',
date: 'January 5, 2026',
readTime: '8 Min',
category: 'Printing',
image: '/blog/qr-print-sizes.png',
},
// EXISTING POSTS
{
slug: 'qr-code-tracking-guide-2025',
title: 'QR Code Tracking: Complete Guide 2025',
excerpt: 'Learn how to track QR code scans with real-time analytics. Compare free vs paid tracking tools, setup Google Analytics, and measure ROI.',
date: 'October 18, 2025',
readTime: '12 Min',
category: 'Tracking & Analytics',
image: '/blog/1-hero.png',
},
{
slug: 'dynamic-vs-static-qr-codes',
title: 'Dynamic vs Static QR Codes: Which Should You Use?',
excerpt: 'Understand the difference between static and dynamic QR codes. Learn when to use each type, pros/cons, and how dynamic QR codes save money.',
date: 'October 17, 2025',
readTime: '10 Min',
category: 'QR Code Basics',
image: '/blog/2-hero.png',
},
{
slug: 'bulk-qr-code-generator-excel',
title: 'How to Generate Bulk QR Codes from Excel',
excerpt: 'Generate hundreds of QR codes from Excel or CSV files in minutes. Step-by-step guide with templates, best practices, and free tools.',
date: 'October 16, 2025',
readTime: '13 Min',
category: 'Bulk Generation',
image: '/blog/3-hero.png',
},
{
slug: 'qr-code-analytics',
title: 'QR Code Analytics: Track, Measure & Optimize Campaigns',
excerpt: 'Learn how to leverage scan analytics, campaign tracking, and dashboard insights to maximize QR code ROI.',
date: 'October 16, 2025',
readTime: '15 Min',
category: 'Analytics',
image: '/blog/4-hero.png',
},
];
export default function BlogPage() {
const breadcrumbItems: BreadcrumbItem[] = [
{ name: 'Home', url: '/' },
{ name: 'Blog', url: '/blog' },
];
return (
<>
<SeoJsonLd data={[websiteSchema(), breadcrumbSchema(breadcrumbItems)]} />
<div className="py-20 bg-gradient-to-b from-gray-50 to-white">
<div className="container mx-auto px-4">
<Breadcrumbs items={breadcrumbItems} />
<div className="text-center mb-16">
<h1 className="text-4xl lg:text-5xl font-bold text-gray-900 mb-6">
QR Code Insights
</h1>
<p className="text-xl text-gray-600 max-w-2xl mx-auto">
Expert guides on dynamic QR codes, campaign tracking, UTM analytics, and smart marketing use cases.
Discover how-to tutorials and best practices for QR code analytics.
</p>
</div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8 max-w-6xl mx-auto">
{blogPosts.map((post) => (
<Link key={post.slug} href={`/blog/${post.slug}`}>
<Card hover className="h-full overflow-hidden shadow-md hover:shadow-xl transition-all duration-300">
<div className="relative h-56 overflow-hidden">
<Image
src={post.image}
alt={`${post.title} - QR code guide showing ${post.category.toLowerCase()} strategies`}
width={800}
height={600}
className="w-full h-full object-cover transition-transform duration-500 hover:scale-110"
/>
</div>
<CardHeader className="pb-3">
<div className="flex items-center justify-between mb-3">
<Badge variant="info">{post.category}</Badge>
<span className="text-sm text-gray-500 font-medium">{post.readTime} read</span>
</div>
<CardTitle className="text-xl leading-tight mb-3">{post.title}</CardTitle>
</CardHeader>
<CardContent className="pt-0">
<p className="text-gray-600 mb-4 leading-relaxed">{post.excerpt}</p>
<div className="flex items-center justify-between pt-4 border-t border-gray-100">
<p className="text-sm text-gray-500">{post.date}</p>
<span className="text-primary-600 text-sm font-medium">Read more </span>
</div>
</CardContent>
</Card>
</Link>
))}
</div>
</div>
</div>
</>
);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +0,0 @@
'use client';
import React from 'react';
import { ObfuscatedMailto } from '@/components/ui/ObfuscatedMailto';
export function ContactSupport() {
return (
<div className="mt-16 bg-blue-50 border-l-4 border-blue-500 p-8 rounded-r-lg">
<h2 className="text-2xl font-bold mb-4 text-gray-900">
Still have questions?
</h2>
<p className="text-lg text-gray-700 mb-6 leading-relaxed">
Our support team is here to help. Contact us at{' '}
<ObfuscatedMailto
email="support@qrmaster.net"
className="text-blue-600 hover:text-blue-700 font-semibold"
/>{' '}
or reach out through our live chat.
</p>
</div>
);
}

View File

@@ -1,141 +1,143 @@
import React from 'react';
import type { Metadata } from 'next';
import SeoJsonLd from '@/components/SeoJsonLd';
import { faqPageSchema } from '@/lib/schema';
import { Card, CardContent } from '@/components/ui/Card';
import { ContactSupport } from './ContactSupport';
function truncateAtWord(text: string, maxLength: number): string {
if (text.length <= maxLength) return text;
const truncated = text.slice(0, maxLength);
const lastSpace = truncated.lastIndexOf(' ');
return lastSpace > 0 ? truncated.slice(0, lastSpace) : truncated;
}
export async function generateMetadata(): Promise<Metadata> {
const title = truncateAtWord('QR Master FAQ: Dynamic & Bulk QR', 60);
const description = truncateAtWord(
'Find answers about dynamic QR codes, scan tracking, security, bulk generation, and event QR codes. Everything you need to know about QR Master features.',
160
);
return {
title,
description,
alternates: {
canonical: 'https://www.qrmaster.net/faq',
languages: {
'x-default': 'https://www.qrmaster.net/faq',
en: 'https://www.qrmaster.net/faq',
},
},
openGraph: {
title,
description,
url: 'https://www.qrmaster.net/faq',
type: 'website',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master FAQ',
},
],
},
twitter: {
title,
description,
},
};
}
const faqs = [
{
question: 'What is a dynamic QR code?',
answer: 'A dynamic QR code allows you to change the destination URL after the code has been created and printed. Unlike static QR codes, dynamic codes redirect through a short URL that you control, enabling real-time updates, scan analytics, and campaign tracking without reprinting the code.',
},
{
question: 'How do I track QR scans?',
answer: 'QR Master provides a comprehensive analytics dashboard that tracks every scan in real-time. You can monitor scan rates, geographic locations, device types, timestamps, and user behavior. Enable UTM parameters to integrate with Google Analytics for advanced campaign tracking and conversion attribution.',
},
{
question: 'What security features does QR Master offer?',
answer: 'QR Master employs enterprise-grade security including SSL encryption, link validation to prevent malicious redirects, fraud detection, and GDPR-compliant data handling. All scan analytics are stored securely and access is protected with multi-factor authentication for business accounts.',
},
{
question: 'Can I generate bulk QR codes for print?',
answer: 'Yes. Our bulk QR generation tool allows you to create thousands of QR codes at once by uploading a CSV file. Each code can be customized with unique URLs, UTM parameters, and branding. Download print-ready files in SVG, PNG, or PDF formats optimized for high-resolution printing.',
},
{
question: 'How do I brand my QR codes?',
answer: 'QR Master offers customization options including custom colors, corner styles, and pattern designs. Branded QR codes maintain scannability while matching your brand identity. Choose your color palette and preview designs before downloading.',
},
{
question: 'Is scan analytics GDPR compliant?',
answer: 'Yes. All QR Master analytics are fully GDPR compliant. We collect only necessary data, provide transparent privacy policies, allow users to opt out, and store data securely in EU-compliant data centers. You maintain full control over data retention and deletion.',
},
{
question: 'Can QR Master track campaigns with UTM?',
answer: 'Absolutely. QR Master supports UTM parameter integration for all dynamic QR codes. Automatically append source, medium, campaign, term, and content parameters to track QR performance in Google Analytics, Adobe Analytics, and other marketing platforms. UTM tracking enables multi-channel attribution and ROI measurement.',
},
{
question: 'Difference between static and dynamic QR codes?',
answer: 'Static QR codes encode the destination URL directly in the code pattern and cannot be changed after creation. Dynamic QR codes use a short redirect URL, allowing you to update destinations, track scans, enable/disable codes, and gather analytics—all without reprinting. Dynamic codes are essential for professional marketing campaigns.',
},
{
question: 'How are QR codes used for events?',
answer: 'QR codes streamline event check-ins, ticket validation, attendee tracking, and engagement measurement. Generate unique codes for each ticket, track scan times and locations, enable contactless entry, and analyze attendee behavior. Event organizers use QR analytics to measure session popularity and optimize future events.',
},
{
question: 'Can I make QR codes for business cards?',
answer: 'Yes. QR codes on business cards provide instant contact sharing via vCard format, link to your portfolio or LinkedIn profile, and track networking effectiveness. Use branded QR codes that match your card design, and leverage scan analytics to see how many contacts engage and when they follow up.',
},
{
question: 'How do I use QR codes for bulk marketing?',
answer: 'Bulk QR codes enable scalable campaigns across print ads, packaging, direct mail, and retail displays. Generate thousands of codes with unique tracking URLs, distribute them across channels, and use analytics to measure which placements drive the highest engagement. Bulk generation supports CSV upload, API integration, and automated workflows.',
},
{
question: 'Is API access available for bulk QR generation?',
answer: 'Yes. QR Master offers a developer-friendly REST API for programmatic QR code generation, URL management, and analytics retrieval. Integrate QR creation into your CRM, marketing automation platform, or e-commerce system. API access is included in Business plans and supports bulk operations, webhooks, and real-time updates.',
},
];
export default function FAQPage() {
return (
<>
<SeoJsonLd data={faqPageSchema(faqs)} />
<div className="py-20 bg-gradient-to-b from-gray-50 to-white">
<div className="container mx-auto px-4">
<div className="max-w-4xl mx-auto">
<div className="text-center mb-16">
<h1 className="text-4xl lg:text-5xl font-bold text-gray-900 mb-6">
Frequently Asked Questions
</h1>
<p className="text-xl text-gray-600">
Everything you need to know about dynamic QR codes, security, analytics, bulk generation, events, and print quality.
</p>
</div>
<div className="space-y-6">
{faqs.map((faq, index) => (
<Card key={index} className="border-l-4 border-blue-500">
<CardContent className="p-8">
<h2 className="text-2xl font-semibold mb-4 text-gray-900">
{faq.question}
</h2>
<p className="text-lg text-gray-700 leading-relaxed">
{faq.answer}
</p>
</CardContent>
</Card>
))}
</div>
<ContactSupport />
</div>
</div>
</div>
</>
);
}
import React from 'react';
import type { Metadata } from 'next';
import SeoJsonLd from '@/components/SeoJsonLd';
import { faqPageSchema } from '@/lib/schema';
import { Card, CardContent } from '@/components/ui/Card';
function truncateAtWord(text: string, maxLength: number): string {
if (text.length <= maxLength) return text;
const truncated = text.slice(0, maxLength);
const lastSpace = truncated.lastIndexOf(' ');
return lastSpace > 0 ? truncated.slice(0, lastSpace) : truncated;
}
export async function generateMetadata(): Promise<Metadata> {
const title = truncateAtWord('QR Master FAQ: Dynamic & Bulk QR', 60);
const description = truncateAtWord(
'All answers: dynamic QR, security, analytics, bulk, events & print.',
160
);
return {
title,
description,
alternates: {
canonical: 'https://www.qrmaster.net/faq',
languages: {
'x-default': 'https://www.qrmaster.net/faq',
en: 'https://www.qrmaster.net/faq',
},
},
openGraph: {
title,
description,
url: 'https://www.qrmaster.net/faq',
type: 'website',
},
twitter: {
title,
description,
},
};
}
const faqs = [
{
question: 'What is a dynamic QR code?',
answer: 'A dynamic QR code allows you to change the destination URL after the code has been created and printed. Unlike static QR codes, dynamic codes redirect through a short URL that you control, enabling real-time updates, scan analytics, and campaign tracking without reprinting the code.',
},
{
question: 'How do I track QR scans?',
answer: 'QR Master provides a comprehensive analytics dashboard that tracks every scan in real-time. You can monitor scan rates, geographic locations, device types, timestamps, and user behavior. Enable UTM parameters to integrate with Google Analytics for advanced campaign tracking and conversion attribution.',
},
{
question: 'What security features does QR Master offer?',
answer: 'QR Master employs enterprise-grade security including SSL encryption, link validation to prevent malicious redirects, fraud detection, and GDPR-compliant data handling. All scan analytics are stored securely and access is protected with multi-factor authentication for business accounts.',
},
{
question: 'Can I generate bulk QR codes for print?',
answer: 'Yes. Our bulk QR generation tool allows you to create thousands of QR codes at once by uploading a CSV file. Each code can be customized with unique URLs, UTM parameters, and branding. Download print-ready files in SVG, PNG, or PDF formats optimized for high-resolution printing.',
},
{
question: 'How do I brand my QR codes?',
answer: 'QR Master offers customization options including custom colors, corner styles, and pattern designs. Branded QR codes maintain scannability while matching your brand identity. Choose your color palette and preview designs before downloading.',
},
{
question: 'Is scan analytics GDPR compliant?',
answer: 'Yes. All QR Master analytics are fully GDPR compliant. We collect only necessary data, provide transparent privacy policies, allow users to opt out, and store data securely in EU-compliant data centers. You maintain full control over data retention and deletion.',
},
{
question: 'Can QR Master track campaigns with UTM?',
answer: 'Absolutely. QR Master supports UTM parameter integration for all dynamic QR codes. Automatically append source, medium, campaign, term, and content parameters to track QR performance in Google Analytics, Adobe Analytics, and other marketing platforms. UTM tracking enables multi-channel attribution and ROI measurement.',
},
{
question: 'Difference between static and dynamic QR codes?',
answer: 'Static QR codes encode the destination URL directly in the code pattern and cannot be changed after creation. Dynamic QR codes use a short redirect URL, allowing you to update destinations, track scans, enable/disable codes, and gather analytics—all without reprinting. Dynamic codes are essential for professional marketing campaigns.',
},
{
question: 'How are QR codes used for events?',
answer: 'QR codes streamline event check-ins, ticket validation, attendee tracking, and engagement measurement. Generate unique codes for each ticket, track scan times and locations, enable contactless entry, and analyze attendee behavior. Event organizers use QR analytics to measure session popularity and optimize future events.',
},
{
question: 'Can I make QR codes for business cards?',
answer: 'Yes. QR codes on business cards provide instant contact sharing via vCard format, link to your portfolio or LinkedIn profile, and track networking effectiveness. Use branded QR codes that match your card design, and leverage scan analytics to see how many contacts engage and when they follow up.',
},
{
question: 'How do I use QR codes for bulk marketing?',
answer: 'Bulk QR codes enable scalable campaigns across print ads, packaging, direct mail, and retail displays. Generate thousands of codes with unique tracking URLs, distribute them across channels, and use analytics to measure which placements drive the highest engagement. Bulk generation supports CSV upload, API integration, and automated workflows.',
},
{
question: 'Is API access available for bulk QR generation?',
answer: 'Yes. QR Master offers a developer-friendly REST API for programmatic QR code generation, URL management, and analytics retrieval. Integrate QR creation into your CRM, marketing automation platform, or e-commerce system. API access is included in Business plans and supports bulk operations, webhooks, and real-time updates.',
},
];
export default function FAQPage() {
return (
<>
<SeoJsonLd data={faqPageSchema(faqs)} />
<div className="py-20 bg-gradient-to-b from-gray-50 to-white">
<div className="container mx-auto px-4">
<div className="max-w-4xl mx-auto">
<div className="text-center mb-16">
<h1 className="text-4xl lg:text-5xl font-bold text-gray-900 mb-6">
Frequently Asked Questions
</h1>
<p className="text-xl text-gray-600">
Everything you need to know about dynamic QR codes, security, analytics, bulk generation, events, and print quality.
</p>
</div>
<div className="space-y-6">
{faqs.map((faq, index) => (
<Card key={index} className="border-l-4 border-blue-500">
<CardContent className="p-8">
<h2 className="text-2xl font-semibold mb-4 text-gray-900">
{faq.question}
</h2>
<p className="text-lg text-gray-700 leading-relaxed">
{faq.answer}
</p>
</CardContent>
</Card>
))}
</div>
<div className="mt-16 bg-blue-50 border-l-4 border-blue-500 p-8 rounded-r-lg">
<h2 className="text-2xl font-bold mb-4 text-gray-900">
Still have questions?
</h2>
<p className="text-lg text-gray-700 mb-6 leading-relaxed">
Our support team is here to help. Contact us at{' '}
<a href="mailto:support@qrmaster.net" className="text-blue-600 hover:text-blue-700 font-semibold">
support@qrmaster.net
</a>{' '}
or reach out through our live chat.
</p>
</div>
</div>
</div>
</div>
</>
);
}

View File

@@ -1,76 +1,248 @@
import type { Metadata } from 'next';
import '@/styles/globals.css';
import { Providers } from '@/components/Providers';
import MarketingLayout from './MarketingLayout';
// Import schema functions from library
import { organizationSchema, websiteSchema } from '@/lib/schema';
'use client';
const isIndexable = process.env.NEXT_PUBLIC_INDEXABLE === 'true';
import React, { useState, useEffect } from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { Button } from '@/components/ui/Button';
import { Footer } from '@/components/ui/Footer';
import en from '@/i18n/en.json';
import { ChevronDown, Wifi, Contact, MessageCircle, QrCode, Link2, Type, Mail, MessageSquare, Phone, Calendar, MapPin, Facebook, Instagram, Twitter, Youtube, Music, Bitcoin, CreditCard, Video, Users } from 'lucide-react';
import { cn } from '@/lib/utils';
import { AnimatePresence, motion } from 'framer-motion';
export const metadata: Metadata = {
metadataBase: new URL('https://www.qrmaster.net'),
title: {
default: 'QR Master Smart QR Generator & Analytics',
template: '%s | QR Master',
},
description: 'Create dynamic QR codes, track scans, and scale campaigns with secure analytics.',
keywords: 'QR code, QR generator, dynamic QR, QR tracking, QR analytics, branded QR, bulk QR generator',
robots: isIndexable
? { index: true, follow: true }
: { index: false, follow: false },
icons: {
icon: [
{ url: '/favicon.svg', type: 'image/svg+xml' },
{ url: '/logo.svg', type: 'image/svg+xml' },
],
apple: '/logo.svg',
},
twitter: {
card: 'summary_large_image',
site: '@qrmaster',
images: ['https://www.qrmaster.net/og-image.png'],
},
openGraph: {
type: 'website',
siteName: 'QR Master',
title: 'QR Master Smart QR Generator & Analytics',
description: 'Create dynamic QR codes, track scans, and scale campaigns with secure analytics.',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master - Dynamic QR Code Generator and Analytics Platform',
},
],
locale: 'en_US',
},
};
export default function RootMarketingLayout({
children,
export default function MarketingLayout({
children,
}: {
children: React.ReactNode;
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationSchema()) }}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(websiteSchema()) }}
/>
</head>
<body className="font-sans">
<Providers>
<MarketingLayout>
{children}
</MarketingLayout>
</Providers>
</body>
</html>
);
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const [scrolled, setScrolled] = useState(false);
const [toolsOpen, setToolsOpen] = useState(false);
const [mobileToolsOpen, setMobileToolsOpen] = useState(false);
const pathname = usePathname();
useEffect(() => {
const handleScroll = () => {
setScrolled(window.scrollY > 20);
};
// Check immediately on mount
handleScroll();
window.addEventListener('scroll', handleScroll, { passive: true });
return () => window.removeEventListener('scroll', handleScroll);
}, []);
// Close simple menus when path changes
useEffect(() => {
setMobileMenuOpen(false);
setToolsOpen(false);
}, [pathname]);
// Always use English for marketing pages
const t = en;
const tools = [
{ name: 'URL / Link', description: 'Link to any website', href: '/tools/url-qr-code', icon: Link2, color: 'text-blue-500', bgColor: 'bg-blue-50' },
{ name: 'Text', description: 'Plain text message', href: '/tools/text-qr-code', icon: Type, color: 'text-slate-500', bgColor: 'bg-slate-50' },
{ name: 'WiFi', description: 'Share WiFi credentials', href: '/tools/wifi-qr-code', icon: Wifi, color: 'text-indigo-500', bgColor: 'bg-indigo-50' },
{ name: 'VCard', description: 'Digital business card', href: '/tools/vcard-qr-code', icon: Contact, color: 'text-pink-500', bgColor: 'bg-pink-50' },
{ name: 'WhatsApp', description: 'Start a chat', href: '/tools/whatsapp-qr-code', icon: MessageCircle, color: 'text-green-500', bgColor: 'bg-green-50' },
{ name: 'Email', description: 'Compose an email', href: '/tools/email-qr-code', icon: Mail, color: 'text-amber-500', bgColor: 'bg-amber-50' },
{ name: 'SMS', description: 'Send a text message', href: '/tools/sms-qr-code', icon: MessageSquare, color: 'text-cyan-500', bgColor: 'bg-cyan-50' },
{ name: 'Phone', description: 'Start a call', href: '/tools/phone-qr-code', icon: Phone, color: 'text-violet-500', bgColor: 'bg-violet-50' },
{ name: 'Event', description: 'Add calendar event', href: '/tools/event-qr-code', icon: Calendar, color: 'text-red-500', bgColor: 'bg-red-50' },
{ name: 'Location', description: 'Share a place', href: '/tools/geolocation-qr-code', icon: MapPin, color: 'text-emerald-500', bgColor: 'bg-emerald-50' },
{ name: 'Facebook', description: 'Facebook profile/page', href: '/tools/facebook-qr-code', icon: Facebook, color: 'text-blue-600', bgColor: 'bg-blue-50' },
{ name: 'Instagram', description: 'Instagram profile', href: '/tools/instagram-qr-code', icon: Instagram, color: 'text-pink-600', bgColor: 'bg-pink-50' },
{ name: 'Twitter / X', description: 'Twitter profile', href: '/tools/twitter-qr-code', icon: Twitter, color: 'text-sky-500', bgColor: 'bg-sky-50' },
{ name: 'YouTube', description: 'YouTube video/channel', href: '/tools/youtube-qr-code', icon: Youtube, color: 'text-red-600', bgColor: 'bg-red-50' },
{ name: 'TikTok', description: 'TikTok profile', href: '/tools/tiktok-qr-code', icon: Music, color: 'text-slate-800', bgColor: 'bg-slate-100' },
{ name: 'Crypto', description: 'Share wallet address', href: '/tools/crypto-qr-code', icon: Bitcoin, color: 'text-orange-500', bgColor: 'bg-orange-50' },
{ name: 'PayPal', description: 'Receive payments', href: '/tools/paypal-qr-code', icon: CreditCard, color: 'text-blue-700', bgColor: 'bg-blue-50' },
{ name: 'Zoom', description: 'Join Zoom meeting', href: '/tools/zoom-qr-code', icon: Video, color: 'text-sky-500', bgColor: 'bg-sky-50' },
{ name: 'Teams', description: 'Join Teams meeting', href: '/tools/teams-qr-code', icon: Users, color: 'text-violet-500', bgColor: 'bg-violet-50' },
];
return (
<div className="min-h-screen bg-white">
{/* Header */}
<header
className="fixed top-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-md border-b border-slate-200 shadow-sm"
>
<nav className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl h-20 flex items-center justify-between">
{/* Logo */}
<Link href="/" className="flex items-center space-x-2.5 group">
<div className="relative w-9 h-9 flex items-center justify-center bg-indigo-600 rounded-lg shadow-indigo-200 shadow-lg group-hover:scale-105 transition-transform duration-200">
<QrCode className="w-5 h-5 text-white" />
</div>
<span className="text-xl font-bold text-slate-900 tracking-tight group-hover:text-indigo-600 transition-colors">QR Master</span>
</Link>
{/* Desktop Navigation */}
<div className="hidden md:flex items-center space-x-1">
{/* Tools Dropdown */}
<div
className="relative group px-3 py-2"
onMouseEnter={() => setToolsOpen(true)}
onMouseLeave={() => setToolsOpen(false)}
>
<button className="flex items-center space-x-1 text-sm font-medium text-slate-600 group-hover:text-slate-900 transition-colors">
<span>Free Tools</span>
<ChevronDown className={cn("w-4 h-4 transition-transform duration-200", toolsOpen && "rotate-180")} />
</button>
<AnimatePresence>
{toolsOpen && (
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 10 }}
transition={{ duration: 0.15 }}
className="absolute left-1/2 -translate-x-1/2 top-full mt-2 w-[750px] bg-white rounded-2xl shadow-lg border border-slate-100 p-4 overflow-hidden"
>
<div className="grid grid-cols-3 gap-1">
{tools.map((tool) => (
<Link
key={tool.name}
href={tool.href}
className="flex items-center space-x-3 p-2.5 rounded-xl transition-colors hover:bg-slate-50"
>
<div className={cn("p-2 rounded-lg shrink-0", tool.bgColor, tool.color)}>
<tool.icon className="w-4 h-4" />
</div>
<div>
<div className="text-sm font-semibold text-slate-900">{tool.name}</div>
<p className="text-xs text-slate-500 leading-snug">{tool.description}</p>
</div>
</Link>
))}
</div>
<div className="mt-3 pt-3 border-t border-slate-100 -mx-4 -mb-4 px-4 py-3 text-center bg-slate-50/50">
<p className="text-xs text-slate-500 font-medium">All generators are 100% free</p>
</div>
</motion.div>
)}
</AnimatePresence>
</div>
<Link href="/#features" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.features}
</Link>
<Link href="/#pricing" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.pricing}
</Link>
<Link href="/blog" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.blog}
</Link>
<Link href="/#faq" className="px-3 py-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
FAQ
</Link>
</div>
<div className="hidden md:flex items-center space-x-4">
<Link href="/login" className="text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">
{t.nav.login}
</Link>
<Link href="/signup">
<Button className={cn(
"font-semibold shadow-lg shadow-indigo-500/20 transition-all hover:scale-105",
scrolled ? "bg-blue-600 text-white hover:bg-blue-700" : "bg-blue-600 text-white hover:bg-blue-700"
)}>
{t.nav.cta || "Get Started Free"}
</Button>
</Link>
</div>
{/* Mobile Menu Button - Always dark */}
<button
className="md:hidden p-2 text-slate-900"
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
aria-label="Toggle menu"
>
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
{mobileMenuOpen ? (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
) : (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
)}
</svg>
</button>
</nav>
{/* Mobile Menu */}
<AnimatePresence>
{mobileMenuOpen && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
className="md:hidden bg-white border-b border-slate-100 overflow-hidden"
>
<div className="container mx-auto px-4 py-6 space-y-2">
{/* Free Tools Accordion */}
<button
onClick={() => setMobileToolsOpen(!mobileToolsOpen)}
className="flex items-center justify-between w-full px-4 py-3 rounded-xl hover:bg-slate-50 text-slate-700 font-semibold"
>
<span>Free Tools</span>
<ChevronDown className={cn("w-5 h-5 transition-transform", mobileToolsOpen && "rotate-180")} />
</button>
<AnimatePresence>
{mobileToolsOpen && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
className="overflow-hidden"
>
<div className="max-h-[50vh] overflow-y-auto pl-4 space-y-1 border-l-2 border-slate-100 ml-4">
{tools.map((tool) => (
<Link
key={tool.name}
href={tool.href}
className="flex items-center gap-3 px-4 py-2.5 rounded-lg hover:bg-slate-50 text-slate-600 text-sm"
onClick={() => { setMobileMenuOpen(false); setMobileToolsOpen(false); }}
>
<tool.icon className={cn("w-4 h-4", tool.color)} />
{tool.name}
</Link>
))}
</div>
</motion.div>
)}
</AnimatePresence>
<div className="h-px bg-slate-100 my-2"></div>
<Link href="/#features" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.features}</Link>
<Link href="/#pricing" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.pricing}</Link>
<Link href="/blog" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>{t.nav.blog}</Link>
<Link href="/#faq" className="block px-4 py-3 text-slate-700 font-medium rounded-xl hover:bg-slate-50" onClick={() => setMobileMenuOpen(false)}>FAQ</Link>
<div className="grid grid-cols-2 gap-4 pt-4">
<Link href="/login" onClick={() => setMobileMenuOpen(false)}>
<Button variant="outline" className="w-full justify-center">Log in</Button>
</Link>
<Link href="/signup" onClick={() => setMobileMenuOpen(false)}>
<Button className="w-full justify-center bg-indigo-600 hover:bg-indigo-700">Get Started</Button>
</Link>
</div>
</div>
</motion.div>
)}
</AnimatePresence>
</header>
{/* Main Content */}
<main className="pt-20">{children}</main>
{/* Footer */}
<Footer />
</div >
);
}

View File

@@ -1,754 +0,0 @@
'use client';
import React, { useState, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { Card } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Badge } from '@/components/ui/Badge';
import {
Mail,
Users,
QrCode,
BarChart3,
TrendingUp,
Crown,
Activity,
Loader2,
Lock,
LogOut,
Zap,
Send,
CheckCircle2,
FileDown,
DollarSign,
} from 'lucide-react';
interface AdminStats {
users: {
total: number;
premium: number;
newThisWeek: number;
newThisMonth: number;
recent: Array<{
email: string;
name: string | null;
plan: string;
createdAt: string;
}>;
};
qrCodes: {
total: number;
dynamic: number;
static: number;
active: number;
};
scans: {
total: number;
dynamicOnly: number;
avgPerDynamicQR: string;
};
newsletter: {
subscribers: number;
};
topQRCodes: Array<{
id: string;
title: string;
type: string;
scans: number;
owner: string;
createdAt: string;
}>;
}
export default function NewsletterClient() {
const router = useRouter();
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [isAuthenticating, setIsAuthenticating] = useState(true);
const [loginError, setLoginError] = useState('');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [stats, setStats] = useState<AdminStats | null>(null);
const [loading, setLoading] = useState(true);
// Newsletter management state
const [newsletterData, setNewsletterData] = useState<{
total: number;
recent: Array<{ email: string; createdAt: string }>;
} | null>(null);
const [sendingBroadcast, setSendingBroadcast] = useState(false);
const [broadcastResult, setBroadcastResult] = useState<{
success: boolean;
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();
}, []);
const checkAuth = async () => {
try {
const response = await fetch('/api/admin/stats');
if (response.ok) {
setIsAuthenticated(true);
const data = await response.json();
setStats(data);
setLoading(false);
// Also fetch newsletter and lead data
fetchNewsletterData();
fetchLeadsData();
} else {
setIsAuthenticated(false);
}
} catch (error) {
setIsAuthenticated(false);
} finally {
setIsAuthenticating(false);
}
};
const fetchNewsletterData = async () => {
try {
const response = await fetch('/api/newsletter/broadcast');
if (response.ok) {
const data = await response.json();
setNewsletterData(data);
}
} catch (error) {
console.error('Failed to fetch newsletter data:', error);
}
};
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;
}
setSendingBroadcast(true);
setBroadcastResult(null);
try {
const response = await fetch('/api/newsletter/broadcast', {
method: 'POST',
});
const data = await response.json();
if (response.ok) {
setBroadcastResult({
success: true,
message: data.message || `Successfully sent to ${data.sent} subscribers!`,
});
} else {
setBroadcastResult({
success: false,
message: data.error || 'Failed to send broadcast',
});
}
} catch (error) {
setBroadcastResult({
success: false,
message: 'Network error. Please try again.',
});
} finally {
setSendingBroadcast(false);
}
};
const handleLogin = async (e: React.FormEvent) => {
e.preventDefault();
setLoginError('');
setIsAuthenticating(true);
try {
const response = await fetch('/api/newsletter/admin-login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ email, password }),
});
if (response.ok) {
setIsAuthenticated(true);
await checkAuth();
} else {
const data = await response.json();
setLoginError(data.error || 'Invalid credentials');
}
} catch (error) {
setLoginError('Login failed. Please try again.');
} finally {
setIsAuthenticating(false);
}
};
const handleLogout = async () => {
await fetch('/api/auth/logout', { method: 'POST' });
router.push('/');
};
// Login Screen
if (!isAuthenticated) {
return (
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-purple-50 to-pink-50 dark:from-purple-950/20 dark:to-pink-950/20 px-4">
<Card className="w-full max-w-md p-8">
<div className="text-center mb-6">
<div className="w-16 h-16 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/30 dark:to-pink-900/30 rounded-full flex items-center justify-center mx-auto mb-4">
<Lock className="w-8 h-8 text-purple-600 dark:text-purple-400" />
</div>
<h1 className="text-2xl font-bold mb-2">Admin Dashboard</h1>
<p className="text-muted-foreground text-sm">
Sign in to access admin panel
</p>
<Link href="/" className="text-sm text-slate-500 hover:text-slate-900 block mt-2">
Back to Home
</Link>
</div>
<form onSubmit={handleLogin} className="space-y-4">
<div>
<label className="block text-sm font-medium mb-2">Email</label>
<input
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="admin@example.com"
required
className="w-full px-4 py-3 rounded-xl bg-background border border-border focus:border-purple-500 focus:ring-2 focus:ring-purple-500/20 outline-none transition-all"
/>
</div>
<div>
<label className="block text-sm font-medium mb-2">Password</label>
<input
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
required
className="w-full px-4 py-3 rounded-xl bg-background border border-border focus:border-purple-500 focus:ring-2 focus:ring-purple-500/20 outline-none transition-all"
/>
</div>
{loginError && (
<p className="text-sm text-red-600 dark:text-red-400">{loginError}</p>
)}
<Button
type="submit"
disabled={isAuthenticating}
className="w-full bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white"
>
{isAuthenticating ? (
<>
<Loader2 className="w-4 h-4 mr-2 animate-spin" />
Signing in...
</>
) : (
'Sign In'
)}
</Button>
</form>
<div className="mt-6 pt-6 border-t text-center">
<p className="text-xs text-muted-foreground">
Admin credentials required
</p>
</div>
</Card>
</div>
);
}
// Loading
if (loading) {
return (
<div className="min-h-screen flex items-center justify-center">
<Loader2 className="w-8 h-8 animate-spin text-primary" />
</div>
);
}
// Admin Dashboard
return (
<div className="min-h-screen bg-gradient-to-br from-purple-50/30 to-pink-50/30 dark:from-purple-950/10 dark:to-pink-950/10">
<div className="container mx-auto px-4 py-8 max-w-7xl">
{/* Header */}
<div className="flex items-center justify-between mb-8">
<div>
<h1 className="text-3xl font-bold mb-2">Admin Dashboard</h1>
<p className="text-muted-foreground">
Platform overview and statistics
</p>
</div>
<Button
onClick={handleLogout}
variant="outline"
className="flex items-center gap-2"
>
<LogOut className="w-4 h-4" />
Logout
</Button>
</div>
{/* Main Stats Grid */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
{/* All Time Users */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-blue-100 dark:bg-blue-900/20 rounded-lg flex items-center justify-center">
<Users className="w-6 h-6 text-blue-600 dark:text-blue-400" />
</div>
<Badge className="bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300">
All Time
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">{stats?.users.total || 0}</h3>
<p className="text-sm text-muted-foreground">Total Users</p>
<div className="mt-3 pt-3 border-t space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">This Month</span>
<span className="text-sm font-semibold text-green-600 dark:text-green-400">
+{stats?.users.newThisMonth || 0}
</span>
</div>
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">This Week</span>
<span className="text-sm font-semibold text-green-600 dark:text-green-400">
+{stats?.users.newThisWeek || 0}
</span>
</div>
</div>
</Card>
{/* Dynamic QR Codes */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-purple-100 dark:bg-purple-900/20 rounded-lg flex items-center justify-center">
<QrCode className="w-6 h-6 text-purple-600 dark:text-purple-400" />
</div>
<Badge className="bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300">
Dynamic
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">{stats?.qrCodes.dynamic || 0}</h3>
<p className="text-sm text-muted-foreground">Dynamic QR Codes</p>
<div className="mt-3 pt-3 border-t flex items-center justify-between">
<span className="text-xs text-muted-foreground">Static</span>
<span className="text-sm font-semibold">{stats?.qrCodes.static || 0}</span>
</div>
</Card>
{/* Total Scans */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-green-100 dark:bg-green-900/20 rounded-lg flex items-center justify-center">
<BarChart3 className="w-6 h-6 text-green-600 dark:text-green-400" />
</div>
<Badge className="bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300">
All Time
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">
{stats?.scans.dynamicOnly.toLocaleString() || 0}
</h3>
<p className="text-sm text-muted-foreground">Dynamic QR Scans</p>
<div className="mt-3 pt-3 border-t flex items-center justify-between">
<span className="text-xs text-muted-foreground">Avg per QR</span>
<span className="text-sm font-semibold">{stats?.scans.avgPerDynamicQR || 0}</span>
</div>
</Card>
{/* Total QR Codes */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-amber-100 dark:bg-amber-900/20 rounded-lg flex items-center justify-center">
<QrCode className="w-6 h-6 text-amber-600 dark:text-amber-400" />
</div>
<Badge className="bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300">
All Time
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">{stats?.qrCodes.total || 0}</h3>
<p className="text-sm text-muted-foreground">Total QR Codes</p>
<div className="mt-3 pt-3 border-t space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">Dynamic</span>
<span className="text-sm font-semibold">{stats?.qrCodes.dynamic || 0}</span>
</div>
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">Static</span>
<span className="text-sm font-semibold">{stats?.qrCodes.static || 0}</span>
</div>
</div>
</Card>
</div>
{/* Secondary Stats Row */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
{/* Total All Scans */}
<Card className="p-6">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-indigo-100 dark:bg-indigo-900/20 rounded-lg flex items-center justify-center">
<Zap className="w-6 h-6 text-indigo-600 dark:text-indigo-400" />
</div>
<div>
<h3 className="text-2xl font-bold">
{stats?.scans.total.toLocaleString() || 0}
</h3>
<p className="text-sm text-muted-foreground">Total All Scans</p>
</div>
</div>
</Card>
{/* Total QR Codes */}
<Card className="p-6">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-pink-100 dark:bg-pink-900/20 rounded-lg flex items-center justify-center">
<QrCode className="w-6 h-6 text-pink-600 dark:text-pink-400" />
</div>
<div>
<h3 className="text-2xl font-bold">{stats?.qrCodes.total || 0}</h3>
<p className="text-sm text-muted-foreground">Total QR Codes</p>
</div>
</div>
</Card>
{/* Premium Users */}
<Card className="p-6">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-amber-100 dark:bg-amber-900/20 rounded-lg flex items-center justify-center">
<Crown className="w-6 h-6 text-amber-600 dark:text-amber-400" />
</div>
<div>
<h3 className="text-2xl font-bold">{stats?.users.premium || 0}</h3>
<p className="text-sm text-muted-foreground">Premium Users</p>
</div>
</div>
</Card>
</div>
{/* Bottom Grid */}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
{/* Top QR Codes */}
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/30 dark:to-pink-900/30 rounded-lg flex items-center justify-center">
<TrendingUp className="w-5 h-5 text-purple-600 dark:text-purple-400" />
</div>
<div>
<h3 className="font-semibold text-lg">Top QR Codes</h3>
<p className="text-xs text-muted-foreground">Most scanned</p>
</div>
</div>
{stats?.topQRCodes && stats.topQRCodes.length > 0 ? (
<div className="space-y-3">
{stats.topQRCodes.map((qr, index) => (
<div
key={qr.id}
className="flex items-center justify-between py-3 border-b border-border last:border-0"
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<div className="w-8 h-8 bg-gradient-to-br from-purple-500 to-pink-500 rounded-lg flex items-center justify-center flex-shrink-0">
<span className="text-white text-sm font-bold">
#{index + 1}
</span>
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium truncate">{qr.title}</p>
<p className="text-xs text-muted-foreground truncate">
{qr.owner}
</p>
</div>
</div>
<div className="text-right flex-shrink-0 ml-4">
<p className="text-lg font-bold">{qr.scans.toLocaleString()}</p>
<p className="text-xs text-muted-foreground">scans</p>
</div>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No QR codes yet</p>
)}
</Card>
{/* Recent Users */}
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-blue-100 dark:bg-blue-900/20 rounded-lg flex items-center justify-center">
<Users className="w-5 h-5 text-blue-600 dark:text-blue-400" />
</div>
<div>
<h3 className="font-semibold text-lg">Recent Users</h3>
<p className="text-xs text-muted-foreground">Latest signups</p>
</div>
</div>
{stats?.users.recent && stats.users.recent.length > 0 ? (
<div className="space-y-3">
{stats.users.recent.map((user, index) => (
<div
key={index}
className="flex items-center justify-between py-3 border-b border-border last:border-0"
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<div className="w-8 h-8 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center flex-shrink-0">
<span className="text-white text-xs font-bold">
{(user.name || user.email).charAt(0).toUpperCase()}
</span>
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium truncate">
{user.name || user.email}
</p>
<p className="text-xs text-muted-foreground truncate">
{new Date(user.createdAt).toLocaleDateString()}
</p>
</div>
</div>
<Badge
className={
user.plan === 'FREE'
? 'bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-300'
: 'bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300'
}
>
{user.plan === 'PRO' && <Crown className="w-3 h-3 mr-1" />}
{user.plan}
</Badge>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No users yet</p>
)}
</Card>
</div>
{/* Newsletter Management Section */}
<div className="mt-8">
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/30 dark:to-pink-900/30 rounded-lg flex items-center justify-center">
<Users className="w-5 h-5 text-purple-600 dark:text-purple-400" />
</div>
<div className="flex-1">
<h3 className="font-semibold text-lg">Newsletter Management</h3>
<p className="text-xs text-muted-foreground">Manage AI feature launch notifications</p>
</div>
<div className="text-right">
<span className="text-2xl font-bold">{newsletterData?.total || 0}</span>
<p className="text-xs text-muted-foreground">Total Subscribers</p>
</div>
<Badge className="bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300">
Active
</Badge>
</div>
{/* Broadcast Section */}
<div className="p-4 bg-gray-50 dark:bg-gray-900/50 rounded-xl mb-6">
<div className="flex items-start gap-3 mb-3">
<Send className="w-5 h-5 text-purple-600 dark:text-purple-400 mt-0.5" />
<div>
<h4 className="font-medium">Broadcast AI Feature Launch</h4>
<p className="text-sm text-muted-foreground">
Send the AI feature launch announcement to all {newsletterData?.total || 0} subscribers.
This will inform them that the features are now available.
</p>
</div>
</div>
{/* Resend Free Tier Warning */}
{(newsletterData?.total || 0) > 100 && (
<div className="p-3 rounded-lg mb-3 bg-amber-100 dark:bg-amber-900/30 text-amber-800 dark:text-amber-200 flex items-start gap-2">
<Activity className="w-5 h-5 flex-shrink-0 mt-0.5" />
<div className="text-sm">
<strong>Warning: Resend Free Limit</strong>
<p>You have more than 100 subscribers. The Resend Free Tier only allows 100 emails per day. Sending this broadcast might fail for some users or block your account.</p>
</div>
</div>
)}
{broadcastResult && (
<div className={`p-3 rounded-lg mb-3 flex items-center gap-2 ${broadcastResult.success
? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300'
: 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300'
}`}>
{broadcastResult.success && <CheckCircle2 className="w-4 h-4" />}
<span className="text-sm">{broadcastResult.message}</span>
</div>
)}
<Button
onClick={handleSendBroadcast}
disabled={sendingBroadcast || (newsletterData?.total || 0) === 0 || (newsletterData?.total || 0) > 100}
className="bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white"
>
{sendingBroadcast ? (
<>
<Loader2 className="w-4 h-4 mr-2 animate-spin" />
Sending...
</>
) : (
<>
<Mail className="w-4 h-4 mr-2" />
Send Launch Notification to All
</>
)}
</Button>
</div>
{/* Recent Subscribers */}
<div>
<h4 className="font-medium mb-3">Recent Subscribers</h4>
{newsletterData?.recent && newsletterData.recent.length > 0 ? (
<div className="space-y-2">
{newsletterData.recent.map((subscriber, index) => (
<div
key={index}
className="flex items-center justify-between py-2 border-b border-border last:border-0"
>
<div className="flex items-center gap-2">
<Mail className="w-4 h-4 text-muted-foreground" />
<span className="text-sm">{subscriber.email}</span>
</div>
<span className="text-xs text-muted-foreground">
{new Date(subscriber.createdAt).toLocaleDateString()}
</span>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No subscribers yet</p>
)}
</div>
{/* Tip */}
<div className="mt-4 pt-4 border-t">
<p className="text-xs text-muted-foreground">
💡 Tip: View all subscribers in{' '}
<a
href="http://localhost:5555"
target="_blank"
rel="noopener noreferrer"
className="text-purple-600 dark:text-purple-400 hover:underline"
>
Prisma Studio
</a>
{' '}(NewsletterSubscription table)
</p>
</div>
</Card>
</div>
{/* Lead Management Section */}
<div className="mt-8">
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-gradient-to-br from-emerald-100 to-teal-100 dark:from-emerald-900/30 dark:to-teal-900/30 rounded-lg flex items-center justify-center">
<FileDown className="w-5 h-5 text-emerald-600 dark:text-emerald-400" />
</div>
<div className="flex-1">
<h3 className="font-semibold text-lg">Lead Management</h3>
<p className="text-xs text-muted-foreground">Reprint Calculator PDF downloads</p>
</div>
<div className="text-right">
<span className="text-2xl font-bold">{leadData?.total || 0}</span>
<p className="text-xs text-muted-foreground">Total Leads</p>
</div>
<Badge className="bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-300">
Active
</Badge>
</div>
{/* Recent Leads */}
<div>
<h4 className="font-medium mb-3">Recent Leads</h4>
{leadData?.recent && leadData.recent.length > 0 ? (
<div className="space-y-2">
{leadData.recent.map((lead) => (
<div
key={lead.id}
className="flex items-center justify-between py-3 px-4 border border-border rounded-lg bg-gray-50/50 dark:bg-gray-900/30"
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<Mail className="w-4 h-4 text-muted-foreground flex-shrink-0" />
<div className="min-w-0">
<span className="text-sm font-medium block truncate">{lead.email}</span>
{lead.annualSavings && (
<span className="text-xs text-emerald-600 flex items-center gap-1">
<DollarSign className="w-3 h-3" />
{lead.annualSavings.toLocaleString()} potential savings
</span>
)}
</div>
</div>
<div className="text-right flex-shrink-0 ml-4">
<span className="text-xs text-muted-foreground block">
{new Date(lead.createdAt).toLocaleDateString()}
</span>
{lead.reprintCost && lead.updatesPerYear && (
<span className="text-xs text-slate-500">
{lead.reprintCost} × {lead.updatesPerYear}/yr
</span>
)}
</div>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No leads yet. Leads appear when users download a PDF report from the Reprint Calculator.</p>
)}
</div>
{/* Tip */}
<div className="mt-4 pt-4 border-t">
<p className="text-xs text-muted-foreground">
💡 Tip: View all leads in{' '}
<a
href="http://localhost:5555"
target="_blank"
rel="noopener noreferrer"
className="text-emerald-600 dark:text-emerald-400 hover:underline"
>
Prisma Studio
</a>
{' '}(Lead table)
</p>
</div>
</Card>
</div>
</div>
</div>
);
}

View File

@@ -1,19 +1,643 @@
import React from 'react';
import type { Metadata } from 'next';
import NewsletterClient from './NewsletterClient';
'use client';
export const metadata: Metadata = {
title: 'Newsletter Admin | QR Master',
description: 'Administrative access for QR Master newsletter management. This area is restricted to authorized personnel only.',
robots: {
index: false,
follow: false,
},
alternates: {
canonical: 'https://www.qrmaster.net/newsletter',
},
};
import React, { useState, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { Card } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Badge } from '@/components/ui/Badge';
import {
Mail,
Users,
QrCode,
BarChart3,
TrendingUp,
Crown,
Activity,
Loader2,
Lock,
LogOut,
Zap,
Send,
CheckCircle2,
} from 'lucide-react';
export default function NewsletterPage() {
return <NewsletterClient />;
interface AdminStats {
users: {
total: number;
premium: number;
newThisWeek: number;
newThisMonth: number;
recent: Array<{
email: string;
name: string | null;
plan: string;
createdAt: string;
}>;
};
qrCodes: {
total: number;
dynamic: number;
static: number;
active: number;
};
scans: {
total: number;
dynamicOnly: number;
avgPerDynamicQR: string;
};
newsletter: {
subscribers: number;
};
topQRCodes: Array<{
id: string;
title: string;
type: string;
scans: number;
owner: string;
createdAt: string;
}>;
}
export default function AdminDashboard() {
const router = useRouter();
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [isAuthenticating, setIsAuthenticating] = useState(true);
const [loginError, setLoginError] = useState('');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [stats, setStats] = useState<AdminStats | null>(null);
const [loading, setLoading] = useState(true);
// Newsletter management state
const [newsletterData, setNewsletterData] = useState<{
total: number;
recent: Array<{ email: string; createdAt: string }>;
} | null>(null);
const [sendingBroadcast, setSendingBroadcast] = useState(false);
const [broadcastResult, setBroadcastResult] = useState<{
success: boolean;
message: string;
} | null>(null);
useEffect(() => {
checkAuth();
}, []);
const checkAuth = async () => {
try {
const response = await fetch('/api/admin/stats');
if (response.ok) {
setIsAuthenticated(true);
const data = await response.json();
setStats(data);
setLoading(false);
// Also fetch newsletter data
fetchNewsletterData();
} else {
setIsAuthenticated(false);
}
} catch (error) {
setIsAuthenticated(false);
} finally {
setIsAuthenticating(false);
}
};
const fetchNewsletterData = async () => {
try {
const response = await fetch('/api/newsletter/broadcast');
if (response.ok) {
const data = await response.json();
setNewsletterData(data);
}
} catch (error) {
console.error('Failed to fetch newsletter 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;
}
setSendingBroadcast(true);
setBroadcastResult(null);
try {
const response = await fetch('/api/newsletter/broadcast', {
method: 'POST',
});
const data = await response.json();
if (response.ok) {
setBroadcastResult({
success: true,
message: data.message || `Successfully sent to ${data.sent} subscribers!`,
});
} else {
setBroadcastResult({
success: false,
message: data.error || 'Failed to send broadcast',
});
}
} catch (error) {
setBroadcastResult({
success: false,
message: 'Network error. Please try again.',
});
} finally {
setSendingBroadcast(false);
}
};
const handleLogin = async (e: React.FormEvent) => {
e.preventDefault();
setLoginError('');
setIsAuthenticating(true);
try {
const response = await fetch('/api/newsletter/admin-login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ email, password }),
});
if (response.ok) {
setIsAuthenticated(true);
await checkAuth();
} else {
const data = await response.json();
setLoginError(data.error || 'Invalid credentials');
}
} catch (error) {
setLoginError('Login failed. Please try again.');
} finally {
setIsAuthenticating(false);
}
};
const handleLogout = async () => {
await fetch('/api/auth/logout', { method: 'POST' });
router.push('/');
};
// Login Screen
if (!isAuthenticated) {
return (
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-purple-50 to-pink-50 dark:from-purple-950/20 dark:to-pink-950/20 px-4">
<Card className="w-full max-w-md p-8">
<div className="text-center mb-6">
<div className="w-16 h-16 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/30 dark:to-pink-900/30 rounded-full flex items-center justify-center mx-auto mb-4">
<Lock className="w-8 h-8 text-purple-600 dark:text-purple-400" />
</div>
<h1 className="text-2xl font-bold mb-2">Admin Dashboard</h1>
<p className="text-muted-foreground text-sm">
Sign in to access admin panel
</p>
</div>
<form onSubmit={handleLogin} className="space-y-4">
<div>
<label className="block text-sm font-medium mb-2">Email</label>
<input
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="admin@example.com"
required
className="w-full px-4 py-3 rounded-xl bg-background border border-border focus:border-purple-500 focus:ring-2 focus:ring-purple-500/20 outline-none transition-all"
/>
</div>
<div>
<label className="block text-sm font-medium mb-2">Password</label>
<input
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="••••••••"
required
className="w-full px-4 py-3 rounded-xl bg-background border border-border focus:border-purple-500 focus:ring-2 focus:ring-purple-500/20 outline-none transition-all"
/>
</div>
{loginError && (
<p className="text-sm text-red-600 dark:text-red-400">{loginError}</p>
)}
<Button
type="submit"
disabled={isAuthenticating}
className="w-full bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white"
>
{isAuthenticating ? (
<>
<Loader2 className="w-4 h-4 mr-2 animate-spin" />
Signing in...
</>
) : (
'Sign In'
)}
</Button>
</form>
<div className="mt-6 pt-6 border-t text-center">
<p className="text-xs text-muted-foreground">
Admin credentials required
</p>
</div>
</Card>
</div>
);
}
// Loading
if (loading) {
return (
<div className="min-h-screen flex items-center justify-center">
<Loader2 className="w-8 h-8 animate-spin text-primary" />
</div>
);
}
// Admin Dashboard
return (
<div className="min-h-screen bg-gradient-to-br from-purple-50/30 to-pink-50/30 dark:from-purple-950/10 dark:to-pink-950/10">
<div className="container mx-auto px-4 py-8 max-w-7xl">
{/* Header */}
<div className="flex items-center justify-between mb-8">
<div>
<h1 className="text-3xl font-bold mb-2">Admin Dashboard</h1>
<p className="text-muted-foreground">
Platform overview and statistics
</p>
</div>
<Button
onClick={handleLogout}
variant="outline"
className="flex items-center gap-2"
>
<LogOut className="w-4 h-4" />
Logout
</Button>
</div>
{/* Main Stats Grid */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
{/* All Time Users */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-blue-100 dark:bg-blue-900/20 rounded-lg flex items-center justify-center">
<Users className="w-6 h-6 text-blue-600 dark:text-blue-400" />
</div>
<Badge className="bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300">
All Time
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">{stats?.users.total || 0}</h3>
<p className="text-sm text-muted-foreground">Total Users</p>
<div className="mt-3 pt-3 border-t space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">This Month</span>
<span className="text-sm font-semibold text-green-600 dark:text-green-400">
+{stats?.users.newThisMonth || 0}
</span>
</div>
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">This Week</span>
<span className="text-sm font-semibold text-green-600 dark:text-green-400">
+{stats?.users.newThisWeek || 0}
</span>
</div>
</div>
</Card>
{/* Dynamic QR Codes */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-purple-100 dark:bg-purple-900/20 rounded-lg flex items-center justify-center">
<QrCode className="w-6 h-6 text-purple-600 dark:text-purple-400" />
</div>
<Badge className="bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300">
Dynamic
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">{stats?.qrCodes.dynamic || 0}</h3>
<p className="text-sm text-muted-foreground">Dynamic QR Codes</p>
<div className="mt-3 pt-3 border-t flex items-center justify-between">
<span className="text-xs text-muted-foreground">Static</span>
<span className="text-sm font-semibold">{stats?.qrCodes.static || 0}</span>
</div>
</Card>
{/* Total Scans */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-green-100 dark:bg-green-900/20 rounded-lg flex items-center justify-center">
<BarChart3 className="w-6 h-6 text-green-600 dark:text-green-400" />
</div>
<Badge className="bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300">
All Time
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">
{stats?.scans.dynamicOnly.toLocaleString() || 0}
</h3>
<p className="text-sm text-muted-foreground">Dynamic QR Scans</p>
<div className="mt-3 pt-3 border-t flex items-center justify-between">
<span className="text-xs text-muted-foreground">Avg per QR</span>
<span className="text-sm font-semibold">{stats?.scans.avgPerDynamicQR || 0}</span>
</div>
</Card>
{/* Total QR Codes */}
<Card className="p-6 hover:shadow-lg transition-shadow">
<div className="flex items-start justify-between mb-4">
<div className="w-12 h-12 bg-amber-100 dark:bg-amber-900/20 rounded-lg flex items-center justify-center">
<QrCode className="w-6 h-6 text-amber-600 dark:text-amber-400" />
</div>
<Badge className="bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300">
All Time
</Badge>
</div>
<h3 className="text-3xl font-bold mb-1">{stats?.qrCodes.total || 0}</h3>
<p className="text-sm text-muted-foreground">Total QR Codes</p>
<div className="mt-3 pt-3 border-t space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">Dynamic</span>
<span className="text-sm font-semibold">{stats?.qrCodes.dynamic || 0}</span>
</div>
<div className="flex items-center justify-between">
<span className="text-xs text-muted-foreground">Static</span>
<span className="text-sm font-semibold">{stats?.qrCodes.static || 0}</span>
</div>
</div>
</Card>
</div>
{/* Secondary Stats Row */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
{/* Total All Scans */}
<Card className="p-6">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-indigo-100 dark:bg-indigo-900/20 rounded-lg flex items-center justify-center">
<Zap className="w-6 h-6 text-indigo-600 dark:text-indigo-400" />
</div>
<div>
<h3 className="text-2xl font-bold">
{stats?.scans.total.toLocaleString() || 0}
</h3>
<p className="text-sm text-muted-foreground">Total All Scans</p>
</div>
</div>
</Card>
{/* Total QR Codes */}
<Card className="p-6">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-pink-100 dark:bg-pink-900/20 rounded-lg flex items-center justify-center">
<QrCode className="w-6 h-6 text-pink-600 dark:text-pink-400" />
</div>
<div>
<h3 className="text-2xl font-bold">{stats?.qrCodes.total || 0}</h3>
<p className="text-sm text-muted-foreground">Total QR Codes</p>
</div>
</div>
</Card>
{/* Premium Users */}
<Card className="p-6">
<div className="flex items-center gap-4">
<div className="w-12 h-12 bg-amber-100 dark:bg-amber-900/20 rounded-lg flex items-center justify-center">
<Crown className="w-6 h-6 text-amber-600 dark:text-amber-400" />
</div>
<div>
<h3 className="text-2xl font-bold">{stats?.users.premium || 0}</h3>
<p className="text-sm text-muted-foreground">Premium Users</p>
</div>
</div>
</Card>
</div>
{/* Bottom Grid */}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
{/* Top QR Codes */}
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/30 dark:to-pink-900/30 rounded-lg flex items-center justify-center">
<TrendingUp className="w-5 h-5 text-purple-600 dark:text-purple-400" />
</div>
<div>
<h3 className="font-semibold text-lg">Top QR Codes</h3>
<p className="text-xs text-muted-foreground">Most scanned</p>
</div>
</div>
{stats?.topQRCodes && stats.topQRCodes.length > 0 ? (
<div className="space-y-3">
{stats.topQRCodes.map((qr, index) => (
<div
key={qr.id}
className="flex items-center justify-between py-3 border-b border-border last:border-0"
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<div className="w-8 h-8 bg-gradient-to-br from-purple-500 to-pink-500 rounded-lg flex items-center justify-center flex-shrink-0">
<span className="text-white text-sm font-bold">
#{index + 1}
</span>
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium truncate">{qr.title}</p>
<p className="text-xs text-muted-foreground truncate">
{qr.owner}
</p>
</div>
</div>
<div className="text-right flex-shrink-0 ml-4">
<p className="text-lg font-bold">{qr.scans.toLocaleString()}</p>
<p className="text-xs text-muted-foreground">scans</p>
</div>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No QR codes yet</p>
)}
</Card>
{/* Recent Users */}
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-blue-100 dark:bg-blue-900/20 rounded-lg flex items-center justify-center">
<Users className="w-5 h-5 text-blue-600 dark:text-blue-400" />
</div>
<div>
<h3 className="font-semibold text-lg">Recent Users</h3>
<p className="text-xs text-muted-foreground">Latest signups</p>
</div>
</div>
{stats?.users.recent && stats.users.recent.length > 0 ? (
<div className="space-y-3">
{stats.users.recent.map((user, index) => (
<div
key={index}
className="flex items-center justify-between py-3 border-b border-border last:border-0"
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<div className="w-8 h-8 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center flex-shrink-0">
<span className="text-white text-xs font-bold">
{(user.name || user.email).charAt(0).toUpperCase()}
</span>
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium truncate">
{user.name || user.email}
</p>
<p className="text-xs text-muted-foreground truncate">
{new Date(user.createdAt).toLocaleDateString()}
</p>
</div>
</div>
<Badge
className={
user.plan === 'FREE'
? 'bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-300'
: 'bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300'
}
>
{user.plan === 'PRO' && <Crown className="w-3 h-3 mr-1" />}
{user.plan}
</Badge>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No users yet</p>
)}
</Card>
</div>
{/* Newsletter Management Section */}
<div className="mt-8">
<Card className="p-6">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/30 dark:to-pink-900/30 rounded-lg flex items-center justify-center">
<Users className="w-5 h-5 text-purple-600 dark:text-purple-400" />
</div>
<div className="flex-1">
<h3 className="font-semibold text-lg">Newsletter Management</h3>
<p className="text-xs text-muted-foreground">Manage AI feature launch notifications</p>
</div>
<div className="text-right">
<span className="text-2xl font-bold">{newsletterData?.total || 0}</span>
<p className="text-xs text-muted-foreground">Total Subscribers</p>
</div>
<Badge className="bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300">
Active
</Badge>
</div>
{/* Broadcast Section */}
<div className="p-4 bg-gray-50 dark:bg-gray-900/50 rounded-xl mb-6">
<div className="flex items-start gap-3 mb-3">
<Send className="w-5 h-5 text-purple-600 dark:text-purple-400 mt-0.5" />
<div>
<h4 className="font-medium">Broadcast AI Feature Launch</h4>
<p className="text-sm text-muted-foreground">
Send the AI feature launch announcement to all {newsletterData?.total || 0} subscribers.
This will inform them that the features are now available.
</p>
</div>
</div>
{/* Resend Free Tier Warning */}
{(newsletterData?.total || 0) > 100 && (
<div className="p-3 rounded-lg mb-3 bg-amber-100 dark:bg-amber-900/30 text-amber-800 dark:text-amber-200 flex items-start gap-2">
<Activity className="w-5 h-5 flex-shrink-0 mt-0.5" />
<div className="text-sm">
<strong>Warning: Resend Free Limit</strong>
<p>You have more than 100 subscribers. The Resend Free Tier only allows 100 emails per day. Sending this broadcast might fail for some users or block your account.</p>
</div>
</div>
)}
{broadcastResult && (
<div className={`p-3 rounded-lg mb-3 flex items-center gap-2 ${broadcastResult.success
? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300'
: 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300'
}`}>
{broadcastResult.success && <CheckCircle2 className="w-4 h-4" />}
<span className="text-sm">{broadcastResult.message}</span>
</div>
)}
<Button
onClick={handleSendBroadcast}
disabled={sendingBroadcast || (newsletterData?.total || 0) === 0 || (newsletterData?.total || 0) > 100}
className="bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white"
>
{sendingBroadcast ? (
<>
<Loader2 className="w-4 h-4 mr-2 animate-spin" />
Sending...
</>
) : (
<>
<Mail className="w-4 h-4 mr-2" />
Send Launch Notification to All
</>
)}
</Button>
</div>
{/* Recent Subscribers */}
<div>
<h4 className="font-medium mb-3">Recent Subscribers</h4>
{newsletterData?.recent && newsletterData.recent.length > 0 ? (
<div className="space-y-2">
{newsletterData.recent.map((subscriber, index) => (
<div
key={index}
className="flex items-center justify-between py-2 border-b border-border last:border-0"
>
<div className="flex items-center gap-2">
<Mail className="w-4 h-4 text-muted-foreground" />
<span className="text-sm">{subscriber.email}</span>
</div>
<span className="text-xs text-muted-foreground">
{new Date(subscriber.createdAt).toLocaleDateString()}
</span>
</div>
))}
</div>
) : (
<p className="text-sm text-muted-foreground">No subscribers yet</p>
)}
</div>
{/* Tip */}
<div className="mt-4 pt-4 border-t">
<p className="text-xs text-muted-foreground">
💡 Tip: View all subscribers in{' '}
<a
href="http://localhost:5555"
target="_blank"
rel="noopener noreferrer"
className="text-purple-600 dark:text-purple-400 hover:underline"
>
Prisma Studio
</a>
{' '}(NewsletterSubscription table)
</p>
</div>
</Card>
</div>
</div>
</div>
);
}

View File

@@ -3,8 +3,6 @@ import type { Metadata } from 'next';
import SeoJsonLd from '@/components/SeoJsonLd';
import { organizationSchema, websiteSchema } from '@/lib/schema';
import HomePageClient from '@/components/marketing/HomePageClient';
import { generateFaqSchema } from '@/lib/schema-utils';
import en from '@/i18n/en.json'; // Import English translations for schema generation
function truncateAtWord(text: string, maxLength: number): string {
if (text.length <= maxLength) return text;
@@ -16,7 +14,7 @@ function truncateAtWord(text: string, maxLength: number): string {
export async function generateMetadata(): Promise<Metadata> {
const title = truncateAtWord('QR Master: Dynamic QR Generator', 60);
const description = truncateAtWord(
'Create professional QR codes with QR Master. Dynamic QR with tracking, bulk generation, custom branding, and real-time analytics for all your campaigns.',
'Dynamic QR, branding, bulk generation & analytics for all campaigns.',
160
);
@@ -28,7 +26,6 @@ export async function generateMetadata(): Promise<Metadata> {
languages: {
'x-default': 'https://www.qrmaster.net/',
en: 'https://www.qrmaster.net/',
de: 'https://www.qrmaster.net/qr-code-erstellen',
},
},
openGraph: {
@@ -36,19 +33,10 @@ export async function generateMetadata(): Promise<Metadata> {
description,
url: 'https://www.qrmaster.net/',
type: 'website',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master - Dynamic QR Code Generator and Analytics Platform',
},
],
},
twitter: {
title,
description,
images: ['https://www.qrmaster.net/og-image.png'],
},
};
}
@@ -56,13 +44,11 @@ export async function generateMetadata(): Promise<Metadata> {
export default function HomePage() {
return (
<>
<SeoJsonLd data={[organizationSchema(), websiteSchema(), generateFaqSchema(en.faq.questions)]} />
{/* Server-rendered H1 for SEO - visually hidden but crawlable */}
<h1 className="sr-only">QR Master: Dynamic QR Code Generator with Analytics</h1>
<SeoJsonLd data={[organizationSchema(), websiteSchema()]} />
{/* Server-rendered SEO content for crawlers */}
<div className="sr-only" aria-hidden="false">
<h1>QR Master: Free Dynamic QR Code Generator with Tracking & Analytics</h1>
<p>
Create professional QR codes for your business with QR Master. Our dynamic QR code generator
lets you create trackable QR codes, edit destinations anytime, and view detailed analytics.

View File

@@ -1,45 +0,0 @@
import React from 'react';
import type { Metadata } from 'next';
import PricingClient from './PricingClient';
export const metadata: Metadata = {
title: {
absolute: 'Pricing Plans | QR Master'
},
description: 'Choose the perfect QR code plan for your needs. Free, Pro, and Business plans with dynamic QR codes, analytics, bulk generation, and custom branding.',
alternates: {
canonical: 'https://www.qrmaster.net/pricing',
},
robots: {
index: true,
follow: true,
},
openGraph: {
title: 'Pricing Plans | QR Master',
description: 'Choose the perfect QR code plan for your needs.',
url: 'https://www.qrmaster.net/pricing',
type: 'website',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master Pricing Plans',
},
],
},
};
export default function PricingPage() {
return (
<>
{/* Server-rendered H1 for SEO */}
<h1 className="sr-only">QR Master Pricing Choose Your QR Code Plan</h1>
<div className="sr-only">
<h2>Compare our plans</h2>
<p>Find the best QR code solution for your business. From free personal tiers to enterprise-grade dynamic code management.</p>
</div>
<PricingClient />
</>
);
}

View File

@@ -1,13 +0,0 @@
'use client';
import React from 'react';
import { ObfuscatedMailto } from '@/components/ui/ObfuscatedMailto';
export function PrivacyEmailLink() {
return (
<ObfuscatedMailto
email="support@qrmaster.net"
className="text-primary-600 hover:text-primary-700"
/>
);
}

View File

@@ -1,147 +1,133 @@
import React from 'react';
import Link from 'next/link';
import { PrivacyEmailLink } from './PrivacyEmailLink';
export const metadata = {
title: 'Privacy Policy | QR Master',
description: 'Read our Privacy Policy to understand how QR Master collects, uses, and protects your data. We are committed to GDPR compliance and data security.',
alternates: {
canonical: 'https://www.qrmaster.net/privacy',
},
openGraph: {
title: 'Privacy Policy | QR Master',
description: 'Read our Privacy Policy to understand how QR Master collects, uses, and protects your data.',
url: 'https://www.qrmaster.net/privacy',
type: 'website',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Master Privacy Policy',
},
],
},
};
export default function PrivacyPage() {
return (
<div className="min-h-screen bg-white py-12">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-4xl">
<div className="mb-8">
<Link href="/" className="text-primary-600 hover:text-primary-700 font-medium">
Back to Home
</Link>
</div>
<h1 className="text-4xl font-bold text-gray-900 mb-4">Privacy Policy</h1>
<p className="text-gray-600 mb-8">Last updated: January 2025</p>
<div className="prose prose-lg max-w-none">
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">1. Introduction</h2>
<p className="text-gray-700 mb-4">
Welcome to QR Master ("we," "our," or "us"). We respect your privacy and are committed to protecting your personal data.
This privacy policy explains how we collect, use, and protect your information when you use our services.
</p>
<p className="text-gray-700 mb-4">
We implement appropriate security measures including secure HTTPS transmission, password hashing, database access controls,
and CSRF protection to keep your data safe.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">2. Information We Collect</h2>
<h3 className="text-xl font-semibold text-gray-900 mb-3">Information You Provide</h3>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Account Information:</strong> Name, email address, and password</li>
<li><strong>Payment Information:</strong> Processed securely through Stripe (we do not store credit card information)</li>
<li><strong>QR Code Content:</strong> URLs, text, and customization settings for your QR codes</li>
</ul>
<h3 className="text-xl font-semibold text-gray-900 mb-3">Information Collected Automatically</h3>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Usage Data:</strong> QR code scans and analytics</li>
<li><strong>Technical Data:</strong> IP address, browser type, and device information</li>
<li><strong>Cookies:</strong> Essential cookies for authentication and optional analytics cookies (PostHog) with your consent</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">3. How We Use Your Information</h2>
<p className="text-gray-700 mb-4">We use your data to:</p>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li>Provide and maintain our QR code services</li>
<li>Process payments and manage subscriptions</li>
<li>Provide customer support</li>
<li>Improve our services and develop new features</li>
<li>Detect and prevent fraud</li>
</ul>
<p className="text-gray-700 mb-4">
We retain your data while your account is active. Upon account deletion, most data is removed immediately,
though some may be retained for legal compliance. Aggregated, anonymized analytics may be kept indefinitely.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">4. Data Sharing</h2>
<p className="text-gray-700 mb-4">We may share your data with:</p>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Stripe:</strong> Payment processing</li>
<li><strong>PostHog:</strong> Analytics (only with your consent, respects Do Not Track)</li>
<li><strong>Vercel:</strong> Cloud hosting provider</li>
<li><strong>Legal Requirements:</strong> When required by law</li>
</ul>
<p className="text-gray-700 mb-4">
We do not sell your personal data. Analytics are only activated if you accept optional cookies.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">5. Your Rights (GDPR)</h2>
<p className="text-gray-700 mb-4">You have the right to:</p>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Access:</strong> Request a copy of your personal data</li>
<li><strong>Rectification:</strong> Correct inaccurate data (update in account settings)</li>
<li><strong>Erasure:</strong> Delete your data (account deletion available in settings)</li>
<li><strong>Data Portability:</strong> Receive your data in a portable format</li>
<li><strong>Object:</strong> Object to processing based on legitimate interests</li>
<li><strong>Withdraw Consent:</strong> Withdraw cookie consent at any time</li>
</ul>
<p className="text-gray-700 mb-4">
To exercise these rights, contact us at{' '}
<PrivacyEmailLink />
</p>
<p className="text-gray-700 mb-4">
Our service is for users 16 years and older. If you're in the EEA and have concerns,
you may lodge a complaint with your local data protection authority.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">6. Contact Us</h2>
<p className="text-gray-700 mb-4">
If you have questions about this privacy policy, please contact us:
</p>
<div className="bg-gray-50 p-6 rounded-lg">
<p className="text-gray-700 mb-2">
<strong>Email:</strong>{' '}
<PrivacyEmailLink />
</p>
<p className="text-gray-700 mb-2"><strong>Website:</strong> <a href="/" className="text-primary-600 hover:text-primary-700">qrmaster.net</a></p>
</div>
</section>
</div>
<div className="mt-12 pt-8 border-t border-gray-200">
<p className="text-gray-600 text-center">
<Link href="/" className="text-primary-600 hover:text-primary-700">
Back to Home
</Link>
</p>
</div>
</div>
</div>
);
}
import React from 'react';
import Link from 'next/link';
export const metadata = {
title: 'Privacy Policy | QR Master',
description: 'Privacy Policy and data protection information for QR Master',
};
export default function PrivacyPage() {
return (
<div className="min-h-screen bg-white py-12">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-4xl">
<div className="mb-8">
<Link href="/" className="text-primary-600 hover:text-primary-700 font-medium">
Back to Home
</Link>
</div>
<h1 className="text-4xl font-bold text-gray-900 mb-4">Privacy Policy</h1>
<p className="text-gray-600 mb-8">Last updated: January 2025</p>
<div className="prose prose-lg max-w-none">
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">1. Introduction</h2>
<p className="text-gray-700 mb-4">
Welcome to QR Master ("we," "our," or "us"). We respect your privacy and are committed to protecting your personal data.
This privacy policy explains how we collect, use, and protect your information when you use our services.
</p>
<p className="text-gray-700 mb-4">
We implement appropriate security measures including secure HTTPS transmission, password hashing, database access controls,
and CSRF protection to keep your data safe.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">2. Information We Collect</h2>
<h3 className="text-xl font-semibold text-gray-900 mb-3">Information You Provide</h3>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Account Information:</strong> Name, email address, and password</li>
<li><strong>Payment Information:</strong> Processed securely through Stripe (we do not store credit card information)</li>
<li><strong>QR Code Content:</strong> URLs, text, and customization settings for your QR codes</li>
</ul>
<h3 className="text-xl font-semibold text-gray-900 mb-3">Information Collected Automatically</h3>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Usage Data:</strong> QR code scans and analytics</li>
<li><strong>Technical Data:</strong> IP address, browser type, and device information</li>
<li><strong>Cookies:</strong> Essential cookies for authentication and optional analytics cookies (PostHog) with your consent</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">3. How We Use Your Information</h2>
<p className="text-gray-700 mb-4">We use your data to:</p>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li>Provide and maintain our QR code services</li>
<li>Process payments and manage subscriptions</li>
<li>Provide customer support</li>
<li>Improve our services and develop new features</li>
<li>Detect and prevent fraud</li>
</ul>
<p className="text-gray-700 mb-4">
We retain your data while your account is active. Upon account deletion, most data is removed immediately,
though some may be retained for legal compliance. Aggregated, anonymized analytics may be kept indefinitely.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">4. Data Sharing</h2>
<p className="text-gray-700 mb-4">We may share your data with:</p>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Stripe:</strong> Payment processing</li>
<li><strong>PostHog:</strong> Analytics (only with your consent, respects Do Not Track)</li>
<li><strong>Vercel:</strong> Cloud hosting provider</li>
<li><strong>Legal Requirements:</strong> When required by law</li>
</ul>
<p className="text-gray-700 mb-4">
We do not sell your personal data. Analytics are only activated if you accept optional cookies.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">5. Your Rights (GDPR)</h2>
<p className="text-gray-700 mb-4">You have the right to:</p>
<ul className="list-disc pl-6 mb-4 text-gray-700 space-y-2">
<li><strong>Access:</strong> Request a copy of your personal data</li>
<li><strong>Rectification:</strong> Correct inaccurate data (update in account settings)</li>
<li><strong>Erasure:</strong> Delete your data (account deletion available in settings)</li>
<li><strong>Data Portability:</strong> Receive your data in a portable format</li>
<li><strong>Object:</strong> Object to processing based on legitimate interests</li>
<li><strong>Withdraw Consent:</strong> Withdraw cookie consent at any time</li>
</ul>
<p className="text-gray-700 mb-4">
To exercise these rights, contact us at{' '}
<a href="mailto:support@qrmaster.net" className="text-primary-600 hover:text-primary-700">
support@qrmaster.net
</a>
</p>
<p className="text-gray-700 mb-4">
Our service is for users 16 years and older. If you're in the EEA and have concerns,
you may lodge a complaint with your local data protection authority.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 mb-4">6. Contact Us</h2>
<p className="text-gray-700 mb-4">
If you have questions about this privacy policy, please contact us:
</p>
<div className="bg-gray-50 p-6 rounded-lg">
<p className="text-gray-700 mb-2">
<strong>Email:</strong>{' '}
<a href="mailto:support@qrmaster.net" className="text-primary-600 hover:text-primary-700">
support@qrmaster.net
</a>
</p>
<p className="text-gray-700 mb-2"><strong>Website:</strong> <a href="/" className="text-primary-600 hover:text-primary-700">qrmaster.net</a></p>
</div>
</section>
</div>
<div className="mt-12 pt-8 border-t border-gray-200">
<p className="text-gray-600 text-center">
<Link href="/" className="text-primary-600 hover:text-primary-700">
Back to Home
</Link>
</p>
</div>
</div>
</div>
);
}

View File

@@ -1,415 +1,398 @@
import React from 'react';
import type { Metadata } from 'next';
import Link from 'next/link';
import { Button } from '@/components/ui/Button';
import { Card } from '@/components/ui/Card';
import SeoJsonLd from '@/components/SeoJsonLd';
import Breadcrumbs, { BreadcrumbItem } from '@/components/Breadcrumbs';
import { breadcrumbSchema } from '@/lib/schema';
export const metadata: Metadata = {
title: 'QR Code Tracking & Analytics - Track Scans | QR Master',
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior. Free QR code tracking software with detailed reports.',
keywords: 'qr code tracking, qr code analytics, track qr scans, qr code statistics, free qr tracking, qr code monitoring',
alternates: {
canonical: 'https://www.qrmaster.net/qr-code-tracking',
languages: {
'x-default': 'https://www.qrmaster.net/qr-code-tracking',
en: 'https://www.qrmaster.net/qr-code-tracking',
},
},
openGraph: {
title: 'QR Code Tracking & Analytics - Track Scans | QR Master',
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior.',
url: 'https://www.qrmaster.net/qr-code-tracking',
type: 'website',
images: [
{
url: 'https://www.qrmaster.net/og-image.png',
width: 1200,
height: 630,
alt: 'QR Code Tracking & Analytics - QR Master',
},
],
},
twitter: {
title: 'QR Code Tracking & Analytics - Track Scans | QR Master',
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior.',
},
};
export default function QRCodeTrackingPage() {
const trackingFeatures = [
{
icon: '📊',
title: 'Real-Time Analytics',
description: 'See scan data instantly as it happens. Monitor your QR code performance in real-time with live dashboards.',
},
{
icon: '🌍',
title: 'Location Tracking',
description: 'Know exactly where your QR codes are being scanned. Track by country, city, and region.',
},
{
icon: '📱',
title: 'Device Detection',
description: 'Identify which devices scan your codes. Track iOS, Android, desktop, and browser types.',
},
{
icon: '🕐',
title: 'Time-Based Reports',
description: 'Analyze scan patterns by hour, day, week, or month. Optimize your campaigns with timing insights.',
},
{
icon: '👥',
title: 'Unique vs Total Scans',
description: 'Distinguish between unique users and repeat scans. Measure true reach and engagement.',
},
{
icon: '📈',
title: 'Campaign Performance',
description: 'Track ROI with UTM parameters. Measure conversion rates and campaign effectiveness.',
},
];
const useCases = [
{
title: 'Marketing Campaigns',
description: 'Track print ads, billboards, and product packaging to measure marketing ROI.',
benefits: ['Measure ad performance', 'A/B test campaigns', 'Track conversions'],
},
{
title: 'Event Management',
description: 'Monitor event check-ins, booth visits, and attendee engagement in real-time.',
benefits: ['Live attendance tracking', 'Booth analytics', 'Engagement metrics'],
},
{
title: 'Product Labels',
description: 'Track product authenticity scans, manual downloads, and warranty registrations.',
benefits: ['Anti-counterfeiting', 'User registration tracking', 'Product analytics'],
},
{
title: 'Restaurant Menus',
description: 'See how many customers scan your menu QR codes and when peak times occur.',
benefits: ['Customer insights', 'Peak time analysis', 'Menu engagement'],
},
];
const comparisonData = [
{ feature: 'Real-Time Analytics', free: true, qrMaster: true },
{ feature: 'Location Tracking', free: false, qrMaster: true },
{ feature: 'Device Detection', free: false, qrMaster: true },
{ feature: 'Unlimited Scans', free: false, qrMaster: true },
{ feature: 'Historical Data', free: '7 days', qrMaster: 'Unlimited' },
{ feature: 'Export Reports', free: false, qrMaster: true },
{ feature: 'API Access', free: false, qrMaster: true },
];
const softwareSchema = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
'@id': 'https://www.qrmaster.net/qr-code-tracking#software',
name: 'QR Master - QR Code Tracking & Analytics',
applicationCategory: 'BusinessApplication',
operatingSystem: 'Web Browser, iOS, Android',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
availability: 'https://schema.org/InStock',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.8',
ratingCount: '1250',
},
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior with our free QR code tracking software.',
features: [
'Real-time analytics dashboard',
'Location tracking by country and city',
'Device detection (iOS, Android, Desktop)',
'Time-based scan reports',
'Unique vs total scan tracking',
'Campaign performance metrics',
'Unlimited scans',
'Export detailed reports',
],
};
const howToSchema = {
'@context': 'https://schema.org',
'@type': 'HowTo',
'@id': 'https://www.qrmaster.net/qr-code-tracking#howto',
name: 'How to Track QR Code Scans',
description: 'Learn how to track and analyze QR code scans with real-time analytics',
totalTime: 'PT5M',
step: [
{
'@type': 'HowToStep',
position: 1,
name: 'Create QR Code',
text: 'Sign up for free and create a dynamic QR code with tracking enabled',
url: 'https://www.qrmaster.net/signup',
},
{
'@type': 'HowToStep',
position: 2,
name: 'Deploy QR Code',
text: 'Download and place your QR code on marketing materials, products, or digital platforms',
},
{
'@type': 'HowToStep',
position: 3,
name: 'Monitor Analytics',
text: 'View real-time scan data including location, device, and time patterns in your dashboard',
url: 'https://www.qrmaster.net/signup',
},
{
'@type': 'HowToStep',
position: 4,
name: 'Optimize Campaigns',
text: 'Use insights to optimize placement, timing, and targeting of your QR code campaigns',
},
],
};
const breadcrumbItems: BreadcrumbItem[] = [
{ name: 'Home', url: '/' },
{ name: 'QR Code Tracking', url: '/qr-code-tracking' },
];
return (
<>
<SeoJsonLd data={[softwareSchema, howToSchema, breadcrumbSchema(breadcrumbItems)]} />
<div className="min-h-screen bg-white">
{/* Hero Section */}
<section className="relative overflow-hidden bg-gradient-to-br from-blue-50 via-white to-purple-50 py-20">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<Breadcrumbs items={breadcrumbItems} />
<div className="grid lg:grid-cols-2 gap-12 items-center">
<div className="space-y-8">
<div className="inline-flex items-center space-x-2 bg-blue-100 text-blue-800 px-4 py-2 rounded-full text-sm font-semibold">
<span>📊</span>
<span>Free QR Code Tracking</span>
</div>
<h1 className="text-5xl lg:text-6xl font-bold text-gray-900 leading-tight">
Track Every QR Code Scan with Powerful Analytics
</h1>
<p className="text-xl text-gray-600 leading-relaxed">
Monitor your QR code performance in real-time. Get detailed insights on location, device, time, and user behavior. Make data-driven decisions with our free tracking software.
</p>
<div className="flex flex-col sm:flex-row gap-4">
<Link href="/signup">
<Button size="lg" className="text-lg px-8 py-4 w-full sm:w-auto">
Start Tracking Free
</Button>
</Link>
<Link href="/signup">
<Button variant="outline" size="lg" className="text-lg px-8 py-4 w-full sm:w-auto">
Create Trackable QR Code
</Button>
</Link>
</div>
<div className="flex items-center space-x-6 text-sm text-gray-600">
<div className="flex items-center space-x-2">
<svg className="w-5 h-5 text-green-500" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span>No credit card required</span>
</div>
<div className="flex items-center space-x-2">
<svg className="w-5 h-5 text-green-500" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span>Unlimited scans</span>
</div>
</div>
</div>
{/* Analytics Preview */}
<div className="relative">
<Card className="p-6 shadow-2xl">
<h3 className="font-semibold text-lg mb-4">Live Analytics Dashboard</h3>
<div className="space-y-4">
<div className="flex justify-between items-center pb-3 border-b">
<span className="text-gray-600">Total Scans</span>
<span className="text-2xl font-bold text-primary-600">12,547</span>
</div>
<div className="flex justify-between items-center pb-3 border-b">
<span className="text-gray-600">Unique Users</span>
<span className="text-2xl font-bold text-primary-600">8,392</span>
</div>
<div className="flex justify-between items-center pb-3 border-b">
<span className="text-gray-600">Top Location</span>
<span className="font-semibold">🇩🇪 Germany</span>
</div>
<div className="flex justify-between items-center">
<span className="text-gray-600">Top Device</span>
<span className="font-semibold">📱 iPhone</span>
</div>
</div>
</Card>
<div className="absolute -top-4 -right-4 bg-green-500 text-white px-4 py-2 rounded-full text-sm font-semibold shadow-lg animate-pulse">
Live Updates
</div>
</div>
</div>
</div>
</section>
{/* Tracking Features */}
<section className="py-20 bg-gray-50">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<div className="text-center mb-16">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
Powerful QR Code Tracking Features
</h2>
<p className="text-xl text-gray-600 max-w-3xl mx-auto">
Get complete visibility into your QR code performance with our comprehensive analytics suite
</p>
</div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
{trackingFeatures.map((feature, index) => (
<Card key={index} className="p-6 hover:shadow-lg transition-shadow">
<div className="text-4xl mb-4">{feature.icon}</div>
<h3 className="text-xl font-semibold text-gray-900 mb-2">
{feature.title}
</h3>
<p className="text-gray-600">
{feature.description}
</p>
</Card>
))}
</div>
</div>
</section>
{/* Use Cases */}
<section className="py-20">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<div className="text-center mb-16">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
QR Code Tracking Use Cases
</h2>
<p className="text-xl text-gray-600 max-w-3xl mx-auto">
See how businesses use QR code tracking to improve their operations
</p>
</div>
<div className="grid md:grid-cols-2 gap-8">
{useCases.map((useCase, index) => (
<Card key={index} className="p-8">
<h3 className="text-2xl font-bold text-gray-900 mb-3">
{useCase.title}
</h3>
<p className="text-gray-600 mb-6">
{useCase.description}
</p>
<ul className="space-y-2">
{useCase.benefits.map((benefit, idx) => (
<li key={idx} className="flex items-center space-x-2">
<svg className="w-5 h-5 text-green-500 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span className="text-gray-700">{benefit}</span>
</li>
))}
</ul>
</Card>
))}
</div>
</div>
</section>
{/* Comparison Table */}
<section className="py-20 bg-gray-50">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-5xl">
<div className="text-center mb-16">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
QR Master vs Free Tools
</h2>
<p className="text-xl text-gray-600">
See why businesses choose QR Master for QR code tracking
</p>
</div>
<Card className="overflow-hidden">
<table className="w-full">
<thead className="bg-gray-100">
<tr>
<th className="px-6 py-4 text-left text-gray-900 font-semibold">Feature</th>
<th className="px-6 py-4 text-center text-gray-900 font-semibold">Free Tools</th>
<th className="px-6 py-4 text-center text-primary-600 font-semibold">QR Master</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-200">
{comparisonData.map((row, index) => (
<tr key={index}>
<td className="px-6 py-4 text-gray-900 font-medium">{row.feature}</td>
<td className="px-6 py-4 text-center">
{typeof row.free === 'boolean' ? (
row.free ? (
<span className="text-green-500 text-2xl"></span>
) : (
<span className="text-red-500 text-2xl"></span>
)
) : (
<span className="text-gray-600">{row.free}</span>
)}
</td>
<td className="px-6 py-4 text-center">
{typeof row.qrMaster === 'boolean' ? (
<span className="text-green-500 text-2xl"></span>
) : (
<span className="text-primary-600 font-semibold">{row.qrMaster}</span>
)}
</td>
</tr>
))}
</tbody>
</table>
</Card>
</div>
</section>
{/* CTA Section */}
{/* CTA Section */}
<section className="py-24 bg-slate-900 relative overflow-hidden">
{/* Background Decorations */}
<div className="absolute top-0 right-0 -mr-20 -mt-20 w-96 h-96 bg-primary-500/20 rounded-full blur-3xl opacity-50" />
<div className="absolute bottom-0 left-0 -ml-20 -mb-20 w-80 h-80 bg-purple-500/20 rounded-full blur-3xl opacity-50" />
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-4xl text-center relative z-10">
<h2 className="text-4xl lg:text-5xl font-bold mb-6 text-white tracking-tight">
Start Tracking Your <span className="text-transparent bg-clip-text bg-gradient-to-r from-primary-400 to-purple-400">QR Codes Today</span>
</h2>
<p className="text-xl mb-10 text-slate-300 leading-relaxed max-w-2xl mx-auto">
Join thousands of businesses using QR Master to optimize their campaigns with real-time analytics.
</p>
<div className="flex flex-col sm:flex-row gap-5 justify-center">
<Link href="/signup">
<Button size="lg" className="text-lg px-8 py-6 h-auto w-full sm:w-auto bg-white text-slate-900 hover:bg-slate-50 font-bold shadow-xl shadow-primary-900/20 transition-all hover:-translate-y-1">
Create Free Account
</Button>
</Link>
<Link href="/pricing">
<Button size="lg" variant="outline" className="text-lg px-8 py-6 h-auto w-full sm:w-auto border-slate-700 text-white hover:bg-slate-800 hover:border-slate-600 transition-all">
View Pricing
</Button>
</Link>
</div>
<p className="mt-8 text-sm text-slate-500">
Full analytics accessible on free plan.
</p>
</div>
</section>
</div>
</>
);
}
import React from 'react';
import type { Metadata } from 'next';
import Link from 'next/link';
import { Button } from '@/components/ui/Button';
import { Card } from '@/components/ui/Card';
import SeoJsonLd from '@/components/SeoJsonLd';
import Breadcrumbs, { BreadcrumbItem } from '@/components/Breadcrumbs';
import { breadcrumbSchema } from '@/lib/schema';
export const metadata: Metadata = {
title: 'QR Code Tracking & Analytics - Track Every Scan | QR Master',
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior. Free QR code tracking software with detailed reports.',
keywords: 'qr code tracking, qr code analytics, track qr scans, qr code statistics, free qr tracking, qr code monitoring',
alternates: {
canonical: 'https://www.qrmaster.net/qr-code-tracking',
languages: {
'x-default': 'https://www.qrmaster.net/qr-code-tracking',
en: 'https://www.qrmaster.net/qr-code-tracking',
},
},
openGraph: {
title: 'QR Code Tracking & Analytics - Track Every Scan | QR Master',
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior.',
url: 'https://www.qrmaster.net/qr-code-tracking',
type: 'website',
},
twitter: {
title: 'QR Code Tracking & Analytics - Track Every Scan | QR Master',
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior.',
},
};
export default function QRCodeTrackingPage() {
const trackingFeatures = [
{
icon: '📊',
title: 'Real-Time Analytics',
description: 'See scan data instantly as it happens. Monitor your QR code performance in real-time with live dashboards.',
},
{
icon: '🌍',
title: 'Location Tracking',
description: 'Know exactly where your QR codes are being scanned. Track by country, city, and region.',
},
{
icon: '📱',
title: 'Device Detection',
description: 'Identify which devices scan your codes. Track iOS, Android, desktop, and browser types.',
},
{
icon: '🕐',
title: 'Time-Based Reports',
description: 'Analyze scan patterns by hour, day, week, or month. Optimize your campaigns with timing insights.',
},
{
icon: '👥',
title: 'Unique vs Total Scans',
description: 'Distinguish between unique users and repeat scans. Measure true reach and engagement.',
},
{
icon: '📈',
title: 'Campaign Performance',
description: 'Track ROI with UTM parameters. Measure conversion rates and campaign effectiveness.',
},
];
const useCases = [
{
title: 'Marketing Campaigns',
description: 'Track print ads, billboards, and product packaging to measure marketing ROI.',
benefits: ['Measure ad performance', 'A/B test campaigns', 'Track conversions'],
},
{
title: 'Event Management',
description: 'Monitor event check-ins, booth visits, and attendee engagement in real-time.',
benefits: ['Live attendance tracking', 'Booth analytics', 'Engagement metrics'],
},
{
title: 'Product Labels',
description: 'Track product authenticity scans, manual downloads, and warranty registrations.',
benefits: ['Anti-counterfeiting', 'User registration tracking', 'Product analytics'],
},
{
title: 'Restaurant Menus',
description: 'See how many customers scan your menu QR codes and when peak times occur.',
benefits: ['Customer insights', 'Peak time analysis', 'Menu engagement'],
},
];
const comparisonData = [
{ feature: 'Real-Time Analytics', free: true, qrMaster: true },
{ feature: 'Location Tracking', free: false, qrMaster: true },
{ feature: 'Device Detection', free: false, qrMaster: true },
{ feature: 'Unlimited Scans', free: false, qrMaster: true },
{ feature: 'Historical Data', free: '7 days', qrMaster: 'Unlimited' },
{ feature: 'Export Reports', free: false, qrMaster: true },
{ feature: 'API Access', free: false, qrMaster: true },
];
const softwareSchema = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
'@id': 'https://www.qrmaster.net/qr-code-tracking#software',
name: 'QR Master - QR Code Tracking & Analytics',
applicationCategory: 'BusinessApplication',
operatingSystem: 'Web Browser, iOS, Android',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
availability: 'https://schema.org/InStock',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.8',
ratingCount: '1250',
},
description: 'Track QR code scans with real-time analytics. Monitor location, device, time, and user behavior with our free QR code tracking software.',
features: [
'Real-time analytics dashboard',
'Location tracking by country and city',
'Device detection (iOS, Android, Desktop)',
'Time-based scan reports',
'Unique vs total scan tracking',
'Campaign performance metrics',
'Unlimited scans',
'Export detailed reports',
],
};
const howToSchema = {
'@context': 'https://schema.org',
'@type': 'HowTo',
'@id': 'https://www.qrmaster.net/qr-code-tracking#howto',
name: 'How to Track QR Code Scans',
description: 'Learn how to track and analyze QR code scans with real-time analytics',
totalTime: 'PT5M',
step: [
{
'@type': 'HowToStep',
position: 1,
name: 'Create QR Code',
text: 'Sign up for free and create a dynamic QR code with tracking enabled',
url: 'https://www.qrmaster.net/signup',
},
{
'@type': 'HowToStep',
position: 2,
name: 'Deploy QR Code',
text: 'Download and place your QR code on marketing materials, products, or digital platforms',
},
{
'@type': 'HowToStep',
position: 3,
name: 'Monitor Analytics',
text: 'View real-time scan data including location, device, and time patterns in your dashboard',
url: 'https://www.qrmaster.net/analytics',
},
{
'@type': 'HowToStep',
position: 4,
name: 'Optimize Campaigns',
text: 'Use insights to optimize placement, timing, and targeting of your QR code campaigns',
},
],
};
const breadcrumbItems: BreadcrumbItem[] = [
{ name: 'Home', url: '/' },
{ name: 'QR Code Tracking', url: '/qr-code-tracking' },
];
return (
<>
<SeoJsonLd data={[softwareSchema, howToSchema, breadcrumbSchema(breadcrumbItems)]} />
<div className="min-h-screen bg-white">
{/* Hero Section */}
<section className="relative overflow-hidden bg-gradient-to-br from-blue-50 via-white to-purple-50 py-20">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<Breadcrumbs items={breadcrumbItems} />
<div className="grid lg:grid-cols-2 gap-12 items-center">
<div className="space-y-8">
<div className="inline-flex items-center space-x-2 bg-blue-100 text-blue-800 px-4 py-2 rounded-full text-sm font-semibold">
<span>📊</span>
<span>Free QR Code Tracking</span>
</div>
<h1 className="text-5xl lg:text-6xl font-bold text-gray-900 leading-tight">
Track Every QR Code Scan with Powerful Analytics
</h1>
<p className="text-xl text-gray-600 leading-relaxed">
Monitor your QR code performance in real-time. Get detailed insights on location, device, time, and user behavior. Make data-driven decisions with our free tracking software.
</p>
<div className="flex flex-col sm:flex-row gap-4">
<Link href="/signup">
<Button size="lg" className="text-lg px-8 py-4 w-full sm:w-auto">
Start Tracking Free
</Button>
</Link>
<Link href="/create">
<Button variant="outline" size="lg" className="text-lg px-8 py-4 w-full sm:w-auto">
Create Trackable QR Code
</Button>
</Link>
</div>
<div className="flex items-center space-x-6 text-sm text-gray-600">
<div className="flex items-center space-x-2">
<svg className="w-5 h-5 text-green-500" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span>No credit card required</span>
</div>
<div className="flex items-center space-x-2">
<svg className="w-5 h-5 text-green-500" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span>Unlimited scans</span>
</div>
</div>
</div>
{/* Analytics Preview */}
<div className="relative">
<Card className="p-6 shadow-2xl">
<h3 className="font-semibold text-lg mb-4">Live Analytics Dashboard</h3>
<div className="space-y-4">
<div className="flex justify-between items-center pb-3 border-b">
<span className="text-gray-600">Total Scans</span>
<span className="text-2xl font-bold text-primary-600">12,547</span>
</div>
<div className="flex justify-between items-center pb-3 border-b">
<span className="text-gray-600">Unique Users</span>
<span className="text-2xl font-bold text-primary-600">8,392</span>
</div>
<div className="flex justify-between items-center pb-3 border-b">
<span className="text-gray-600">Top Location</span>
<span className="font-semibold">🇩🇪 Germany</span>
</div>
<div className="flex justify-between items-center">
<span className="text-gray-600">Top Device</span>
<span className="font-semibold">📱 iPhone</span>
</div>
</div>
</Card>
<div className="absolute -top-4 -right-4 bg-green-500 text-white px-4 py-2 rounded-full text-sm font-semibold shadow-lg animate-pulse">
Live Updates
</div>
</div>
</div>
</div>
</section>
{/* Tracking Features */}
<section className="py-20 bg-gray-50">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<div className="text-center mb-16">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
Powerful QR Code Tracking Features
</h2>
<p className="text-xl text-gray-600 max-w-3xl mx-auto">
Get complete visibility into your QR code performance with our comprehensive analytics suite
</p>
</div>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
{trackingFeatures.map((feature, index) => (
<Card key={index} className="p-6 hover:shadow-lg transition-shadow">
<div className="text-4xl mb-4">{feature.icon}</div>
<h3 className="text-xl font-semibold text-gray-900 mb-2">
{feature.title}
</h3>
<p className="text-gray-600">
{feature.description}
</p>
</Card>
))}
</div>
</div>
</section>
{/* Use Cases */}
<section className="py-20">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">
<div className="text-center mb-16">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
QR Code Tracking Use Cases
</h2>
<p className="text-xl text-gray-600 max-w-3xl mx-auto">
See how businesses use QR code tracking to improve their operations
</p>
</div>
<div className="grid md:grid-cols-2 gap-8">
{useCases.map((useCase, index) => (
<Card key={index} className="p-8">
<h3 className="text-2xl font-bold text-gray-900 mb-3">
{useCase.title}
</h3>
<p className="text-gray-600 mb-6">
{useCase.description}
</p>
<ul className="space-y-2">
{useCase.benefits.map((benefit, idx) => (
<li key={idx} className="flex items-center space-x-2">
<svg className="w-5 h-5 text-green-500 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clipRule="evenodd" />
</svg>
<span className="text-gray-700">{benefit}</span>
</li>
))}
</ul>
</Card>
))}
</div>
</div>
</section>
{/* Comparison Table */}
<section className="py-20 bg-gray-50">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-5xl">
<div className="text-center mb-16">
<h2 className="text-4xl font-bold text-gray-900 mb-4">
QR Master vs Free Tools
</h2>
<p className="text-xl text-gray-600">
See why businesses choose QR Master for QR code tracking
</p>
</div>
<Card className="overflow-hidden">
<table className="w-full">
<thead className="bg-gray-100">
<tr>
<th className="px-6 py-4 text-left text-gray-900 font-semibold">Feature</th>
<th className="px-6 py-4 text-center text-gray-900 font-semibold">Free Tools</th>
<th className="px-6 py-4 text-center text-primary-600 font-semibold">QR Master</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-200">
{comparisonData.map((row, index) => (
<tr key={index}>
<td className="px-6 py-4 text-gray-900 font-medium">{row.feature}</td>
<td className="px-6 py-4 text-center">
{typeof row.free === 'boolean' ? (
row.free ? (
<span className="text-green-500 text-2xl"></span>
) : (
<span className="text-red-500 text-2xl"></span>
)
) : (
<span className="text-gray-600">{row.free}</span>
)}
</td>
<td className="px-6 py-4 text-center">
{typeof row.qrMaster === 'boolean' ? (
<span className="text-green-500 text-2xl"></span>
) : (
<span className="text-primary-600 font-semibold">{row.qrMaster}</span>
)}
</td>
</tr>
))}
</tbody>
</table>
</Card>
</div>
</section>
{/* CTA Section */}
<section className="py-20 bg-gradient-to-r from-primary-600 to-purple-600 text-white">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-4xl text-center">
<h2 className="text-4xl font-bold mb-6">
Start Tracking Your QR Codes Today
</h2>
<p className="text-xl mb-8 text-primary-100">
Join thousands of businesses using QR Master to track and optimize their QR code campaigns
</p>
<div className="flex flex-col sm:flex-row gap-4 justify-center">
<Link href="/signup">
<Button size="lg" variant="secondary" className="text-lg px-8 py-4 w-full sm:w-auto bg-white text-primary-600 hover:bg-gray-100">
Create Free Account
</Button>
</Link>
<Link href="/pricing">
<Button size="lg" variant="outline" className="text-lg px-8 py-4 w-full sm:w-auto border-white text-white hover:bg-white/10">
View Pricing
</Button>
</Link>
</div>
</div>
</section>
</div>
</>
);
}

View File

@@ -1,117 +0,0 @@
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 */}
<section className="pt-24 pb-12 bg-white relative overflow-hidden">
<div className="container mx-auto px-4 text-center max-w-3xl relative z-10">
<div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-slate-100/80 backdrop-blur-sm border border-slate-200 text-slate-600 text-sm font-medium mb-8">
<span className="relative flex h-2 w-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2 w-2 bg-red-500"></span>
</span>
Static QR codes are costing you money
</div>
<h1 className="text-4xl lg:text-6xl font-black text-slate-900 mb-6 tracking-tight leading-[1.1]">
Stop Burning Budget on <br className="hidden md:block" />
<span className="text-transparent bg-clip-text bg-gradient-to-r from-red-500 to-orange-600">Avoidable Reprints</span>
</h1>
<p className="text-xl text-slate-600 mb-8 leading-relaxed max-w-2xl mx-auto">
Every time a URL changes, static QR codes become useless trash.
Dynamic QR codes update instantlykeeping your print materials alive forever.
</p>
<div className="flex justify-center">
<ArrowDown className="w-6 h-6 text-slate-400 animate-bounce" />
</div>
</div>
</section>
{/* Calculator Component */}
<ReprintSavingsCalculator />
{/* Value Props */}
<section className="py-24 bg-white border-t border-slate-100">
<div className="container mx-auto px-4 max-w-6xl">
<div className="text-center mb-16">
<h2 className="text-3xl font-bold text-slate-900 mb-4">
Why Smart Companies Switched Years Ago
</h2>
<p className="text-slate-600 text-lg max-w-2xl mx-auto">
The math is simple. One dynamic subscription costs less than a single batch of reprints.
</p>
</div>
<div className="grid md:grid-cols-3 gap-8 lg:gap-12">
{[
{
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) => (
<div key={i} className="group p-8 rounded-2xl bg-slate-50 border border-slate-100 hover:bg-white hover:shadow-xl hover:shadow-slate-200/50 hover:border-slate-200 transition-all duration-300">
<div className={`w-14 h-14 ${feature.bg} rounded-xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300`}>
<feature.icon className={`w-7 h-7 ${feature.color}`} />
</div>
<h3 className="text-xl font-bold text-slate-900 mb-3">{feature.title}</h3>
<p className="text-slate-600 leading-relaxed">
{feature.desc}
</p>
</div>
))}
</div>
</div>
</section>
</>
);
}

View File

@@ -14,7 +14,6 @@ import { Button } from '@/components/ui/Button';
import { Input } from '@/components/ui/Input';
import { Select } from '@/components/ui/Select';
import { cn } from '@/lib/utils';
import AdBanner from '@/components/ads/AdBanner';
// Brand Colors
const BRAND = {
@@ -138,7 +137,7 @@ export default function CryptoGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* Crypto Details */}
<div className="space-y-6">
@@ -159,7 +158,6 @@ export default function CryptoGenerator() {
if (col) setQrColor(col);
}}
className="h-12 w-full rounded-xl border-slate-200"
aria-label="Currency"
/>
</div>
@@ -211,7 +209,7 @@ export default function CryptoGenerator() {
Wallet Direct
</button>
</div>
<p className="text-xs text-slate-600 mt-2">
<p className="text-xs text-slate-500 mt-2">
{qrMode === 'universal'
? "Works with any phone camera. Opens blockchain explorer."
: "Requires scanning from a wallet app. Enables direct payment."}
@@ -253,7 +251,7 @@ export default function CryptoGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<div className="grid grid-cols-4 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -274,12 +272,13 @@ export default function CryptoGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -321,7 +320,7 @@ export default function CryptoGenerator() {
<Bitcoin className="w-4 h-4 text-slate-400 shrink-0" />
<span className="truncate capitalize">{currency}</span>
</h3>
<div className="text-xs text-slate-600 mt-1 truncate px-2">
<div className="text-xs text-slate-500 mt-1 truncate px-2">
{address || 'Wallet Address'}
</div>
</div>
@@ -346,15 +345,13 @@ export default function CryptoGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
Scanning copies the wallet address or opens a crypto app.
</p>
</div>
</div>
</div>
{/* Upsell Banner */}
<div className="mt-8 bg-gradient-to-r from-slate-900 to-slate-700 rounded-2xl p-6 flex flex-col sm:flex-row items-center justify-between gap-4">
<div className="text-white text-center sm:text-left">

View File

@@ -4,24 +4,20 @@ import CryptoGenerator from './CryptoGenerator';
import { Bitcoin, Shield, Zap, Smartphone, Wallet, Coins, Sparkles, Download, Share2 } from 'lucide-react';
import { QRCodeSVG } from 'qrcode.react';
import { ToolBreadcrumb } from '@/components/seo/BreadcrumbSchema';
import { RelatedTools } from '@/components/marketing/RelatedTools';
import { generateSoftwareAppSchema, generateFaqSchema } from '@/lib/schema-utils';
// SEO Optimized Metadata
export const metadata: Metadata = {
title: {
absolute: 'Free Crypto QR Code Generator | Krypto QR Code Erstellen | QR Master',
},
description: 'Create a QR code for your Crypto wallet address. Erstelle Bitcoin & Ethereum QR Codes für einfache Zahlungen. Supports BTC, ETH, USDT & more.',
keywords: ['crypto qr code', 'bitcoin qr generator', 'ethereum qr code', 'crypto wallet qr', 'donation qr code', 'krypto qr code', 'bitcoin qr code erstellen', 'kryptowährung qr code', 'wallet adresse qr code'],
title: 'Free Crypto QR Code Generator | Bitcoin, Ethereum & USDT | QR Master',
description: 'Create a QR code for your Crypto wallet address. Supports Bitcoin (BTC), Ethereum (ETH), USDT, and more. Essential for easy payments and donations.',
keywords: ['crypto qr code', 'bitcoin qr generator', 'ethereum qr code', 'crypto wallet qr', 'donation qr code'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/crypto-qr-code',
canonical: 'https://qrmaster.io/tools/crypto-qr-code',
},
openGraph: {
title: 'Free Crypto QR Code Generator | QR Master',
description: 'Generate QR codes to accept Crypto payments securely. Supports BTC, ETH, SOL.',
type: 'website',
url: 'https://www.qrmaster.net/tools/crypto-qr-code',
url: 'https://qrmaster.io/tools/crypto-qr-code',
images: [{ url: '/og-crypto-generator.png', width: 1200, height: 630 }],
},
twitter: {
@@ -39,12 +35,23 @@ export const metadata: Metadata = {
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
generateSoftwareAppSchema(
'Crypto QR Code Generator',
'Generate QR codes that contain your cryptocurrency wallet address for easy payments.',
'/og-crypto-generator.png',
'FinanceApplication'
),
{
'@type': 'SoftwareApplication',
name: 'Crypto QR Code Generator',
applicationCategory: 'FinanceApplication',
operatingSystem: 'Web Browser',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.9',
ratingCount: '870',
},
description: 'Generate QR codes that contain your cryptocurrency wallet address for easy payments.',
},
{
'@type': 'HowTo',
name: 'How to Create a Crypto QR Code',
@@ -83,28 +90,51 @@ const jsonLd = {
],
totalTime: 'PT30S',
},
generateFaqSchema({
'Is it safe to share my wallet address?': {
question: 'Is it safe to share my wallet address?',
answer: 'Yes. Your public wallet address is designed to be shared so you can receive funds. Never share your private key.',
},
'Which currencies are supported?': {
question: 'Which currencies are supported?',
answer: 'Our generator supports standard URI schemes for Bitcoin, Ethereum, Solana, and can generally store any wallet string for other coins.',
},
'Can I add a specific amount?': {
question: 'Can I add a specific amount?',
answer: 'Yes, you can pre-fill an amount so when the user scans, their wallet app automatically suggests the correct payment value.',
},
'Does it work with all wallets?': {
question: 'Does it work with all wallets?',
answer: 'Yes, standard crypto QR codes are universally readable by almost all modern wallet apps (Coinbase, MetaMask, Trust Wallet, etc.).',
},
'Are there any fees?': {
question: 'Are there any fees?',
answer: 'No. This generator is completely free. We do not charge any fees for generating codes or for the transactions made using them.',
},
}),
{
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'Is it safe to share my wallet address?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes. Your public wallet address is designed to be shared so you can receive funds. Never share your private key.',
},
},
{
'@type': 'Question',
name: 'Which currencies are supported?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Our generator supports standard URI schemes for Bitcoin, Ethereum, Solana, and can generally store any wallet string for other coins.',
},
},
{
'@type': 'Question',
name: 'Can I add a specific amount?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes, you can pre-fill an amount so when the user scans, their wallet app automatically suggests the correct payment value.',
},
},
{
'@type': 'Question',
name: 'Does it work with all wallets?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes, standard crypto QR codes are universally readable by almost all modern wallet apps (Coinbase, MetaMask, Trust Wallet, etc.).',
},
},
{
'@type': 'Question',
name: 'Are there any fees?',
acceptedAnswer: {
'@type': 'Answer',
text: 'No. This generator is completely free. We do not charge any fees for generating codes or for the transactions made using them.',
},
},
],
},
],
};
@@ -273,9 +303,6 @@ export default function CryptoQRCodePage() {
</div>
</section>
{/* RELATED TOOLS */}
<RelatedTools />
{/* FAQ SECTION */}
<section className="py-16 px-4 sm:px-6 lg:px-8" style={{ backgroundColor: '#EBEBDF' }}>
<div className="max-w-3xl mx-auto">

View File

@@ -107,7 +107,7 @@ export default function EmailGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* Input Fields */}
<div className="space-y-6">
@@ -192,7 +192,7 @@ export default function EmailGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<div className="grid grid-cols-4 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -213,12 +213,13 @@ export default function EmailGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -272,7 +273,7 @@ export default function EmailGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
100% free. No signup required.
</p>
</div>

View File

@@ -4,24 +4,20 @@ import EmailGenerator from './EmailGenerator';
import { Mail, Zap, Smartphone, Lock, Download, Sparkles } from 'lucide-react';
import { QRCodeSVG } from 'qrcode.react';
import { ToolBreadcrumb } from '@/components/seo/BreadcrumbSchema';
import { RelatedTools } from '@/components/marketing/RelatedTools';
import { generateSoftwareAppSchema, generateFaqSchema } from '@/lib/schema-utils';
// SEO Optimized Metadata
export const metadata: Metadata = {
title: {
absolute: 'Free Email QR Code Generator | Email QR Code Erstellen | QR Master',
},
description: 'Create an Email QR code to send emails instantly. Email QR Code erstellen mit Betreff und Text. 100% free and secure.',
keywords: ['email qr code', 'mailto qr', 'email generator', 'free qr code', 'email qr code erstellen', 'email schreiben qr code', 'qr code für email', 'mailto qr code generator', 'email vorlage qr code'],
title: 'Free Email QR Code Generator | Mailto QR | QR Master',
description: 'Create an Email QR code to send emails instantly. Pre-fill subject and body. 100% free and client-side secure.',
keywords: ['email qr code', 'mailto qr', 'email generator', 'free qr code'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/email-qr-code',
canonical: 'https://qrmaster.io/tools/email-qr-code',
},
openGraph: {
title: 'Free Email QR Code Generator | QR Master',
description: 'Send emails instantly with a custom QR code. Add recipient, subject, and body.',
type: 'website',
url: 'https://www.qrmaster.net/tools/email-qr-code',
url: 'https://qrmaster.io/tools/email-qr-code',
images: [{ url: '/og-email-generator.png', width: 1200, height: 630 }],
},
};
@@ -30,11 +26,14 @@ export const metadata: Metadata = {
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
generateSoftwareAppSchema(
'Email QR Code Generator',
'Generate Email QR codes for mailto links with subject and body.',
'/og-email-generator.png'
),
{
'@type': 'SoftwareApplication',
name: 'Email QR Code Generator',
applicationCategory: 'UtilitiesApplication',
operatingSystem: 'Web Browser',
offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
description: 'Generate Email QR codes for mailto links with subject and body.',
},
{
'@type': 'HowTo',
name: 'How to Create an Email QR Code',
@@ -47,28 +46,36 @@ const jsonLd = {
],
totalTime: 'PT30S',
},
generateFaqSchema({
'How does it work?': {
question: 'How does it work?',
answer: 'When scanned, it opens the user\'s default email app (like Gmail or Outlook) with a new draft composed to your address.',
},
'Can I add a subject line?': {
question: 'Can I add a subject line?',
answer: 'Yes! You can pre-fill the subject line and the body content so the sender just has to hit send.',
},
'Is it free?': {
question: 'Is it free?',
answer: 'Yes, 100% free with unlimited scans.',
},
'Does it work with attachments?': {
question: 'Does it work with attachments?',
answer: 'No. The standard mailto format does not support attaching files automatically. Users will have to attach files manually.',
},
'Is it private?': {
question: 'Is it private?',
answer: 'Yes. The data is encoded directly into the QR code. We do not store your email or message data.',
},
}),
{
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'How does it work?',
acceptedAnswer: { '@type': 'Answer', text: 'When scanned, it opens the user\'s default email app (like Gmail or Outlook) with a new draft composed to your address.' }
},
{
'@type': 'Question',
name: 'Can I add a subject line?',
acceptedAnswer: { '@type': 'Answer', text: 'Yes! You can pre-fill the subject line and the body content so the sender just has to hit send.' }
},
{
'@type': 'Question',
name: 'Is it free?',
acceptedAnswer: { '@type': 'Answer', text: 'Yes, 100% free with unlimited scans.' }
},
{
'@type': 'Question',
name: 'Does it work with attachments?',
acceptedAnswer: { '@type': 'Answer', text: 'No. The standard mailto format does not support attaching files automatically. Users will have to attach files manually.' }
},
{
'@type': 'Question',
name: 'Is it private?',
acceptedAnswer: { '@type': 'Answer', text: 'Yes. The data is encoded directly into the QR code. We do not store your email or message data.' }
}
]
}
]
};
@@ -224,9 +231,6 @@ export default function EmailPage() {
</div>
</section>
{/* RELATED TOOLS */}
<RelatedTools />
{/* FAQ SECTION */}
<section className="py-16 px-4 sm:px-6 lg:px-8" style={{ backgroundColor: '#EBEBDF' }}>
<div className="max-w-3xl mx-auto">

View File

@@ -117,7 +117,7 @@ export default function EventGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* Event Details */}
<div className="space-y-6">
@@ -221,7 +221,7 @@ export default function EventGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<div className="grid grid-cols-4 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -242,12 +242,13 @@ export default function EventGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -277,7 +278,7 @@ export default function EventGenerator() {
<span className="truncate">{title || 'Event Title'}</span>
</h3>
{(startDate) && (
<div className="text-xs text-slate-600 mt-1 flex items-center justify-center gap-1">
<div className="text-xs text-slate-500 mt-1 flex items-center justify-center gap-1">
<Clock className="w-3 h-3" />
{new Date(startDate).toLocaleDateString()}
</div>
@@ -304,7 +305,7 @@ export default function EventGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
Scanning adds the event to the user's calendar.
</p>
</div>

View File

@@ -4,24 +4,20 @@ import EventGenerator from './EventGenerator';
import { Calendar, Shield, Zap, Smartphone, Clock, UserCheck, Download, Share2, Check } from 'lucide-react';
import { QRCodeSVG } from 'qrcode.react';
import { ToolBreadcrumb } from '@/components/seo/BreadcrumbSchema';
import { RelatedTools } from '@/components/marketing/RelatedTools';
import { generateSoftwareAppSchema, generateFaqSchema } from '@/lib/schema-utils';
// SEO Optimized Metadata
export const metadata: Metadata = {
title: {
absolute: 'Free Event QR Code Generator | Termin & Kalender QR | QR Master',
},
description: 'Create a QR code for your event. Verabredung & Termine direkt in den Kalender speichern. Save the date instantly. Free & Easy.',
keywords: ['event qr code', 'calendar qr code', 'save the date qr', 'ical qr generator', 'invitation qr code', 'event qr code erstellen', 'veranstaltung qr code', 'kalender qr code', 'termin qr code', 'save the date qr code'],
title: 'Free Event QR Code Generator | Add to Calendar | QR Master',
description: 'Create a QR code for your event. Scanners can instantly save the date, time, and location to their phone calendar. Perfect for invitations and flyers.',
keywords: ['event qr code', 'calendar qr code', 'save the date qr', 'ical qr generator', 'invitation qr code'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/event-qr-code',
canonical: 'https://qrmaster.io/tools/event-qr-code',
},
openGraph: {
title: 'Free Event QR Code Generator | QR Master',
description: 'Generate QR codes to save events to calendars. Share dates easily.',
type: 'website',
url: 'https://www.qrmaster.net/tools/event-qr-code',
url: 'https://qrmaster.io/tools/event-qr-code',
images: [{ url: '/og-event-generator.png', width: 1200, height: 630 }],
},
twitter: {
@@ -39,11 +35,23 @@ export const metadata: Metadata = {
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
generateSoftwareAppSchema(
'Event QR Code Generator',
'Generate QR codes that add event details to the user\'s digital calendar.',
'/og-event-generator.png'
),
{
'@type': 'SoftwareApplication',
name: 'Event QR Code Generator',
applicationCategory: 'UtilitiesApplication',
operatingSystem: 'Web Browser',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.8',
ratingCount: '760',
},
description: 'Generate QR codes that add event details to the user\'s digital calendar.',
},
{
'@type': 'HowTo',
name: 'How to Create an Event QR Code',
@@ -82,28 +90,51 @@ const jsonLd = {
],
totalTime: 'PT45S',
},
generateFaqSchema({
'Which calendars does it support?': {
question: 'Which calendars does it support?',
answer: 'The QR code uses the standard iCalendar (ICS) format. It works with Apple Calendar, Google Calendar, Outlook, and most other mobile calendar apps.',
},
'Can I change the date after printing?': {
question: 'Can I change the date after printing?',
answer: 'No. This is a static QR code, meaning the event details are permanently embedded in the image. If the date changes, you must create a new QR code. Use our Dynamic QR Code to edit events anytime.',
},
'Is there a limit to the description length?': {
question: 'Is there a limit to the description length?',
answer: 'Yes, because the data is stored in the QR code pattern. We recommend keeping descriptions concise (under 300 characters) to ensure the code remains easy to scan.',
},
'Do users need an app?': {
question: 'Do users need an app?',
answer: 'No special app is needed. Standard camera apps on iOS and Android can read the code and will prompt the user to "Add to Calendar".',
},
'Is it free?': {
question: 'Is it free?',
answer: 'Yes. Creating and scanning the code is completely free and requires no signup.',
},
}),
{
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'Which calendars does it support?',
acceptedAnswer: {
'@type': 'Answer',
text: 'The QR code uses the standard iCalendar (ICS) format. It works with Apple Calendar, Google Calendar, Outlook, and most other mobile calendar apps.',
},
},
{
'@type': 'Question',
name: 'Can I change the date after printing?',
acceptedAnswer: {
'@type': 'Answer',
text: 'No. This is a static QR code, meaning the event details are permanently embedded in the image. If the date changes, you must create a new QR code. Use our Dynamic QR Code to edit events anytime.',
},
},
{
'@type': 'Question',
name: 'Is there a limit to the description length?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes, because the data is stored in the QR code pattern. We recommend keeping descriptions concise (under 300 characters) to ensure the code remains easy to scan.',
},
},
{
'@type': 'Question',
name: 'Do users need an app?',
acceptedAnswer: {
'@type': 'Answer',
text: 'No special app is needed. Standard camera apps on iOS and Android can read the code and will prompt the user to "Add to Calendar".',
},
},
{
'@type': 'Question',
name: 'Is it free?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes. Creating and scanning the code is completely free and requires no signup.',
},
},
],
},
],
};
@@ -267,9 +298,6 @@ export default function EventQRCodePage() {
</div>
</section>
{/* RELATED TOOLS */}
<RelatedTools />
{/* FAQ SECTION */}
<section className="py-16 px-4 sm:px-6 lg:px-8" style={{ backgroundColor: '#EBEBDF' }}>
<div className="max-w-3xl mx-auto">

View File

@@ -88,7 +88,7 @@ export default function FacebookGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* Facebook Details */}
<div className="space-y-6">
@@ -105,7 +105,7 @@ export default function FacebookGenerator() {
onChange={(e) => setUrl(e.target.value)}
className="h-12 text-base rounded-xl border-slate-200 focus:border-[#1877F2] focus:ring-[#1877F2]"
/>
<p className="text-xs text-slate-600 mt-2">Paste the full link to your profile, page, group, or post.</p>
<p className="text-xs text-slate-500 mt-2">Paste the full link to your profile, page, group, or post.</p>
</div>
</div>
@@ -143,7 +143,7 @@ export default function FacebookGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<div className="grid grid-cols-4 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -164,12 +164,13 @@ export default function FacebookGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -198,7 +199,7 @@ export default function FacebookGenerator() {
<Facebook className="w-4 h-4 text-slate-400 shrink-0" />
<span className="truncate">{url ? url.replace('https://', '') : 'facebook.com/...'}</span>
</h3>
<div className="text-xs text-slate-600 mt-1">Opens in Facebook App</div>
<div className="text-xs text-slate-500 mt-1">Opens in Facebook App</div>
</div>
</div>
@@ -221,7 +222,7 @@ export default function FacebookGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
Scanning redirects directly to the Facebook profile or page.
</p>
</div>

View File

@@ -4,24 +4,20 @@ import FacebookGenerator from './FacebookGenerator';
import { Facebook, Shield, Zap, Smartphone, ThumbsUp, Users, Download, Share2 } from 'lucide-react';
import { QRCodeSVG } from 'qrcode.react';
import { ToolBreadcrumb } from '@/components/seo/BreadcrumbSchema';
import { RelatedTools } from '@/components/marketing/RelatedTools';
import { generateSoftwareAppSchema, generateFaqSchema } from '@/lib/schema-utils';
// SEO Optimized Metadata
export const metadata: Metadata = {
title: {
absolute: 'Free Facebook QR Code Generator | Get Likes & Follows | QR Master',
},
description: 'Create a QR code for your Facebook Page, Profile, or Group. Facebook QR Code erstellen. Scanners follow you instantly. Free & Easy.',
keywords: ['facebook qr code', 'fb qr generator', 'facebook page qr', 'follow qr code', 'social media qr code', 'facebook qr code erstellen', 'facebook seite qr code', 'facebook gruppe qr code', 'facebook profil qr code', 'mehr likes qr code'],
title: 'Free Facebook QR Code Generator | Get Likes & Follows | QR Master',
description: 'Create a QR code for your Facebook Page, Profile, or Group. Scanners are redirected to the Facebook app instantly to like and follow. Free & Easy.',
keywords: ['facebook qr code', 'fb qr generator', 'facebook page qr', 'follow qr code', 'social media qr code'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/facebook-qr-code',
canonical: 'https://qrmaster.io/tools/facebook-qr-code',
},
openGraph: {
title: 'Free Facebook QR Code Generator | QR Master',
description: 'Generate QR codes to grow your Facebook audience. Instant app redirect.',
type: 'website',
url: 'https://www.qrmaster.net/tools/facebook-qr-code',
url: 'https://qrmaster.io/tools/facebook-qr-code',
images: [{ url: '/og-facebook-generator.png', width: 1200, height: 630 }],
},
twitter: {
@@ -39,11 +35,23 @@ export const metadata: Metadata = {
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
generateSoftwareAppSchema(
'Facebook QR Code Generator',
'Generate QR codes that direct users to a Facebook page, profile, or post.',
'/og-facebook-generator.png'
),
{
'@type': 'SoftwareApplication',
name: 'Facebook QR Code Generator',
applicationCategory: 'UtilitiesApplication',
operatingSystem: 'Web Browser',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.8',
ratingCount: '1120',
},
description: 'Generate QR codes that direct users to a Facebook page, profile, or post.',
},
{
'@type': 'HowTo',
name: 'How to Create a Facebook QR Code',
@@ -82,28 +90,51 @@ const jsonLd = {
],
totalTime: 'PT30S',
},
generateFaqSchema({
'Does it open the Facebook app?': {
question: 'Does it open the Facebook app?',
answer: 'Yes! On most mobile devices, standard Facebook links are automatically detected and opened in the Facebook app if it is installed.',
},
'Can I link to a specific post?': {
question: 'Can I link to a specific post?',
answer: 'Absolutely. Just paste the direct link to the post (click the timestamp on the post to get the link).',
},
'Does it work for Facebook Events?': {
question: 'Does it work for Facebook Events?',
answer: 'Yes. Simply copy the full URL of your Facebook Event and paste it into the generator.',
},
'Is it free?': {
question: 'Is it free?',
answer: 'Yes, this generator is 100% free to use for personal or business purposes.',
},
'Can I track scans?': {
question: 'Can I track scans?',
answer: 'This static QR code does not include analytics. To track how many people scan your code, you should use our Dynamic QR Code service.',
},
}),
{
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'Does it open the Facebook app?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes! On most mobile devices, standard Facebook links are automatically detected and opened in the Facebook app if it is installed.',
},
},
{
'@type': 'Question',
name: 'Can I link to a specific post?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Absolutely. Just paste the direct link to the post (click the timestamp on the post to get the link).',
},
},
{
'@type': 'Question',
name: 'Does it work for Facebook Events?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes. Simply copy the full URL of your Facebook Event and paste it into the generator.',
},
},
{
'@type': 'Question',
name: 'Is it free?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes, this generator is 100% free to use for personal or business purposes.',
},
},
{
'@type': 'Question',
name: 'Can I track scans?',
acceptedAnswer: {
'@type': 'Answer',
text: 'This static QR code does not include analytics. To track how many people scan your code, you should use our Dynamic QR Code service.',
},
},
],
},
],
};
@@ -275,9 +306,6 @@ export default function FacebookQRCodePage() {
</div>
</section>
{/* RELATED TOOLS */}
<RelatedTools />
{/* FAQ SECTION */}
<section className="py-16 px-4 sm:px-6 lg:px-8" style={{ backgroundColor: '#EBEBDF' }}>
<div className="max-w-3xl mx-auto">

View File

@@ -108,7 +108,7 @@ export default function GeolocationGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* Location Details */}
<div className="space-y-6">
@@ -148,7 +148,7 @@ export default function GeolocationGenerator() {
/>
</div>
</div>
<p className="text-xs text-slate-600">
<p className="text-xs text-slate-500">
Tip: You can copy-paste coordinates directly from Google Maps.
(Right-click a location on standard Maps, then click the coordinates to copy).
</p>
@@ -188,7 +188,7 @@ export default function GeolocationGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<div className="grid grid-cols-4 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -209,12 +209,13 @@ export default function GeolocationGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -243,7 +244,7 @@ export default function GeolocationGenerator() {
<MapPin className="w-4 h-4 text-[#10B981] shrink-0" />
<span className="truncate">{latitude || 'Lat'}, {longitude || 'Long'}</span>
</h3>
<div className="text-xs text-slate-600 mt-1">Google Maps Location</div>
<div className="text-xs text-slate-500 mt-1">Google Maps Location</div>
</div>
</div>
@@ -266,7 +267,7 @@ export default function GeolocationGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
Scanning opens the location directly in Google Maps.
</p>
</div>

View File

@@ -4,24 +4,20 @@ import GeolocationGenerator from './GeolocationGenerator';
import { MapPin, Shield, Zap, Smartphone, Navigation, Map, Download, Share2 } from 'lucide-react';
import { QRCodeSVG } from 'qrcode.react';
import { ToolBreadcrumb } from '@/components/seo/BreadcrumbSchema';
import { RelatedTools } from '@/components/marketing/RelatedTools';
import { generateSoftwareAppSchema, generateFaqSchema } from '@/lib/schema-utils';
// SEO Optimized Metadata
export const metadata: Metadata = {
title: {
absolute: 'Free Geolocation QR Code Generator | Standort & Map Links | QR Master',
},
description: 'Create a QR code for a specific location. Erstelle einen Map QR Code für Google Maps. Coordinates & Directions instantly. Standort teilen leicht gemacht.',
keywords: ['location qr code', 'maps qr code', 'google maps qr generator', 'geolocation qr', 'coordinates qr code', 'standort qr code', 'google maps qr code erstellen', 'koordinaten qr code', 'wegbeschreibung qr code', 'maps qr code generator'],
title: 'Free Geolocation QR Code Generator | Maps & Directions | QR Master',
description: 'Create a QR code for a specific location using Latitude and Longitude. Scanners will open Google Maps directly to your pin. Free & Precise.',
keywords: ['location qr code', 'maps qr code', 'google maps qr generator', 'geolocation qr', 'coordinates qr code'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/geolocation-qr-code',
canonical: 'https://qrmaster.io/tools/geolocation-qr-code',
},
openGraph: {
title: 'Free Geolocation QR Code Generator | QR Master',
description: 'Navigate users to any location with a QR code. Opens directly in Google Maps.',
type: 'website',
url: 'https://www.qrmaster.net/tools/geolocation-qr-code',
url: 'https://qrmaster.io/tools/geolocation-qr-code',
images: [{ url: '/og-geolocation-generator.png', width: 1200, height: 630 }],
},
twitter: {
@@ -39,11 +35,23 @@ export const metadata: Metadata = {
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
generateSoftwareAppSchema(
'Geolocation QR Code Generator',
'Generate QR codes that open specific geographic coordinates in map applications.',
'/og-geolocation-generator.png'
),
{
'@type': 'SoftwareApplication',
name: 'Geolocation QR Code Generator',
applicationCategory: 'UtilitiesApplication',
operatingSystem: 'Web Browser',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.7',
ratingCount: '890',
},
description: 'Generate QR codes that open specific geographic coordinates in map applications.',
},
{
'@type': 'HowTo',
name: 'How to Create a Location QR Code',
@@ -82,28 +90,51 @@ const jsonLd = {
],
totalTime: 'PT45S',
},
generateFaqSchema({
'Which map app does it open?': {
question: 'Which map app does it open?',
answer: 'Our generator creates a universal Google Maps link. On most devices, this will open the Google Maps app if installed, or the browser version if not. It is the most compatible method.',
},
'How do I find my Latitude and Longitude?': {
question: 'How do I find my Latitude and Longitude?',
answer: 'On Google Maps desktop: Right-click any spot on the map. The first item in the menu is the coordinates. Click to copy them.',
},
'Does it work offline?': {
question: 'Does it work offline?',
answer: 'The QR code itself can be scanned offline, but the user will likely need an internet connection to load the map and get directions.',
},
'Can I use an address instead?': {
question: 'Can I use an address instead?',
answer: 'For precise results, we use coordinates. However, you can use our URL Generator and paste a link to your Google Maps address search result if you prefer.',
},
'Is it free?': {
question: 'Is it free?',
answer: 'Yes, generating this location QR code is completely free and requires no signup.',
},
}),
{
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'Which map app does it open?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Our generator creates a universal Google Maps link. On most devices, this will open the Google Maps app if installed, or the browser version if not. It is the most compatible method.',
},
},
{
'@type': 'Question',
name: 'How do I find my Latitude and Longitude?',
acceptedAnswer: {
'@type': 'Answer',
text: 'On Google Maps desktop: Right-click any spot on the map. The first item in the menu is the coordinates. Click to copy them.',
},
},
{
'@type': 'Question',
name: 'Does it work offline?',
acceptedAnswer: {
'@type': 'Answer',
text: 'The QR code itself can be scanned offline, but the user will likely need an internet connection to load the map and get directions.',
},
},
{
'@type': 'Question',
name: 'Can I use an address instead?',
acceptedAnswer: {
'@type': 'Answer',
text: 'For precise results, we use coordinates. However, you can use our URL Generator and paste a link to your Google Maps address search result if you prefer.',
},
},
{
'@type': 'Question',
name: 'Is it free?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes, generating this location QR code is completely free and requires no signup.',
},
},
],
},
],
};
@@ -180,7 +211,7 @@ export default function GeolocationQRCodePage() {
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2">
<MapPin className="w-8 h-8 text-red-500 drop-shadow-lg animate-bounce" />
</div>
<div className="absolute bottom-2 left-2 right-2 bg-white/90 p-2 rounded text-[10px] text-slate-600 font-mono text-center">
<div className="absolute bottom-2 left-2 right-2 bg-white/90 p-2 rounded text-[10px] text-slate-500 font-mono text-center">
40.7128° N, 74.0060° W
</div>
</div>
@@ -270,9 +301,6 @@ export default function GeolocationQRCodePage() {
</div>
</section>
{/* RELATED TOOLS */}
<RelatedTools />
{/* FAQ SECTION */}
<section className="py-16 px-4 sm:px-6 lg:px-8" style={{ backgroundColor: '#EBEBDF' }}>
<div className="max-w-3xl mx-auto">

View File

@@ -93,7 +93,7 @@ export default function InstagramGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* Instagram Details */}
<div className="space-y-6">
@@ -110,7 +110,7 @@ export default function InstagramGenerator() {
onChange={(e) => setUsername(e.target.value)}
className="h-12 text-base rounded-xl border-slate-200 focus:border-[#E1306C] focus:ring-[#E1306C]"
/>
<p className="text-xs text-slate-600 mt-2">Enter your username (without @) or paste full profile link.</p>
<p className="text-xs text-slate-500 mt-2">Enter your username (without @) or paste full profile link.</p>
</div>
</div>
@@ -148,7 +148,7 @@ export default function InstagramGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<div className="grid grid-cols-4 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -169,12 +169,13 @@ export default function InstagramGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -203,7 +204,7 @@ export default function InstagramGenerator() {
<Instagram className="w-4 h-4 text-slate-400 shrink-0" />
<span className="truncate">{username || '@username'}</span>
</h3>
<div className="text-xs text-slate-600 mt-1">Opens in Instagram</div>
<div className="text-xs text-slate-500 mt-1">Opens in Instagram</div>
</div>
</div>
@@ -226,7 +227,7 @@ export default function InstagramGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
Scanning redirects directly to your Instagram profile.
</p>
</div>

View File

@@ -4,24 +4,20 @@ import InstagramGenerator from './InstagramGenerator';
import { Instagram, Shield, Zap, Smartphone, Camera, Heart, Download, Share2 } from 'lucide-react';
import { QRCodeSVG } from 'qrcode.react';
import { ToolBreadcrumb } from '@/components/seo/BreadcrumbSchema';
import { RelatedTools } from '@/components/marketing/RelatedTools';
import { generateSoftwareAppSchema, generateFaqSchema } from '@/lib/schema-utils';
// SEO Optimized Metadata
export const metadata: Metadata = {
title: {
absolute: 'Free Instagram QR Code Generator | Get More Followers | QR Master',
},
description: 'Create a QR code for your Instagram profile. Erstelle einen Insta QR Code. Scanners follow you instantly. Free & Customizable.',
keywords: ['instagram qr code', 'insta qr generator', 'ig nametag generator', 'instagram follow qr', 'social media qr code', 'instagram qr code erstellen', 'instagram profil qr code', 'insta qr code', 'mehr follower qr code', 'instagram nametag generator'],
title: 'Free Instagram QR Code Generator | Get More Followers | QR Master',
description: 'Create a QR code for your Instagram profile or post. Scanners are redirected to the Instagram app instantly to follow you. Free & Customizable.',
keywords: ['instagram qr code', 'insta qr generator', 'ig nametag generator', 'instagram follow qr', 'social media qr code'],
alternates: {
canonical: 'https://www.qrmaster.net/tools/instagram-qr-code',
canonical: 'https://qrmaster.io/tools/instagram-qr-code',
},
openGraph: {
title: 'Free Instagram QR Code Generator | QR Master',
description: 'Generate QR codes to grow your Instagram following. Instant app redirect.',
type: 'website',
url: 'https://www.qrmaster.net/tools/instagram-qr-code',
url: 'https://qrmaster.io/tools/instagram-qr-code',
images: [{ url: '/og-instagram-generator.png', width: 1200, height: 630 }],
},
twitter: {
@@ -39,11 +35,23 @@ export const metadata: Metadata = {
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
generateSoftwareAppSchema(
'Instagram QR Code Generator',
'Generate QR codes that direct users to an Instagram profile or post.',
'/og-instagram-generator.png'
),
{
'@type': 'SoftwareApplication',
name: 'Instagram QR Code Generator',
applicationCategory: 'UtilitiesApplication',
operatingSystem: 'Web Browser',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: '4.9',
ratingCount: '2150',
},
description: 'Generate QR codes that direct users to an Instagram profile or post.',
},
{
'@type': 'HowTo',
name: 'How to Create an Instagram QR Code',
@@ -82,28 +90,51 @@ const jsonLd = {
],
totalTime: 'PT30S',
},
generateFaqSchema({
'Is this an Instagram Nametag?': {
question: 'Is this an Instagram Nametag?',
answer: 'It works similarly! While Instagram has its own internal "Nametag" or "QR Code" feature, our generator allows you to create a standard QR code that is more customizable and can be tracked with our Dynamic plans.',
},
'Does it open the Instagram app?': {
question: 'Does it open the Instagram app?',
answer: 'Yes. When scanned on a mobile device with Instagram installed, it will deep-link directly to the profile in the app.',
},
'Can I link to a specific photo or reel?': {
question: 'Can I link to a specific photo or reel?',
answer: 'Yes! Instead of your username, just paste the full link to the specific post or reel.',
},
'Is it free?': {
question: 'Is it free?',
answer: 'Yes, generating this QR code is 100% free.',
},
'Can I track scans?': {
question: 'Can I track scans?',
answer: 'Not with this static tool. If you need scan analytics, consider using our Dynamic QR Code solution.',
},
}),
{
'@type': 'FAQPage',
mainEntity: [
{
'@type': 'Question',
name: 'Is this an Instagram Nametag?',
acceptedAnswer: {
'@type': 'Answer',
text: 'It works similarly! While Instagram has its own internal "Nametag" or "QR Code" feature, our generator allows you to create a standard QR code that is more customizable and can be tracked with our Dynamic plans.',
},
},
{
'@type': 'Question',
name: 'Does it open the Instagram app?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes. When scanned on a mobile device with Instagram installed, it will deep-link directly to the profile in the app.',
},
},
{
'@type': 'Question',
name: 'Can I link to a specific photo or reel?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes! Instead of your username, just paste the full link to the specific post or reel.',
},
},
{
'@type': 'Question',
name: 'Is it free?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Yes, generating this QR code is 100% free.',
},
},
{
'@type': 'Question',
name: 'Can I track scans?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Not with this static tool. If you need scan analytics, consider using our Dynamic QR Code solution.',
},
},
],
},
],
};
@@ -264,8 +295,6 @@ export default function InstagramQRCodePage() {
</div>
</section>
<RelatedTools />
{/* FAQ SECTION */}
<section className="py-16 px-4 sm:px-6 lg:px-8" style={{ backgroundColor: '#EBEBDF' }}>
<div className="max-w-3xl mx-auto">

View File

@@ -1,37 +0,0 @@
'use client';
import React from 'react';
import Script from 'next/script';
import AdBanner from '@/components/ads/AdBanner';
export default function ToolsLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<div className="flex flex-col min-h-screen">
{/* AdSense script - only loads on tool pages */}
<Script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2782770414424875"
crossOrigin="anonymous"
strategy="lazyOnload"
/>
<div className="flex-grow relative">
{children}
</div>
{/* Footer Ad Placement - Appears on ALL tool pages */}
{/* AdBanner handles its own visibility - only shows when an ad is filled */}
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl pb-8">
<AdBanner
dataAdSlot="1234567890" // Placeholder
dataAdFormat="auto"
fullWidthResponsive={true}
className="bg-slate-50 rounded-xl p-4 border border-slate-100"
/>
</div>
</div>
);
}

View File

@@ -129,7 +129,7 @@ export default function PayPalGenerator() {
<div className="grid lg:grid-cols-2">
{/* LEFT: Input Section */}
<div className="p-6 md:p-8 lg:p-10 space-y-8 border-r border-slate-100">
<div className="p-8 lg:p-10 space-y-8 border-r border-slate-100">
{/* PayPal Details */}
<div className="space-y-6">
@@ -171,7 +171,7 @@ export default function PayPalGenerator() {
onChange={(e) => setPaypalId(e.target.value)}
className="h-12 text-base rounded-xl border-slate-200 focus:border-[#003087] focus:ring-[#003087]"
/>
<p className="text-xs text-slate-600 mt-2">
<p className="text-xs text-slate-500 mt-2">
{inputType === 'username'
? <>Find yours at <a href="https://paypal.me" target="_blank" rel="noopener noreferrer" className="text-[#003087] underline">paypal.me</a></>
: 'The email address linked to your PayPal account'
@@ -196,7 +196,6 @@ export default function PayPalGenerator() {
value={currency}
onChange={(e) => setCurrency(e.target.value)}
className="h-12 rounded-xl border-slate-200"
aria-label="Currency"
options={CURRENCIES}
/>
</div>
@@ -238,7 +237,7 @@ export default function PayPalGenerator() {
{/* Frame Selector */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-3">Frame Label</label>
<div className="grid grid-cols-2 sm:grid-cols-5 gap-2">
<div className="grid grid-cols-5 gap-2">
{FRAME_OPTIONS.map((frame) => (
<button
key={frame.id}
@@ -259,12 +258,13 @@ export default function PayPalGenerator() {
</div>
{/* RIGHT: Preview Section */}
<div className="p-6 md:p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
<div className="p-8 lg:p-10 flex flex-col items-center justify-center" style={{ backgroundColor: BRAND.paleGrey }}>
{/* QR Card with Frame */}
<div
ref={qrRef}
className="bg-white rounded-3xl shadow-xl p-6 sm:p-8 flex flex-col items-center w-full max-w-[320px]"
className="bg-white rounded-3xl shadow-xl p-8 flex flex-col items-center"
style={{ minWidth: '320px' }}
>
{/* Frame Label */}
{getFrameLabel() && (
@@ -294,7 +294,7 @@ export default function PayPalGenerator() {
<span className="truncate">{paypalId || 'Your PayPal'}</span>
</h3>
{amount && (
<p className="text-sm text-slate-600 mt-1">{amount} {currency}</p>
<p className="text-sm text-slate-500 mt-1">{amount} {currency}</p>
)}
</div>
</div>
@@ -318,7 +318,7 @@ export default function PayPalGenerator() {
</Button>
</div>
<p className="text-xs text-slate-600 mt-4 text-center">
<p className="text-xs text-slate-500 mt-4 text-center">
Your PayPal link is encoded directly. Static and forever free.
</p>
</div>

Some files were not shown because too many files have changed in this diff Show More