Add store catalog config for dashboard upsell checkout

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 16:35:30 +05:00
parent d2094c9541
commit f8f246ca9b
+87
View File
@@ -0,0 +1,87 @@
// Storefront catalog for the dashboard upsell modal.
//
// SKUs and prices DUPLICATE payment-router/products.yaml (and the landing
// pages) — the server always charges the catalog price by SKU, so a stale
// price here is a display bug, not a money bug. When a price changes:
// products.yaml → landing → this file.
export interface StoreTariff {
sku: string; // must match payment-router/products.yaml
label: string;
priceRub: number; // display only; the charge is resolved server-side
includes?: string; // short "what's inside" caption under the label
}
export interface StoreCatalogEntry {
landingUrl: string;
tariffs: StoreTariff[];
}
export const PAY_ORDER_URL = "https://obsidian.second-brain.ru/pay/order";
export const PAY_METHODS_URL = "https://obsidian.second-brain.ru/pay/methods";
// Keys = course slugs shown as locked cards on the student dashboard.
// Only tariffs of the course's "native" landing are listed — cross-bundles
// from other landings would confuse the choice.
export const STORE_CATALOG: Record<string, StoreCatalogEntry> = {
"second-brain-vault": {
landingUrl: "https://second-brain.ru/sb-vault",
tariffs: [{ sku: "sb-vault", label: "Second Brain Vault", priceRub: 2990 }],
},
"claude-obsidian": {
landingUrl: "https://second-brain.ru/claude-obsidian",
tariffs: [{ sku: "claude-obsidian", label: "Claude + Obsidian", priceRub: 4990 }],
},
"obsidian-full": {
landingUrl: "https://obsidian.second-brain.ru/",
tariffs: [
{
sku: "obsidian-pro",
label: "Obsidian + AI",
priceRub: 14990,
includes: "Включает курс «Obsidian + AI» и Second Brain Vault",
},
{
sku: "obsidian-architect",
label: "Архитектор знаний",
priceRub: 17990,
includes: "Плюс курс «Zotero. Всё включено»",
},
],
},
"zotero-full": {
landingUrl: "https://zotero.second-brain.ru/",
tariffs: [
{
sku: "zotero-analyst",
label: "Аналитик",
priceRub: 10990,
includes: "Включает курс «Obsidian. Всё включено»",
},
{
sku: "zotero-max",
label: "Второй мозг на максималках",
priceRub: 17990,
includes: "Плюс курс «Obsidian + AI» и Second Brain Vault",
},
],
},
"obsidian-ai": {
landingUrl: "https://obsidianai.second-brain.ru/",
tariffs: [
{ sku: "obsidianai-base", label: "База", priceRub: 6990 },
{
sku: "obsidianai-expert",
label: "AI Эксперт",
priceRub: 14990,
includes: "Включает курс «Obsidian. Всё включено» и Second Brain Vault",
},
{
sku: "obsidianai-researcher",
label: "AI Исследователь",
priceRub: 17990,
includes: "Плюс курс «Zotero. Всё включено»",
},
],
},
};