From 890bdf13e429a5a84e1fd300605ac2e2656f6b98 Mon Sep 17 00:00:00 2001 From: nicholai Date: Sat, 31 Jan 2026 19:30:46 -0700 Subject: [PATCH 1/2] Feat: Add public landing page for non-authenticated users - Create /home route with SEO metadata and JSON-LD structured data - Add hero section with dual CTAs (sign-up and PWA install) - Add features section showcasing dual tracking, health timeline, achievements, savings - Add animated phone demo with rotating screens (auto-advance, pause on hover) - Add final CTA section and footer with affiliate disclosure - Extract usePWAInstall hook for reusable PWA install logic - Enhance theme-context with system preference auto-detection Co-Authored-By: Claude Opus 4.5 --- src/app/home/page.tsx | 65 +++++ src/components/landing/CTASection.tsx | 224 +++++++++++++++++ src/components/landing/DemoSection.tsx | 267 +++++++++++++++++++++ src/components/landing/FeatureCard.tsx | 78 ++++++ src/components/landing/FeaturesSection.tsx | 88 +++++++ src/components/landing/HeroSection.tsx | 233 ++++++++++++++++++ src/components/landing/LandingFooter.tsx | 107 +++++++++ src/components/landing/LandingNav.tsx | 142 +++++++++++ src/components/landing/LandingPage.tsx | 38 +++ src/hooks/usePWAInstall.ts | 78 ++++++ src/lib/theme-context.tsx | 21 ++ 11 files changed, 1341 insertions(+) create mode 100644 src/app/home/page.tsx create mode 100644 src/components/landing/CTASection.tsx create mode 100644 src/components/landing/DemoSection.tsx create mode 100644 src/components/landing/FeatureCard.tsx create mode 100644 src/components/landing/FeaturesSection.tsx create mode 100644 src/components/landing/HeroSection.tsx create mode 100644 src/components/landing/LandingFooter.tsx create mode 100644 src/components/landing/LandingNav.tsx create mode 100644 src/components/landing/LandingPage.tsx create mode 100644 src/hooks/usePWAInstall.ts diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx new file mode 100644 index 0000000..8c24a9f --- /dev/null +++ b/src/app/home/page.tsx @@ -0,0 +1,65 @@ +import { Metadata } from 'next'; +import { LandingPage } from '@/components/landing/LandingPage'; + +export const metadata: Metadata = { + title: 'QuitTraq - Track Your Journey to Quit Smoking & Marijuana', + description: 'Free app to track nicotine and marijuana usage. Health recovery timeline, achievements, savings tracker. PWA works offline. Your companion to a healthier life.', + keywords: ['quit smoking', 'stop smoking app', 'nicotine tracker', 'marijuana tracker', 'health recovery', 'quit vaping', 'substance tracker'], + authors: [{ name: 'QuitTraq' }], + openGraph: { + type: 'website', + locale: 'en_US', + url: 'https://quittraq.com/home', + title: 'QuitTraq - Track Your Journey to Quit Smoking', + description: 'Free app to track nicotine and marijuana usage with health timeline and achievements.', + siteName: 'QuitTraq', + images: [ + { + url: '/og-image.png', + width: 1200, + height: 630, + alt: 'QuitTraq - Quit Smoking App', + }, + ], + }, + twitter: { + card: 'summary_large_image', + title: 'QuitTraq - Track Your Journey to Quit Smoking', + description: 'Free app to track nicotine and marijuana usage with health timeline and achievements.', + images: ['/og-image.png'], + }, + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + }, + }, +}; + +export default function HomePage() { + const jsonLd = { + '@context': 'https://schema.org', + '@type': 'WebApplication', + name: 'QuitTraq', + description: 'Track your journey to quit smoking and marijuana', + applicationCategory: 'HealthApplication', + operatingSystem: 'Any', + offers: { + '@type': 'Offer', + price: '0', + priceCurrency: 'USD', + }, + }; + + return ( + <> +