feat(supporters): haewon 결정 반영 — 채널 인기 전체 탭 제거, 단가 상한 $10 기본, 큐 폴러(poll.mjs)+launchd, /supporters/:id 페이지, URL 신청→빌드 큐, 수집기 UA·슬래시 수정, 기획 목록 일반화(원진 6편)
WIP: 원진성형외과 회귀는 글 생성 단계에서 네트워크 끊김(fetch failed)으로 중단. 다음 세션에 --from generate 로 재실행. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
190ffdf7ab
commit
ee8c06f53b
18 files changed
+380
-125
No files matched your search
@@ -62,12 +62,20 @@ export default function DiscoveryLeadModal({ open, onClose }: DiscoveryLeadModal
|
||||
}
|
||||
setFieldError(null);
|
||||
setState('submitting');
|
||||
// discovery_leads 는 anon 조회 정책이 없어 insert 반환값을 읽지 않는다.
|
||||
const { error } = await supabase.from('discovery_leads').insert({
|
||||
url: normalized,
|
||||
clinic_name: clinicName.trim() || null,
|
||||
contact: contact.trim(),
|
||||
source: 'discovery_landing',
|
||||
});
|
||||
// 서포터즈 자동 빌드 큐(supporter_builds, status=queued). 워커(workers/supporters-build/poll.mjs)가 집어 간다.
|
||||
// clinic_id 는 홈페이지 호스트에서 만든다 (www.k-wonjin.co.kr → k-wonjin). 큐 삽입이 실패해도 신청 자체는 접수된 것으로 본다.
|
||||
if (!error) {
|
||||
const host = (() => { try { return new URL(normalized).host; } catch { return normalized; } })();
|
||||
const clinicId = host.replace(/^www\./, '').split('.')[0].toLowerCase().replace(/[^a-z0-9-]/g, '') || 'clinic';
|
||||
await supabase.from('supporter_builds').insert({ clinic_id: clinicId, url: normalized, status: 'queued', clinic_name: clinicName.trim() || null });
|
||||
}
|
||||
setState(error ? 'error' : 'done');
|
||||
};
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import ApiDashboardPage from './pages/ApiDashboardPage.tsx';
|
||||
import LoginPage from './pages/LoginPage.tsx';
|
||||
import DiscoveryLandingPage from './pages/DiscoveryLandingPage.tsx';
|
||||
import DiscoveryReportPage from './pages/DiscoveryReportPage.tsx';
|
||||
import SupportersBuildPage from './pages/SupportersBuildPage.tsx';
|
||||
import './index.css';
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
@@ -40,6 +41,7 @@ createRoot(document.getElementById('root')!).render(
|
||||
<Route path="api-dashboard" element={<ApiDashboardPage />} />
|
||||
<Route path="discovery" element={<DiscoveryLandingPage />} />
|
||||
<Route path="discovery/:id" element={<DiscoveryReportPage />} />
|
||||
<Route path="supporters/:id" element={<SupportersBuildPage />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* /supporters/:id — 서포터즈 자동 빌드 상태 + 병원 확인 항목 (진단 리포트가 아직 없는 병원용)
|
||||
* /discovery/:id 리포트가 있는 병원은 리포트 안의 같은 패널을 쓴다. 이 페이지는 URL 신청만 있고 리포트가 없는 병원에게 보내는 링크다.
|
||||
*/
|
||||
import { useParams, Link } from 'react-router';
|
||||
import { ClinicInputsPanel } from '../components/discovery/ClinicInputsPanel';
|
||||
|
||||
export default function SupportersBuildPage() {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
if (!id) return null;
|
||||
return (
|
||||
<div className="[word-break:keep-all]">
|
||||
<section className="bg-[#0A1128] text-white relative overflow-hidden pt-28 pb-14 md:pt-36 md:pb-16 px-6">
|
||||
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,rgba(108,92,231,0.18),transparent_60%)]" />
|
||||
<div className="relative max-w-7xl mx-auto">
|
||||
<div className="inline-flex items-center gap-2 rounded-full bg-white/10 border border-white/10 px-4 py-1.5 mb-6">
|
||||
<span className="text-sm font-semibold tracking-wide text-purple-200">INFINITH AI Discovery · Supporters Build</span>
|
||||
</div>
|
||||
<h1 className="font-serif text-4xl md:text-6xl font-bold tracking-[-0.02em] mb-3">
|
||||
<span className="bg-gradient-to-r from-purple-300 to-blue-300 bg-clip-text text-transparent">Supporters Preview</span>
|
||||
</h1>
|
||||
<p className="text-purple-200 text-base">병원 ID <span className="font-mono text-white">{id}</span></p>
|
||||
<p className="text-white/60 text-sm mt-4">
|
||||
홈페이지 공개 자료만으로 만든 서포터즈 사이트 초안입니다. 아래에서 미리보기를 열고, 병원만 답할 수 있는 항목을 입력해 주세요.
|
||||
{' '}<Link to="/discovery" className="underline underline-offset-4 text-purple-300">AI Discovery 소개</Link>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
<ClinicInputsPanel clinicId={id} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user