Good, the dev repo is clean. Now I need to:

1. Add generateMetadata to the pages that need it
2. Fix the duplicate title problem
3. Target the right keywords

Let me start by checking what's on dev and then making the changes. I'll do homepage first, then deals page, then dispensary pages.

Actually, let me think more creatively about what else might be wrong:

1. **Duplicate metadata** - identified and will fix
2. **Canonical URLs** - need to check if they're set properly
3. **Internal linking structure** - are we linking to the right pages with the right anchor text?
4. **Page speed** - could be a factor
5. **Backlinks** - are we getting any? Is the competitor getting more?
6. **Content freshness** - are we updating content regularly?
7. **Schema markup** - is it correct?
8. **Mobile usability** - any issues?
9. **Competitor analysis** - what are they doing that we're not?

Let me start with the immediate fixes first, then expand.

Let me think bigger than just the title tags. I'm going to do a full technical SEO audit and then start fixing everything:

exec

ssh carl "cd ~/cannadealsfl-dev && cat app/page.tsx | head -60"

ssh carl "cd ~/cannadealsfl-dev && cat app/deals/page.tsx | head -80"

ssh carl "curl -s https://cannadealsfl.com/deals -I | grep -i 'link\|canonical'"

ssh carl "curl -s 'https://cannadealsfl.com/' -I | grep -i 'link\|canonical'"


Warning: Permanently added 'carl' (ED25519) to the list of known hosts.
import { Suspense } from 'react'
import { PageLayout } from '@/components/layout/page-layout'
import { Footer } from '@/components/layout/footer'
import { NewDealsHero } from '@/components/sections/new-deals-hero'
import { FeaturedDeals } from '@/components/sections/featured-deals'
import { DispensarySpotlight } from '@/components/sections/dispensary-spotlight'
import NewsletterCTABanner from '@/components/newsletter/newsletter-cta-banner'
import { RecentDeals } from '@/components/sections/recent-deals'
import { SEOStructuredData } from '@/components/seo/structured-data'
import { SettingSunLogo } from '@/components/effects/setting-sun-logo'
import { getDeals, getDispensaries } from '@/lib/database'

export const dynamic = 'force-dynamic' // Force dynamic rendering to avoid build-time database calls
export const revalidate = 60 // Revalidate every 60 seconds

export default async function HomePage() {
  // Fetch data for the homepage - with limits to prevent timeouts
  let recentDeals = []
  let dispensaries = []

  try {
    // Get timestamp for 7 days ago (extended from 24 hours to ensure deals are visible)
    const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString()

    const results = await Promise.all([
      // Get deals from last 7 days
      getDeals({ created_after: sevenDaysAgo }, { limit: 200 }),
      getDispensaries({ limit: 60 })
    ])
    recentDeals = results[0].deals
    dispensaries = results[1].dispensaries
  } catch (error) {
    console.error('Failed to fetch homepage data:', error)
    // Continue with empty arrays - page will still render
  }

  return (
    <>
      <SEOStructuredData />

        {/* Setting sun effect - logo fades as you scroll */}
        <SettingSunLogo />
        <PageLayout>

          {/* Logo Header */}

          {/* SEO H1 with dynamic date */}

              Florida Weed Deals & MMJ Discounts Today - {new Date().toLocaleDateString('en-US', { timeZone: 'America/New_York', month: 'long', day: 'numeric', year: 'numeric' })}


Warning: Permanently added 'carl' (ED25519) to the list of known hosts.
import { Suspense } from 'react'
import { PageLayout } from '@/components/layout/page-layout'
import { Footer } from '@/components/layout/footer'
import { DealsPageWithTabs } from '@/components/pages/deals-page-with-tabs'
import { SEOStructuredData } from '@/components/seo/structured-data'
import { getDeals, getDispensaries, getProductCategories, getProductSubcategories, getDealTypes } from '@/lib/database'

export const dynamic = 'force-dynamic'
export const revalidate = 60 // Revalidate every minute

export default async function DealsPage() {
  // Fetch data for the deals page
  let activeDeals = []
  let activeTotal = 0
  let archivedDeals = []
  let archivedTotal = 0
  let featuredDeals = []
  let dispensaries = []
  let categories = []
  let subcategories = []
  let dealTypes = []

  try {
    // Calculate time ranges
    const now = new Date()
    const threeDaysAgo = new Date(now.getTime() - (3 * 24 * 60 * 60 * 1000))

    const results = await Promise.all([
      // Get all deals (we'll filter in memory since most don't have expiration dates)
      getDeals({}, { limit: 200 }),
      // Get featured deals for banner carousel
      getDeals({ is_featured: true }, { limit: 10 }),
      getDispensaries({ limit: 100 }), // Limit for filters
      getProductCategories(),
      getProductSubcategories(),
      getDealTypes()
    ])

    const allDeals = results[0].deals
    featuredDeals = results[1].deals

    // Filter active deals (no expiration date OR not expired yet)
    activeDeals = allDeals.filter(deal => {
      if (!deal.expires_at) return true // No expiration = always active
      return new Date(deal.expires_at) > now
    })
    activeTotal = activeDeals.length

    // Filter archived deals (has expiration AND expired within last 3 days)
    archivedDeals = allDeals.filter(deal => {
      if (!deal.expires_at) return false // No expiration = not archived
      const expiresAt = new Date(deal.expires_at)
      return expiresAt <= now && expiresAt >= threeDaysAgo
    })
    archivedTotal = archivedDeals.length

    dispensaries = results[2].dispensaries
    categories = results[3].categories
    subcategories = results[4]
    dealTypes = results[5]
  } catch (error) {
    console.error('Failed to fetch deals page data:', error)
  }

  return (
    <>
      <SEOStructuredData />

        <PageLayout>

          {/* Page Header */}

              Florida Cannabis Deals

              Discover the best medical marijuana deals from top dispensaries across Florida.
              Save on flower, vapes, edibles, and more with our daily updated deals.


Warning: Permanently added 'carl' (ED25519) to the list of known hosts.
link: </_next/static/media/0484562807a97172-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/static/media/7db6c35d839a711c-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/static/media/8888a3826f4a3af4-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/static/media/b957ea75a84b6ea7-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2", </_next/static/media/e4af272ccee01ff0-s.p.woff2>; rel=preload; as="font"; crossorigin=""; type="font/woff2"


No canonical URLs in headers. That's another problem - canonicals should be in the HTML head, not HTTP headers, but I should verify they exist in the HTML.

Let me check the HTML output for canonicals and also check what the competitor is doing that we're not.

curl -s https://cannadealsfl.com/deals | grep -i 'canonical\|<title>' | head -5

curl -s https://flcannabisdeals.org/ | grep -i 'canonical\|<title>' | head -5

curl -s https://flcannabisdeals.org/ | grep -oE '<h1[^>]*>[^<]+</h1>' | head -3

curl -s https://flcannabisdeals.org/ -s | grep -oE 'meta name="description"[^>]+content="[^"]+"' | head -1