periodStats (funnel/model.ts)

FounderOS · components/funnel/model.ts · typescript · MIT
crm

* Pure funnel view maths for the GladOS tree (glados-ui SPEC S02 §4.2, §7: "all new numbers derive from data already on the client"). The same rules as the Classic FunnelDashboard, lifted out so they are unit-tested; the Classic file keeps its own copy until the Classic decision

// Source: https://github.com/Bennettxai/FounderOS | License: MIT | Copyright 2026 FounderOS
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Pure funnel view maths for the GladOS tree (glados-ui SPEC S02 §4.2, §7:
 * "all new numbers derive from data already on the client"). The same rules
 * as the Classic FunnelDashboard, lifted out so they are unit-tested; the
 * Classic file keeps its own copy until the Classic decision (X5, Phase 6).
 * Client-safe: no node imports.
 */
import { FUNNEL_STAGES, funnelSummary } from '@/lib/funnel';
import type { FunnelJourney, FunnelStage } from '@/lib/schemas';
import type { Compare, Lane, Period } from './state';

export const DAY = 86_400_000;
export const PERIODS: { id: Period; label: string }[] = [
  { id: 30, label: 'Last 3

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key