'use client' import { useState } from 'react' interface Demo { number: number title: string description: string path: string type: string status: 'complete' | 'beta' | 'prototype' features: string[] milestone?: string screenshot?: string } const demos: Record = { tbff: [ { number: 1, title: 'Threshold-Based Flow Funding (Interactive)', description: 'Complete interactive demo with Milestones 1-3: Static visualization, interactive allocations, and initial distribution algorithm. Create accounts, draw allocation arrows, add funding, and watch resources flow.', path: '/tbff', type: 'Interactive Simulation', status: 'complete', milestone: 'Milestones 1-3 Complete', screenshot: '/screenshots/tbff.png', features: [ 'Visual threshold-based coloring', 'Interactive allocation creation', 'Automatic normalization', 'Initial distribution algorithm', 'Multiple sample networks', 'Real-time balance updates' ] }, { number: 2, title: 'TBFF Flow Simulation', description: 'Alternative implementation exploring continuous flow dynamics with progressive outflow ratios.', path: '/tbff-flow', type: 'Flow Simulation', status: 'beta', screenshot: '/screenshots/tbff-flow.png', features: [ 'Continuous flow mechanics', 'Progressive outflow', 'Network equilibrium', 'Visual flow indicators' ] } ], flowV2: [ { number: 3, title: 'Flow Funding V2: Continuous Flow Dynamics', description: 'Redesigned as continuous per-second flow simulation with per-month UI. Features progressive outflow formula ensuring monotonic increase in sharing as accounts approach "enough".', path: '/flow-v2', type: 'Continuous Flow', status: 'complete', screenshot: '/screenshots/flow-v2.png', features: [ 'Per-second simulation engine', 'Progressive outflow formula (fixed)', 'Network overflow node', 'Smooth 60 FPS rendering', 'Animated flow particles', 'Time-scale architecture' ] } ], canvas: [ { number: 4, title: 'Italism: Interactive Canvas with Propagators', description: 'Original canvas demo with live propagators. Draw shapes, connect them with arrows, and watch data flow through the network. Foundation for malleable software vision.', path: '/italism', type: 'Live Programming Canvas', status: 'complete', screenshot: '/screenshots/italism.png', features: [ 'Live arrow propagators', 'Shape drawing and editing', 'Expression-based connections', 'Undo/redo functionality', 'Real-time data flow', 'FolkJS-inspired architecture' ] } ], prototypes: [ { number: 5, title: 'Flow Funding (Original)', description: 'Earlier prototype exploring initial flow funding concepts.', path: '/flowfunding', type: 'Prototype', status: 'prototype', screenshot: '/screenshots/flowfunding.png', features: [ 'Basic flow mechanics', 'Threshold visualization', 'Network simulation' ] } ] } export default function DemosPage() { const [searchTerm, setSearchTerm] = useState('') const [activeFilter, setActiveFilter] = useState('all') const allDemos = Object.values(demos).flat() const totalDemos = allDemos.length const completeDemos = allDemos.filter(d => d.status === 'complete').length const betaDemos = allDemos.filter(d => d.status === 'beta').length const categories = [ { id: 'all', label: 'All Demos', count: totalDemos }, { id: 'tbff', label: 'TBFF Interactive', count: demos.tbff.length, icon: '🎯' }, { id: 'flowV2', label: 'Flow Dynamics V2', count: demos.flowV2.length, icon: '🌊' }, { id: 'canvas', label: 'Interactive Canvas', count: demos.canvas.length, icon: '🎨' }, { id: 'prototypes', label: 'Prototypes', count: demos.prototypes.length, icon: '🔬' } ] const getStatusColor = (status: string) => { switch (status) { case 'complete': return 'bg-green-500' case 'beta': return 'bg-yellow-500' case 'prototype': return 'bg-gray-500' default: return 'bg-gray-400' } } const getStatusLabel = (status: string) => { switch (status) { case 'complete': return 'Complete' case 'beta': return 'Beta' case 'prototype': return 'Prototype' default: return status } } return (
{/* Header */}

💧 Flow Funding Demos

Exploring Threshold-Based Resource Allocation & Post-Appitalism

Interactive demonstrations of flow funding mechanisms, from threshold-based redistribution to continuous flow dynamics. Experience economics as living, breathing systems.

{/* Stats */}
{totalDemos}
Total Demos
{completeDemos}
Complete
{betaDemos}
Beta
3
Categories
{/* Search & Filter */}
setSearchTerm(e.target.value)} />
{categories.map(cat => ( ))}
{/* Demo Categories */} {Object.entries(demos).map(([categoryKey, categoryDemos]) => { if (activeFilter !== 'all' && activeFilter !== categoryKey) return null const categoryInfo = { tbff: { title: 'Threshold-Based Flow Funding', icon: '🎯', desc: 'Interactive demos with allocation creation and distribution algorithms' }, flowV2: { title: 'Flow Dynamics V2', icon: '🌊', desc: 'Continuous per-second flow simulation with progressive outflow' }, canvas: { title: 'Interactive Canvas', icon: '🎨', desc: 'Live programming environment with propagator networks' }, prototypes: { title: 'Early Prototypes', icon: '🔬', desc: 'Initial explorations and concept validation' } }[categoryKey] || { title: categoryKey, icon: '📁', desc: '' } return (
{categoryInfo.icon}

{categoryInfo.title}

{categoryInfo.desc}

{categoryDemos.length} {categoryDemos.length === 1 ? 'demo' : 'demos'}
{categoryDemos .filter(demo => { if (!searchTerm) return true const searchLower = searchTerm.toLowerCase() return ( demo.title.toLowerCase().includes(searchLower) || demo.description.toLowerCase().includes(searchLower) || demo.type.toLowerCase().includes(searchLower) || demo.features.some(f => f.toLowerCase().includes(searchLower)) ) }) .map(demo => ( {/* Screenshot Preview */} {demo.screenshot && (
{`${demo.title}
👁️ Click to view
)} {/* Card Header */}
{/* Card Content */}
#{demo.number} {getStatusLabel(demo.status)}

{demo.title}

{demo.milestone && (
✅ {demo.milestone}
)}

{demo.description}

Key Features:
{demo.features.slice(0, 3).map((feature, idx) => ( {feature} ))} {demo.features.length > 3 && ( +{demo.features.length - 3} more )}
{demo.type} Launch Demo →
))}
) })} {/* Footer */}
) }