Files
marmarislocal/lib/ogImage.tsx
T
AyrisAIandClaude Sonnet 5 1b8cfeda95 feat: harden admin security, add AI trip planner, map view, and SEO/notification improvements
Security:
- requireAdmin() session check added to every admin-only server action
  (previously relied only on middleware path matching, which Next.js
  Server Actions don't reliably respect)
- Real Prisma + bcrypt admin auth, replacing hardcoded credentials; split
  into an Edge-safe auth.config.ts (used by proxy.ts) and the full
  Prisma-backed auth.ts (route handler, server actions, server components)
- Removed hardcoded fallback secret on the Instagram sync cron endpoint
- Honeypot field + per-IP rate limiting on contact/business-submission
  forms and the analytics events endpoint

Features:
- AI trip planner (/plan-olustur, /plan/[id]) backed by DeepSeek, grounded
  to only recommend isLocalApproved listings, with a deterministic
  link-injection fallback for anything the model doesn't format as markdown
- Interactive Leaflet/OpenStreetMap view on category listing pages
- Telegram notifications for new contact messages and business submissions

SEO:
- Brand-consistent favicon/apple-icon/PWA icons and default Open Graph/
  Twitter share images, generated via next/og (replacing default Next.js
  placeholders)
- BreadcrumbList structured data on category and listing detail pages
- Fixed two remaining raw <img> tags to use next/image

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 00:01:06 +03:00

62 lines
1.7 KiB
TypeScript

// Shared JSX used by app/icon.tsx, app/apple-icon.tsx and the per-locale
// opengraph-image.tsx / twitter-image.tsx — keeps the brand badge (the same
// circular "ML" mark used in Navbar) defined in exactly one place.
export function BrandBadge({ size, ringWidth = 3 }: { size: number; ringWidth?: number }) {
return (
<div
style={{
width: size,
height: size,
borderRadius: '50%',
background: '#FBFAF6',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<div
style={{
width: size * 0.8,
height: size * 0.8,
borderRadius: '50%',
border: `${ringWidth}px dashed #2E9C9A`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<span style={{ fontSize: size * 0.36, fontWeight: 800, color: '#123238', letterSpacing: '-1px' }}>ML</span>
</div>
</div>
)
}
export function OgImageContent({ tagline }: { tagline: string }) {
return (
<div
style={{
width: '100%',
height: '100%',
background: '#123238',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
padding: 80,
}}
>
<div style={{ display: 'flex', marginBottom: 40 }}>
<BrandBadge size={140} />
</div>
<div style={{ display: 'flex', fontSize: 64, fontWeight: 800, color: '#FBFAF6' }}>
<span>marmaris&nbsp;</span>
<span style={{ color: '#2E9C9A' }}>local</span>
</div>
<div style={{ display: 'flex', fontSize: 28, color: '#EDEEE3', marginTop: 20, textAlign: 'center' }}>
{tagline}
</div>
</div>
)
}