Repository navigation
Expand file tree
/
Copy pathApp.tsx
More file actions
323 lines (310 loc) · 11 KB
/
Copy pathApp.tsx
File metadata and controls
323 lines (310 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
import { useDocuments } from "@sanity/sdk-react";
import { useState } from "react";
type WorkspaceTab = "crm" | "bookings" | "billing";
interface SeededGmailDraft {
companyName: string;
contact: string;
threadId: string;
draftId: string;
tier: string;
totalUsd: number;
depositUsd: number;
status: string;
}
const ACTIVE_GMAIL_DEALS: SeededGmailDraft[] = [
{
companyName: "StreamLapel",
contact: "hello@streamlapel.com",
threadId: "1a140656cb9a4be1",
draftId: "r8880837980856049603",
tier: "Integrated 60s Mid-Roll Ad (Oct 26 - Nov 6)",
totalUsd: 1800,
depositUsd: 900,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "Tessen ZERO",
contact: "Yannick Parfait <hello@tessen.ai>",
threadId: "1a126242f701063b",
draftId: "r4979210524997526110",
tier: "Full-Stack Launch Bundle",
totalUsd: 3500,
depositUsd: 1750,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "Influencer Laboratory",
contact: "john@influencerlaboratoryinc.com",
threadId: "1a15468638753504",
draftId: "r3892744900021531970",
tier: "Full-Stack Launch Bundle (21.1% US/CA/UK/AU Geo Sent)",
totalUsd: 3500,
depositUsd: 1750,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "Typeless",
contact: "qia@typeless.com",
threadId: "1a13b726a4593e01",
draftId: "r5723240746882402069",
tier: "Oct 26 Launch + 7-Platform Shorts Pack",
totalUsd: 2000,
depositUsd: 1000,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "SuperPlane",
contact: "larisa@superplane.com",
threadId: "1a13b7352b2a713e",
draftId: "r1343316162270961096",
tier: "Full-Stack Launch Bundle (Oct 26-30 GA)",
totalUsd: 3500,
depositUsd: 1750,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "MiniMax (EezyCollab)",
contact: "talent@eezycollab.xyz",
threadId: "1a0d8c55420283dc",
draftId: "r-7977440252907745009",
tier: "Full-Stack Launch Bundle / Dedicated Video",
totalUsd: 3500,
depositUsd: 1750,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "Kolect (AI 3D Platform)",
contact: "sophia.nguyen@kolect.ai",
threadId: "1a138ebfcd7f64c0",
draftId: "r-3575370967009126686",
tier: "Full-Stack Launch Bundle",
totalUsd: 3500,
depositUsd: 1750,
status: "Reply Draft Ready in Gmail",
},
{
companyName: "Kolect (Flova)",
contact: "sophia.nguyen@kolect.ai",
threadId: "1a15878e1da6781e",
draftId: "r7006830561667617324",
tier: "Organic YouTube Feature (Ad Rights Excluded)",
totalUsd: 950,
depositUsd: 475,
status: "Reply Draft Ready in Gmail",
},
];
export function App() {
const projectId = process.env.SANITY_APP_PROJECT_ID || "hfh83o0w";
const dataset = process.env.SANITY_APP_DATASET || "production";
const isDev = dataset === "dev";
const envLabel = isDev ? "Dev" : "Production";
const siteOrigin = isDev ? "https://dev.codingcat.dev" : "https://codingcat.dev";
const [activeTab, setActiveTab] = useState<WorkspaceTab>("crm");
const [discovering, setDiscovering] = useState(false);
const [discoveredProspects, setDiscoveredProspects] = useState<Array<any>>([]);
const sponsorLeads = useDocuments({ documentType: "sponsorLead" });
const sponsorPool = useDocuments({ documentType: "sponsorPool" });
const bookings = useDocuments({ documentType: "booking" });
const handleDiscoverOutbound = async () => {
setDiscovering(true);
try {
const res = await fetch(`${siteOrigin}/api/sponsors/outbound`);
if (res.ok) {
const data = await res.json();
setDiscoveredProspects(data.prospects || []);
}
} catch {
// Fallback
} finally {
setDiscovering(false);
}
};
return (
<div style={{ padding: 24, fontFamily: "system-ui, sans-serif", maxWidth: 1200, margin: "0 auto" }}>
<header style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 24 }}>
<div>
<h1 style={{ margin: 0, fontSize: 28 }}>
CodingCat.dev Revenue & Booking OS ({envLabel})
</h1>
<p style={{ margin: "4px 0 0", color: "#666", fontSize: 14 }}>
Unified Sanity App SDK Workspace · Project <code>{projectId}</code> · Dataset{" "}
<code>{dataset}</code> ({envLabel})
</p>
</div>
<div style={{ display: "flex", gap: 8 }}>
<button
type="button"
onClick={() => setActiveTab("crm")}
style={{
padding: "8px 16px",
borderRadius: 8,
border: "1px solid #ccc",
background: activeTab === "crm" ? "#111" : "#fff",
color: activeTab === "crm" ? "#fff" : "#111",
fontWeight: 600,
cursor: "pointer",
}}
>
1. Sponsor CRM & Outbound ({sponsorLeads.data?.length || ACTIVE_GMAIL_DEALS.length})
</button>
<button
type="button"
onClick={() => setActiveTab("bookings")}
style={{
padding: "8px 16px",
borderRadius: 8,
border: "1px solid #ccc",
background: activeTab === "bookings" ? "#111" : "#fff",
color: activeTab === "bookings" ? "#fff" : "#111",
fontWeight: 600,
cursor: "pointer",
}}
>
2. Calendar Bookings & E-SIGN ({bookings.data?.length || 7})
</button>
<button
type="button"
onClick={() => setActiveTab("billing")}
style={{
padding: "8px 16px",
borderRadius: 8,
border: "1px solid #ccc",
background: activeTab === "billing" ? "#111" : "#fff",
color: activeTab === "billing" ? "#fff" : "#111",
fontWeight: 600,
cursor: "pointer",
}}
>
3. Stripe 50/50 Billing & Deal Rooms
</button>
</div>
</header>
{activeTab === "crm" && (
<div style={{ display: "flex", flexDirection: "column", gap: 24 }}>
<section style={{ padding: 20, border: "1px solid #ddd", borderRadius: 12 }}>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 16 }}>
<div>
<h2 style={{ margin: 0, fontSize: 18 }}>Active Inbound Sponsor Threads (Gmail + Sanity)</h2>
<p style={{ margin: "4px 0 0", color: "#666", fontSize: 13 }}>
Threaded Gmail reply drafts are staged in <code>alex.patterson@gmail.com</code> with verified 21.1% US/CA/UK/AU geography metrics.
</p>
</div>
</div>
<table style={{ width: "100%", borderCollapse: "collapse", fontSize: 13 }}>
<thead>
<tr style={{ textAlign: "left", borderBottom: "1px solid #eee" }}>
<th style={{ padding: 8 }}>Company</th>
<th style={{ padding: 8 }}>Contact</th>
<th style={{ padding: 8 }}>Recommended Package</th>
<th style={{ padding: 8 }}>Total / 50% Deposit</th>
<th style={{ padding: 8 }}>Status</th>
</tr>
</thead>
<tbody>
{ACTIVE_GMAIL_DEALS.map((deal) => (
<tr key={deal.threadId} style={{ borderBottom: "1px solid #f4f4f4" }}>
<td style={{ padding: 8, fontWeight: 600 }}>{deal.companyName}</td>
<td style={{ padding: 8 }}>{deal.contact}</td>
<td style={{ padding: 8 }}>{deal.tier}</td>
<td style={{ padding: 8 }}>
${deal.totalUsd.toLocaleString()} (${deal.depositUsd.toLocaleString()} deposit)
</td>
<td style={{ padding: 8 }}>{deal.status}</td>
</tr>
))}
</tbody>
</table>
</section>
<section style={{ padding: 20, border: "1px solid #ddd", borderRadius: 12 }}>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 16 }}>
<div>
<h2 style={{ margin: 0, fontSize: 18 }}>
Outbound Funded AI & YC Startup Scraper ({sponsorPool.data?.length || discoveredProspects.length})
</h2>
<p style={{ margin: "4px 0 0", color: "#666", fontSize: 13 }}>
Automatically generates 2 tailored CodingCat.dev video concepts per startup + Cloudflare Email Routing outreach.
</p>
</div>
<button
type="button"
onClick={handleDiscoverOutbound}
disabled={discovering}
style={{
padding: "8px 14px",
borderRadius: 8,
background: "#2563eb",
color: "#fff",
border: "none",
fontWeight: 600,
cursor: "pointer",
}}
>
{discovering ? "Scanning Launch HN & YC..." : "Scan Launch HN & Generate 2 Video Concepts"}
</button>
</div>
{discoveredProspects.length > 0 && (
<div style={{ display: "grid", gap: 12 }}>
{discoveredProspects.map((p) => (
<div key={p.companyName} style={{ padding: 14, border: "1px solid #eee", borderRadius: 8 }}>
<div style={{ display: "flex", justifyContent: "space-between" }}>
<strong>
{p.companyName} ({p.fundingRound}) — {p.category}
</strong>
<span>Score: {p.relevanceScore}/100</span>
</div>
<ul style={{ margin: "8px 0", paddingLeft: 18, fontSize: 13 }}>
{p.videoConcepts?.map((vc: any, i: number) => (
<li key={i}>
<strong>{vc.title}</strong> — {vc.angle}
</li>
))}
</ul>
</div>
))}
</div>
)}
</section>
</div>
)}
{activeTab === "bookings" && (
<section style={{ padding: 20, border: "1px solid #ddd", borderRadius: 12 }}>
<h2 style={{ marginTop: 0 }}>Two-Track Podcast & Sponsor Calendar Bookings</h2>
<p style={{ color: "#666", fontSize: 14 }}>
All recording sessions enforce 8:00 AM - 5:00 PM PT/ET business hours and E-SIGN digital media release capture at <code>codingcat.dev/book</code>.
</p>
<div style={{ display: "flex", gap: 12, marginTop: 16 }}>
<a
href="https://codingcat.dev/book"
target="_blank"
rel="noreferrer"
style={{ padding: "10px 16px", background: "#111", color: "#fff", borderRadius: 8, textDecoration: "none", fontSize: 13, fontWeight: 600 }}
>
Open Podcast Recording Booking ↗
</a>
<a
href="https://codingcat.dev/sponsorships#sponsorship-form"
target="_blank"
rel="noreferrer"
style={{ padding: "10px 16px", border: "1px solid #ccc", color: "#111", borderRadius: 8, textDecoration: "none", fontSize: 13, fontWeight: 600 }}
>
Open Sponsor Discovery & Deal Room ↗
</a>
</div>
</section>
)}
{activeTab === "billing" && (
<section style={{ padding: 20, border: "1px solid #ddd", borderRadius: 12 }}>
<h2 style={{ marginTop: 0 }}>50% Upfront Deposit + 50% on Publish Milestone Billing</h2>
<p style={{ color: "#666", fontSize: 14 }}>
Every Sponsor Deal Room at <code>codingcat.dev/portal/[token]</code> supports both instant Stripe Checkout (Card / ACH) and Net-15 Corporate Hosted Invoices.
</p>
<ul style={{ fontSize: 14, lineHeight: 1.7 }}>
<li><strong>Full-Stack Launch Bundle ($3,500)</strong>: $1,750 upfront deposit + $1,750 on publish</li>
<li><strong>Sponsored Podcast & Multi-Channel Showcase ($2,000)</strong>: $1,000 upfront deposit + $1,000 on publish</li>
<li><strong>Ecosystem Integration ($950)</strong>: $475 upfront deposit + $475 on publish</li>
</ul>
</section>
)}
</div>
);
}