Skip to content

KnearMe Portfolio Architecture

src/app is organized into route groups:

  • (auth): login/signup/auth callback flows.
  • (dashboard): authenticated business owner UI.
  • (marketing): public acquisition pages.
  • (portfolio): public portfolio/business SEO pages.
  • api: server-side API endpoints.
  • Supabase is the primary data/auth system.
  • API routes and server actions implement most backend logic.
  • External providers include OpenAI/Gemini, Upstash, Resend, Stripe, and optional CMS REST endpoints.
  • Dynamic portfolio URLs live under city/service/slug patterns.
  • Metadata and sitemap routes are generated in app code.
  • Public pages rely on environment-driven canonical host values.
  • Unit/integration coverage in src/__tests__.
  • Playwright-based E2E in src/__tests__/e2e.
  • Mock-vs-live AI test modes are controlled by E2E_AI_MODE.
  • Portfolio app runs on Vercel.
  • Cloudflare edge worker can own selected API routes (/api/track, forms, newsletters, etc.) via staged cutover.