/** * Demo presets — BCRG Community Flow. * * 3 sources → BCRG treasury → 3 domain funnels → 5 team funnels → 12 outcomes. * Overflow paths cascade down AND back up through the network. */ import type { FlowNode, FunnelNodeData, OutcomeNodeData, SourceNodeData } from "./types"; export const SPENDING_COLORS = ["#3b82f6", "#8b5cf6", "#ec4899", "#06b6d4", "#10b981", "#6366f1"]; export const OVERFLOW_COLORS = ["#f59e0b", "#ef4444", "#f97316", "#eab308", "#dc2626", "#ea580c"]; // Node width is 260px. Spacing: 340px horizontal, 550px vertical between funnel layers. export const demoNodes: FlowNode[] = [ // ═══════════════════════════════════════════════════════ // Layer 0 — Sources (Y=-400) // ═══════════════════════════════════════════════════════ { id: "source-grants", type: "source", position: { x: 200, y: -400 }, data: { label: "Grants & Donations", flowRate: 8000, sourceType: "card", targetAllocations: [{ targetId: "bcrg", percentage: 100, color: "#10b981" }], } as SourceNodeData, }, { id: "source-membership", type: "source", position: { x: 620, y: -400 }, data: { label: "Membership Fees", flowRate: 5000, sourceType: "card", targetAllocations: [{ targetId: "bcrg", percentage: 100, color: "#10b981" }], } as SourceNodeData, }, { id: "source-services", type: "source", position: { x: 1040, y: -400 }, data: { label: "Service Revenue", flowRate: 7000, sourceType: "card", targetAllocations: [{ targetId: "bcrg", percentage: 100, color: "#06b6d4" }], } as SourceNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 1 — Central Treasury (Y=0) // ═══════════════════════════════════════════════════════ { id: "bcrg", type: "funnel", position: { x: 560, y: 0 }, data: { label: "BCRG Treasury", currentValue: 0, desiredOutflow: 6000, minThreshold: 6000, sufficientThreshold: 25000, maxThreshold: 35000, maxCapacity: 50000, inflowRate: 20000, dynamicOverflow: true, overflowAllocations: [ { targetId: "growth", percentage: 100, color: OVERFLOW_COLORS[0] }, ], spendingAllocations: [ { targetId: "programs", percentage: 40, color: SPENDING_COLORS[0] }, { targetId: "operations", percentage: 35, color: SPENDING_COLORS[1] }, { targetId: "growth", percentage: 25, color: SPENDING_COLORS[2] }, ], } as FunnelNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 2 — Domain Funnels (Y=600) // ═══════════════════════════════════════════════════════ { id: "programs", type: "funnel", position: { x: 100, y: 600 }, data: { label: "Programs", currentValue: 0, desiredOutflow: 2500, minThreshold: 2500, sufficientThreshold: 10000, maxThreshold: 15000, maxCapacity: 22000, inflowRate: 0, dynamicOverflow: true, overflowAllocations: [ { targetId: "operations", percentage: 60, color: OVERFLOW_COLORS[1] }, { targetId: "growth", percentage: 40, color: OVERFLOW_COLORS[2] }, ], spendingAllocations: [ { targetId: "alice", percentage: 50, color: SPENDING_COLORS[0] }, { targetId: "bob", percentage: 50, color: SPENDING_COLORS[1] }, ], } as FunnelNodeData, }, { id: "operations", type: "funnel", position: { x: 560, y: 600 }, data: { label: "Operations", currentValue: 0, desiredOutflow: 2200, minThreshold: 2200, sufficientThreshold: 8800, maxThreshold: 13200, maxCapacity: 20000, inflowRate: 0, dynamicOverflow: true, overflowAllocations: [ { targetId: "growth", percentage: 100, color: OVERFLOW_COLORS[0] }, ], spendingAllocations: [ { targetId: "carol", percentage: 55, color: SPENDING_COLORS[2] }, { targetId: "dave", percentage: 45, color: SPENDING_COLORS[3] }, ], } as FunnelNodeData, }, { id: "growth", type: "funnel", position: { x: 1020, y: 600 }, data: { label: "Growth", currentValue: 0, desiredOutflow: 1500, minThreshold: 1500, sufficientThreshold: 6000, maxThreshold: 9000, maxCapacity: 14000, inflowRate: 0, dynamicOverflow: true, overflowAllocations: [ { targetId: "bcrg", percentage: 100, color: OVERFLOW_COLORS[3] }, ], spendingAllocations: [ { targetId: "eve", percentage: 100, color: SPENDING_COLORS[4] }, ], } as FunnelNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 3 — Team Funnels (Y=1250) // ═══════════════════════════════════════════════════════ { id: "alice", type: "funnel", position: { x: -100, y: 1250 }, data: { label: "Alice — Research", currentValue: 0, desiredOutflow: 1200, minThreshold: 1200, sufficientThreshold: 4800, maxThreshold: 7200, maxCapacity: 10800, inflowRate: 0, overflowAllocations: [ { targetId: "bob", percentage: 100, color: OVERFLOW_COLORS[4] }, ], spendingAllocations: [ { targetId: "field-research", percentage: 60, color: SPENDING_COLORS[0] }, { targetId: "publications", percentage: 40, color: SPENDING_COLORS[1] }, ], } as FunnelNodeData, }, { id: "bob", type: "funnel", position: { x: 280, y: 1250 }, data: { label: "Bob — Engineering", currentValue: 0, desiredOutflow: 1300, minThreshold: 1300, sufficientThreshold: 5200, maxThreshold: 7800, maxCapacity: 11700, inflowRate: 0, overflowAllocations: [ { targetId: "programs", percentage: 100, color: OVERFLOW_COLORS[5] }, ], spendingAllocations: [ { targetId: "infrastructure", percentage: 50, color: SPENDING_COLORS[2] }, { targetId: "prototypes", percentage: 50, color: SPENDING_COLORS[3] }, ], } as FunnelNodeData, }, { id: "carol", type: "funnel", position: { x: 660, y: 1250 }, data: { label: "Carol — Comms", currentValue: 0, desiredOutflow: 1100, minThreshold: 1100, sufficientThreshold: 4400, maxThreshold: 6600, maxCapacity: 9900, inflowRate: 0, overflowAllocations: [ { targetId: "dave", percentage: 100, color: OVERFLOW_COLORS[0] }, ], spendingAllocations: [ { targetId: "comms-strategy", percentage: 50, color: SPENDING_COLORS[0] }, { targetId: "event-series", percentage: 50, color: SPENDING_COLORS[4] }, ], } as FunnelNodeData, }, { id: "dave", type: "funnel", position: { x: 1040, y: 1250 }, data: { label: "Dave — Design", currentValue: 0, desiredOutflow: 1000, minThreshold: 1000, sufficientThreshold: 4000, maxThreshold: 6000, maxCapacity: 9000, inflowRate: 0, overflowAllocations: [ { targetId: "operations", percentage: 100, color: OVERFLOW_COLORS[1] }, ], spendingAllocations: [ { targetId: "design-system", percentage: 55, color: SPENDING_COLORS[5] }, { targetId: "user-testing", percentage: 45, color: SPENDING_COLORS[2] }, ], } as FunnelNodeData, }, { id: "eve", type: "funnel", position: { x: 1420, y: 1250 }, data: { label: "Eve — Governance", currentValue: 0, desiredOutflow: 900, minThreshold: 900, sufficientThreshold: 3600, maxThreshold: 5400, maxCapacity: 8100, inflowRate: 0, overflowAllocations: [ { targetId: "bcrg", percentage: 100, color: OVERFLOW_COLORS[2] }, ], spendingAllocations: [ { targetId: "legal-framework", percentage: 40, color: SPENDING_COLORS[0] }, { targetId: "compliance", percentage: 30, color: SPENDING_COLORS[3] }, { targetId: "governance-model", percentage: 30, color: SPENDING_COLORS[5] }, ], } as FunnelNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 4 — Outcomes (Y=1900) // ═══════════════════════════════════════════════════════ // Alice's outcomes { id: "field-research", type: "outcome", position: { x: -220, y: 1900 }, data: { label: "Field Research", description: "Participatory action research in partner communities", fundingReceived: 0, fundingTarget: 20000, status: "not-started", phases: [ { name: "Literature Review", fundingThreshold: 5000, tasks: [ { label: "Systematic review", completed: true }, { label: "Gap analysis", completed: true }, ] }, { name: "Field Work", fundingThreshold: 15000, tasks: [ { label: "Site visits", completed: false }, { label: "Interviews & surveys", completed: false }, ] }, ], } as OutcomeNodeData }, { id: "publications", type: "outcome", position: { x: 60, y: 1900 }, data: { label: "Publications", description: "Research papers and policy briefs", fundingReceived: 0, fundingTarget: 10000, status: "not-started", phases: [ { name: "Drafting", fundingThreshold: 5000, tasks: [ { label: "Working paper draft", completed: false }, ] }, { name: "Peer Review", fundingThreshold: 10000, tasks: [ { label: "Submit to journal", completed: false }, ] }, ], } as OutcomeNodeData }, // Bob's outcomes { id: "infrastructure", type: "outcome", position: { x: 200, y: 1900 }, data: { label: "Infrastructure", description: "Shared infrastructure and hosting", fundingReceived: 0, fundingTarget: 20000, status: "not-started", phases: [ { name: "Provisioning", fundingThreshold: 8000, tasks: [ { label: "Server setup", completed: true }, { label: "CI/CD pipeline", completed: true }, ] }, { name: "Hardening", fundingThreshold: 20000, tasks: [ { label: "Security audit", completed: false }, { label: "Disaster recovery plan", completed: false }, ] }, ], } as OutcomeNodeData }, { id: "prototypes", type: "outcome", position: { x: 480, y: 1900 }, data: { label: "Prototypes", description: "Rapid prototyping of new tools", fundingReceived: 0, fundingTarget: 12000, status: "not-started", phases: [ { name: "Discovery", fundingThreshold: 4000, tasks: [ { label: "User interviews", completed: true }, ] }, { name: "Build", fundingThreshold: 8000, tasks: [ { label: "MVP development", completed: false }, ] }, { name: "Test", fundingThreshold: 12000, tasks: [ { label: "User testing rounds", completed: false }, ] }, ], } as OutcomeNodeData }, // Carol's outcomes { id: "comms-strategy", type: "outcome", position: { x: 560, y: 1900 }, data: { label: "Comms Strategy", description: "Community communications and outreach", fundingReceived: 0, fundingTarget: 12000, status: "not-started", phases: [ { name: "Planning", fundingThreshold: 4000, tasks: [ { label: "Stakeholder mapping", completed: true }, { label: "Channel audit", completed: true }, ] }, { name: "Execution", fundingThreshold: 8000, tasks: [ { label: "Newsletter launch", completed: true }, { label: "Social media calendar", completed: true }, ] }, { name: "Review", fundingThreshold: 12000, tasks: [ { label: "Impact metrics report", completed: false }, ] }, ], } as OutcomeNodeData }, { id: "event-series", type: "outcome", position: { x: 840, y: 1900 }, data: { label: "Event Series", description: "Quarterly community gatherings", fundingReceived: 0, fundingTarget: 15000, status: "not-started", phases: [ { name: "Venue & Logistics", fundingThreshold: 5000, tasks: [ { label: "Venue scouting", completed: true }, { label: "Catering contracts", completed: true }, ] }, { name: "Programming", fundingThreshold: 10000, tasks: [ { label: "Speaker invitations", completed: false }, { label: "Workshop facilitation", completed: false }, ] }, ], } as OutcomeNodeData }, // Dave's outcomes { id: "design-system", type: "outcome", position: { x: 940, y: 1900 }, data: { label: "Design System", description: "Shared UI/UX design system", fundingReceived: 0, fundingTarget: 15000, status: "not-started", phases: [ { name: "Foundations", fundingThreshold: 5000, tasks: [ { label: "Color & type system", completed: true }, { label: "Component library", completed: true }, ] }, { name: "Documentation", fundingThreshold: 10000, tasks: [ { label: "Storybook setup", completed: true }, { label: "Usage guidelines", completed: true }, ] }, { name: "Rollout", fundingThreshold: 15000, tasks: [ { label: "Team training", completed: false }, ] }, ], } as OutcomeNodeData }, { id: "user-testing", type: "outcome", position: { x: 1220, y: 1900 }, data: { label: "User Testing", description: "Usability research and testing program", fundingReceived: 0, fundingTarget: 8000, status: "not-started", phases: [ { name: "Recruitment", fundingThreshold: 3000, tasks: [ { label: "Participant pool setup", completed: false }, ] }, { name: "Testing Rounds", fundingThreshold: 8000, tasks: [ { label: "5 usability rounds", completed: false }, { label: "Accessibility audit", completed: false }, ] }, ], } as OutcomeNodeData }, // Eve's outcomes { id: "legal-framework", type: "outcome", position: { x: 1320, y: 1900 }, data: { label: "Legal Framework", description: "Legal structure and agreements", fundingReceived: 0, fundingTarget: 10000, status: "not-started", phases: [ { name: "Research", fundingThreshold: 4000, tasks: [ { label: "Jurisdiction analysis", completed: true }, { label: "Entity comparison", completed: true }, ] }, { name: "Formation", fundingThreshold: 10000, tasks: [ { label: "Articles of incorporation", completed: false }, { label: "Operating agreement", completed: false }, ] }, ], } as OutcomeNodeData }, { id: "compliance", type: "outcome", position: { x: 1600, y: 1900 }, data: { label: "Compliance", description: "Regulatory compliance and reporting", fundingReceived: 0, fundingTarget: 12000, status: "not-started", phases: [ { name: "Assessment", fundingThreshold: 4000, tasks: [ { label: "Compliance gap analysis", completed: true }, ] }, { name: "Implementation", fundingThreshold: 8000, tasks: [ { label: "KYC/AML procedures", completed: false }, ] }, { name: "Audit", fundingThreshold: 12000, tasks: [ { label: "External audit", completed: false }, ] }, ], } as OutcomeNodeData }, { id: "governance-model", type: "outcome", position: { x: 1600, y: 2100 }, data: { label: "Governance Model", description: "Governance framework and voting mechanisms", fundingReceived: 0, fundingTarget: 8000, status: "not-started", phases: [ { name: "Design", fundingThreshold: 3000, tasks: [ { label: "Governance charter draft", completed: false }, ] }, { name: "Implementation", fundingThreshold: 8000, tasks: [ { label: "Voting mechanism setup", completed: false }, { label: "Dispute resolution process", completed: false }, ] }, ], } as OutcomeNodeData }, ]; /** * Simulation Demo — multi-layer network with overflow cascading down and back up. * * 2 sources → treasury → 3 domain funnels → 4 sub-funnels → 8 outcomes. * Overflow paths: treasury → reserve, ops → community, research → community, * community → reserve, reserve → treasury (back up!), sub-funnels cross-flow. * All currentValue and fundingReceived start at 0. * Press Play to watch resources flow through the entire system. */ export const simDemoNodes: FlowNode[] = [ // ═══════════════════════════════════════════════════════ // Layer 0 — Sources (Y=-400) // ═══════════════════════════════════════════════════════ { id: "src-grants", type: "source", position: { x: 350, y: -400 }, data: { label: "Grants", flowRate: 10000, sourceType: "card", targetAllocations: [{ targetId: "treasury", percentage: 100, color: "#10b981" }], } as SourceNodeData, }, { id: "src-earned", type: "source", position: { x: 850, y: -400 }, data: { label: "Earned Revenue", flowRate: 6000, sourceType: "card", targetAllocations: [{ targetId: "treasury", percentage: 100, color: "#06b6d4" }], } as SourceNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 1 — Central Treasury (Y=0) // ═══════════════════════════════════════════════════════ { id: "treasury", type: "funnel", position: { x: 500, y: 0 }, data: { label: "Treasury", currentValue: 0, desiredOutflow: 4000, minThreshold: 4000, sufficientThreshold: 16000, maxThreshold: 24000, maxCapacity: 36000, inflowRate: 16000, dynamicOverflow: true, overflowAllocations: [ { targetId: "reserve", percentage: 100, color: OVERFLOW_COLORS[0] }, ], spendingAllocations: [ { targetId: "ops", percentage: 35, color: SPENDING_COLORS[0] }, { targetId: "research", percentage: 35, color: SPENDING_COLORS[1] }, { targetId: "community", percentage: 30, color: SPENDING_COLORS[2] }, ], } as FunnelNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 2 — Domain Funnels (Y=600) // ═══════════════════════════════════════════════════════ { id: "ops", type: "funnel", position: { x: 80, y: 600 }, data: { label: "Operations", currentValue: 0, desiredOutflow: 1500, minThreshold: 1500, sufficientThreshold: 6000, maxThreshold: 9000, maxCapacity: 13500, inflowRate: 0, overflowAllocations: [ { targetId: "community", percentage: 100, color: OVERFLOW_COLORS[0] }, ], spendingAllocations: [ { targetId: "infra-team", percentage: 55, color: SPENDING_COLORS[0] }, { targetId: "admin-team", percentage: 45, color: SPENDING_COLORS[1] }, ], } as FunnelNodeData, }, { id: "research", type: "funnel", position: { x: 500, y: 600 }, data: { label: "Research", currentValue: 0, desiredOutflow: 1400, minThreshold: 1400, sufficientThreshold: 5600, maxThreshold: 8400, maxCapacity: 12600, inflowRate: 0, overflowAllocations: [ { targetId: "community", percentage: 100, color: OVERFLOW_COLORS[1] }, ], spendingAllocations: [ { targetId: "science-team", percentage: 60, color: SPENDING_COLORS[2] }, { targetId: "tools-team", percentage: 40, color: SPENDING_COLORS[3] }, ], } as FunnelNodeData, }, { id: "community", type: "funnel", position: { x: 920, y: 600 }, data: { label: "Community", currentValue: 0, desiredOutflow: 1000, minThreshold: 1000, sufficientThreshold: 4000, maxThreshold: 6000, maxCapacity: 9000, inflowRate: 0, overflowAllocations: [ { targetId: "reserve", percentage: 100, color: OVERFLOW_COLORS[2] }, ], spendingAllocations: [ { targetId: "events", percentage: 50, color: SPENDING_COLORS[4] }, { targetId: "outreach", percentage: 50, color: SPENDING_COLORS[5] }, ], } as FunnelNodeData, }, { id: "reserve", type: "funnel", position: { x: 1340, y: 600 }, data: { label: "Reserve Fund", currentValue: 0, desiredOutflow: 500, minThreshold: 500, sufficientThreshold: 5000, maxThreshold: 10000, maxCapacity: 20000, inflowRate: 0, overflowAllocations: [ { targetId: "treasury", percentage: 100, color: OVERFLOW_COLORS[3] }, ], spendingAllocations: [ { targetId: "rainy-day", percentage: 100, color: SPENDING_COLORS[5] }, ], } as FunnelNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 3 — Sub-team Funnels (Y=1250) // ═══════════════════════════════════════════════════════ { id: "infra-team", type: "funnel", position: { x: -100, y: 1250 }, data: { label: "Infra Team", currentValue: 0, desiredOutflow: 800, minThreshold: 800, sufficientThreshold: 3200, maxThreshold: 4800, maxCapacity: 7200, inflowRate: 0, overflowAllocations: [ { targetId: "admin-team", percentage: 100, color: OVERFLOW_COLORS[4] }, ], spendingAllocations: [ { targetId: "servers", percentage: 60, color: SPENDING_COLORS[0] }, { targetId: "devops", percentage: 40, color: SPENDING_COLORS[1] }, ], } as FunnelNodeData, }, { id: "admin-team", type: "funnel", position: { x: 280, y: 1250 }, data: { label: "Admin Team", currentValue: 0, desiredOutflow: 700, minThreshold: 700, sufficientThreshold: 2800, maxThreshold: 4200, maxCapacity: 6300, inflowRate: 0, overflowAllocations: [ { targetId: "ops", percentage: 100, color: OVERFLOW_COLORS[5] }, ], spendingAllocations: [ { targetId: "legal", percentage: 50, color: SPENDING_COLORS[2] }, { targetId: "accounting", percentage: 50, color: SPENDING_COLORS[3] }, ], } as FunnelNodeData, }, { id: "science-team", type: "funnel", position: { x: 660, y: 1250 }, data: { label: "Science Team", currentValue: 0, desiredOutflow: 900, minThreshold: 900, sufficientThreshold: 3600, maxThreshold: 5400, maxCapacity: 8100, inflowRate: 0, overflowAllocations: [ { targetId: "tools-team", percentage: 100, color: OVERFLOW_COLORS[0] }, ], spendingAllocations: [ { targetId: "papers", percentage: 60, color: SPENDING_COLORS[4] }, { targetId: "field-work", percentage: 40, color: SPENDING_COLORS[5] }, ], } as FunnelNodeData, }, { id: "tools-team", type: "funnel", position: { x: 1040, y: 1250 }, data: { label: "Tools Team", currentValue: 0, desiredOutflow: 600, minThreshold: 600, sufficientThreshold: 2400, maxThreshold: 3600, maxCapacity: 5400, inflowRate: 0, overflowAllocations: [ { targetId: "research", percentage: 100, color: OVERFLOW_COLORS[1] }, ], spendingAllocations: [ { targetId: "tooling", percentage: 100, color: SPENDING_COLORS[0] }, ], } as FunnelNodeData, }, // ═══════════════════════════════════════════════════════ // Layer 4 — Outcomes (Y=1900) // ═══════════════════════════════════════════════════════ // Infra Team outcomes { id: "servers", type: "outcome", position: { x: -220, y: 1900 }, data: { label: "Servers & Hosting", description: "Cloud infrastructure and hosting", fundingReceived: 0, fundingTarget: 15000, status: "not-started" } as OutcomeNodeData }, { id: "devops", type: "outcome", position: { x: 0, y: 1900 }, data: { label: "DevOps Pipeline", description: "CI/CD and deployment automation", fundingReceived: 0, fundingTarget: 10000, status: "not-started" } as OutcomeNodeData }, // Admin Team outcomes { id: "legal", type: "outcome", position: { x: 200, y: 1900 }, data: { label: "Legal & Compliance", description: "Legal structure and regulatory work", fundingReceived: 0, fundingTarget: 12000, status: "not-started" } as OutcomeNodeData }, { id: "accounting", type: "outcome", position: { x: 420, y: 1900 }, data: { label: "Accounting", description: "Bookkeeping and financial reporting", fundingReceived: 0, fundingTarget: 8000, status: "not-started" } as OutcomeNodeData }, // Science Team outcomes { id: "papers", type: "outcome", position: { x: 560, y: 1900 }, data: { label: "Research Papers", description: "Academic publications and reports", fundingReceived: 0, fundingTarget: 18000, status: "not-started" } as OutcomeNodeData }, { id: "field-work", type: "outcome", position: { x: 780, y: 1900 }, data: { label: "Field Work", description: "On-site research and data collection", fundingReceived: 0, fundingTarget: 14000, status: "not-started" } as OutcomeNodeData }, // Tools Team outcome { id: "tooling", type: "outcome", position: { x: 960, y: 1900 }, data: { label: "R&D Tooling", description: "Prototyping and development tools", fundingReceived: 0, fundingTarget: 10000, status: "not-started" } as OutcomeNodeData }, // Community outcomes (direct from domain funnel) { id: "events", type: "outcome", position: { x: 1100, y: 1900 }, data: { label: "Events", description: "Meetups and conferences", fundingReceived: 0, fundingTarget: 8000, status: "not-started" } as OutcomeNodeData }, { id: "outreach", type: "outcome", position: { x: 1300, y: 1900 }, data: { label: "Outreach", description: "Marketing and community building", fundingReceived: 0, fundingTarget: 6000, status: "not-started" } as OutcomeNodeData }, // Reserve outcome { id: "rainy-day", type: "outcome", position: { x: 1500, y: 1900 }, data: { label: "Rainy Day Fund", description: "Emergency reserves and contingency", fundingReceived: 0, fundingTarget: 25000, status: "not-started" } as OutcomeNodeData }, ];