7fe3ff82c9782ac2dc63af8d51ab016e848ad81e
Phase 2-4 of SaaS schema migration. All Edge Functions now write to BOTH legacy marketing_reports AND new V3 tables: discover-channels: - UPSERT clinics (url-based dedup) - INSERT analysis_runs (status: discovering) collect-channel-data: - INSERT channel_snapshots (one per channel — time-series!) - INSERT screenshots (evidence rows) - UPDATE analysis_runs (raw_channel_data, vision_analysis) generate-report: - UPDATE analysis_runs (report, status: complete) - UPDATE clinics (last_analyzed_at, established_year) Frontend passes clinicId + runId through all 3 phases. Legacy marketing_reports still written for backward compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run and deploy your AI Studio app
This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/d446f5f5-e089-404a-93ce-32a72f2f5108
Run Locally
Prerequisites: Node.js
- Install dependencies:
npm install - Set the
GEMINI_API_KEYin .env.local to your Gemini API key - Run the app:
npm run dev
Languages
TypeScript
51.3%
JavaScript
22%
Astro
11.9%
Python
8.6%
CSS
3.1%
Other
3%