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>
This commit is contained in:
AyrisAI
2026-08-24 00:01:06 +03:00
co-authored by Claude Sonnet 5
parent 390bd699a6
commit 1b8cfeda95
62 changed files with 2216 additions and 411 deletions
+7 -23
View File
@@ -14,7 +14,7 @@ export default async function Footer() {
const nav = await getTranslations('nav')
return (
<footer className="bg-pine text-stone/70 border-t border-white/10 pt-16 pb-8 font-sans">
<footer className="bg-pine text-stone/85 border-t border-white/10 pt-16 pb-8 font-sans">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 md:grid-cols-4 gap-10 mb-12">
@@ -29,7 +29,7 @@ export default async function Footer() {
marmaris <span className="text-turquoise">local</span>
</h2>
</Link>
<p className="text-xs text-stone/50 max-w-sm font-medium leading-relaxed">
<p className="text-xs text-stone/80 max-w-sm font-medium leading-relaxed">
{t('about')}
</p>
</div>
@@ -91,35 +91,19 @@ export default async function Footer() {
</div>
{/* Bottom Copyright & Branding */}
<div className="border-t border-white/5 pt-8 flex flex-col sm:flex-row items-center justify-between text-xs text-stone/40 gap-4">
{/* Bottom Copyright & Mandatory Branding */}
<div className="border-t border-white/10 pt-8 flex flex-col sm:flex-row items-center justify-between text-xs text-stone/75 gap-4">
<p>{t('rights')}</p>
<div className="flex items-center gap-1.5 font-medium">
<span className="opacity-75">Created by</span>
<span className="opacity-90">Created by</span>
<a
href="https://ayris.tech"
target="_blank"
rel="noopener noreferrer"
className="text-stone hover:text-turquoise transition-colors duration-200 hover:underline underline-offset-4"
className="text-stone hover:text-turquoise transition-colors duration-200 hover:underline underline-offset-4 font-semibold"
>
Ayris Tech
ayris.tech
</a>
{/* Google Bot & Arama Motoru İndeksleme Katmanı (Görünmez / Screen-Reader Safe) */}
<span className="sr-only">
Legal AI & Solutions:{' '}
<a href="https://ayris.legal" rel="noopener">
AyrisLegal
</a>
,{' '}
<a href="https://ayrislegal.com" rel="noopener">
Ayris Legal AI
</a>
. The best local spots, hidden from plain sight. Marmaris Local{' '}
<a href="https://marmarislocal.com" rel="noopener">
Marmaris Local
</a>
</span>
</div>
</div>