diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index da00a83..9dd25a9 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -112,6 +112,10 @@ enum ContentType {
SMS
TEXT
WHATSAPP
+ PDF
+ APP
+ COUPON
+ FEEDBACK
}
enum QRStatus {
diff --git a/src/app/(app)/create/page.tsx b/src/app/(app)/create/page.tsx
index 8dc134b..4414184 100644
--- a/src/app/(app)/create/page.tsx
+++ b/src/app/(app)/create/page.tsx
@@ -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
+} from 'lucide-react';
+
+// Tooltip component for form field help
+const Tooltip = ({ text }: { text: string }) => (
+
+);
// 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' }];
}
@@ -102,10 +124,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 +154,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 +432,139 @@ export default function CreatePage() {
/>
);
+ case 'PDF':
+ return (
+ <>
+
+
+
+
+
+
setContent({ ...content, fileUrl: e.target.value })}
+ placeholder="https://drive.google.com/file/d/.../view"
+ required
+ />
+
+ setContent({ ...content, fileName: e.target.value })}
+ placeholder="Product Catalog 2026"
+ />
+ >
+ );
+ case 'APP':
+ return (
+ <>
+
+
+
+
+
+
setContent({ ...content, iosUrl: e.target.value })}
+ placeholder="https://apps.apple.com/app/..."
+ />
+
+
+
+
+
+
+
setContent({ ...content, androidUrl: e.target.value })}
+ placeholder="https://play.google.com/store/apps/..."
+ />
+
+
+
+
+
+
+
setContent({ ...content, fallbackUrl: e.target.value })}
+ placeholder="https://yourapp.com"
+ />
+
+ >
+ );
+ case 'COUPON':
+ return (
+ <>
+ setContent({ ...content, code: e.target.value })}
+ placeholder="SUMMER20"
+ required
+ />
+ setContent({ ...content, discount: e.target.value })}
+ placeholder="20% OFF"
+ required
+ />
+ setContent({ ...content, title: e.target.value })}
+ placeholder="Summer Sale 2026"
+ />
+ setContent({ ...content, description: e.target.value })}
+ placeholder="Valid on all products"
+ />
+ setContent({ ...content, expiryDate: e.target.value })}
+ />
+ setContent({ ...content, redeemUrl: e.target.value })}
+ placeholder="https://shop.example.com?coupon=SUMMER20"
+ />
+ >
+ );
+ case 'FEEDBACK':
+ return (
+ <>
+ setContent({ ...content, businessName: e.target.value })}
+ placeholder="Your Restaurant Name"
+ required
+ />
+
+
+
+
+
+
setContent({ ...content, googleReviewUrl: e.target.value })}
+ placeholder="https://search.google.com/local/writereview?placeid=..."
+ />
+
+ setContent({ ...content, thankYouMessage: e.target.value })}
+ placeholder="Thanks for your feedback!"
+ />
+ >
+ );
default:
return null;
}
@@ -428,12 +595,31 @@ export default function CreatePage() {
required
/>
-