KnearMe Portfolio Architecture
Top-level route groups
Section titled “Top-level route groups”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.
Data and service boundaries
Section titled “Data and service boundaries”- 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.
SEO/public content shape
Section titled “SEO/public content shape”- 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.
Testing architecture
Section titled “Testing architecture”- 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.
Deployment topology
Section titled “Deployment topology”- Portfolio app runs on Vercel.
- Cloudflare edge worker can own selected API routes (
/api/track, forms, newsletters, etc.) via staged cutover.