{
  "generated_at": "2026-03-06T00:00:00.000Z",
  "services": {
    "notifications": [
      "in-app alerts via AlertsPanel component",
      "in-app toast notifications via ToastContext",
      "webhook endpoint (stripe/external events)",
      "Loops email integration (src/lib/loops.ts)"
    ],
    "api_endpoints": [
      "GET/POST /api/ideas - ideas CRUD",
      "GET/PATCH/DELETE /api/ideas/[id] - idea detail",
      "POST /api/ideas/[id]/transition - stage transitions",
      "POST /api/ideas/[id]/implement - AI implementation trigger",
      "POST /api/ideas/[id]/comments - discussion",
      "GET /api/ideas/[id]/card - shareable card",
      "GET/POST /api/goals - goals CRUD",
      "GET/PATCH/DELETE /api/goals/[id] - goal detail",
      "POST /api/goals/[id]/kpis - KPI updates",
      "GET /api/kpis/refresh - KPI data refresh",
      "GET/POST /api/epics - epics CRUD",
      "GET/PATCH/DELETE /api/epics/[id] - epic detail",
      "GET/POST /api/epics/[id]/ideas - ideas within epic",
      "GET/POST /api/hypotheses - hypotheses CRUD",
      "GET/PATCH/DELETE /api/hypotheses/[id]",
      "POST /api/analyze - trigger codebase analysis",
      "GET /api/briefing - AI daily briefing",
      "POST /api/checkout - Stripe checkout",
      "GET /api/portal - Stripe billing portal",
      "GET /api/license - license validation",
      "GET/POST /api/social - social drafts",
      "GET/PATCH/DELETE /api/social/[id]",
      "POST /api/social/[id]/publish - publish social post",
      "POST /api/webhook - Stripe webhook handler",
      "GET /api/health - health check",
      "GET /api/config - configuration",
      "POST /api/implementations - implementation tracking",
      "POST /api/investor-updates/generate - investor update generation",
      "GET /api/refine-results - kanban refine results",
      "GET /api/provider-status - AI provider status"
    ],
    "background_jobs": [
      "scripts/heartbeat.ts - proactive AI check-in (cron: 9am/1pm/5pm daily)",
      "scripts/analyze.ts - codebase analysis (quick daily, deep weekly, metrics weekly, SEO bi-weekly)",
      "scripts/kanban-refine.ts - AI idea quality refinement",
      "scripts/social-routine.ts - social content generation",
      "scripts/investor-update.ts - investor update generation",
      "scripts/implement.ts - AI implementation runner",
      "scripts/scan.ts - repo scanning",
      "scripts/heartbeat.ts --session mode - continuous polling loop"
    ],
    "integrations": [
      "Stripe (checkout, portal, webhook) - src/lib/stripe.ts",
      "PostHog (KPI analytics) - src/lib/posthog-kpi-adapter.ts, src/lib/kpi-adapters/posthog.ts",
      "Loops (email) - src/lib/loops.ts",
      "REST API KPI adapter - src/lib/kpi-adapters/rest-api.ts",
      "Waitlist file KPI adapter - src/lib/kpi-adapters/waitlist-file.ts",
      "Claude AI (analysis, heartbeat, implementation)"
    ]
  },
  "missing": [
    "No WhatsApp/Whapi integration (no lawyer/lead messaging channel)",
    "No CRM data model (leads, contacts, lawyers, clients — no such entities in API or types)",
    "No marketplace endpoints (lawyer listings, matching, availability)",
    "No lead capture or intake forms API",
    "No push notifications (no FCM, APNs, web push)",
    "No SMS channel",
    "No pipeline/funnel tracking for lawyer acquisition or client conversion",
    "No onboarding workflow or task completion tracking for lawyers",
    "No NPS or satisfaction survey integration",
    "No appointment/scheduling integration",
    "No document management or e-signature integration"
  ],
  "file_counts": {
    "frontend_components": 45,
    "api_routes": 31,
    "backend_routers": 0
  }
}