Inspiration

Every construction project runs on two clocks: schedule and money. Yet, these two are often managed in disconnected systems.

A delayed invoice is rarely just a finance problem. It can leave specialist crews idle, delay dependent milestones, disrupt procurement, and increase contractual penalties. By the time teams understand the full financial impact, the damage may already be spreading across the project.

We wanted to bridge this gap.

Our vision was to build an operating system that understands the relationship between project execution and financial health — one that can identify the consequences of a delay, calculate its downstream impact, recommend a recovery strategy, validate that strategy against deterministic policies, and help teams act with accountability.

That vision became CascadeOS: a payment-aware delivery operating system that keeps project schedules and financial decisions in sync.

What it does

CascadeOS connects project milestones, supplier procurement, crew schedules, and financial workflows into one intelligent workspace.

Using the Apex Diagnostic Clinic & Studio Buildout as our demonstration project, we show how a single blocked invoice can affect an entire construction schedule — and how teams can respond before the situation escalates.

Our core capabilities include:

  1. Payment-Coupled Milestones: Every project phase tracks its invoice status (PAID, PAYMENT_BLOCKED, OVERDUE), material staging readiness, crew allocation, and daily idle burn rate. Financial state becomes part of delivery visibility rather than a disconnected accounting record.

  2. Downstream Blast-Radius Engine: When a payment blocks a milestone, CascadeOS traverses the dependency graph to calculate the transitive impact across downstream phases. In our demonstration scenario, this reveals $3,660 in idle crew costs and $1,440 in SLA penalties — a combined exposure of $5,100.

  3. Channel3 Procurement Intelligence: Through the Channel3 Product Graph API, CascadeOS compares incumbent supplier quotes with alternative retailer pricing. It helps teams identify potential price creep, evaluate alternatives, and make procurement decisions with market-price evidence.

  4. Deterministic Schedule Recovery: Rather than asking generative AI to invent a schedule, CascadeOS uses dependency-aware graph processing and Kahn's topological sorting algorithm to evaluate valid execution sequences. It proposes advancing independent, warehouse-ready networking work (Phase 3) while deferring the payment-blocked display installation (Phase 2).

  5. Fail-Closed Policy Engine: A deterministic policy matrix evaluates financial and operational constraints, including budget caps, supplier price variance, dependency completion, warehouse readiness, and cost completeness. If required freight or tax information is unknown, the system blocks approval instead of silently treating missing values as zero.

  6. SHA-256 Approval-State Binding: Approval decisions are bound to a SHA-256 fingerprint of the reviewed project state. If relevant state changes before execution, the backend can reject a stale approval with HTTP 409.

  7. PayPal Payment Workflows: PayPal Sandbox integration supports invoice and order workflows, payment reminders, and a proposed materials-versus-labor split. In our demonstration, $1,396 is allocated toward immediate materials funding while $3,104 is deferred for labor.

  8. Distributed FinOps Automation with Render Workflows: CascadeOS orchestrates a three-stage background pipeline that reconciles PayPal invoice statuses, audits hardware procurement through Channel3, and evaluates downstream delay exposure. Durable tasks, automatic retries, exponential backoff, and workflow replay recovery help make these operations resilient to transient failures.

  9. AI FinOps Assistant: Teams can investigate project risks, compare supplier quotes, and ask why a policy decision was blocked using natural language. The assistant invokes project-aware application tools and explains the results in plain English.

  10. Interactive Scheduling and Analytics: Bryntum Gantt provides an interactive view of milestones, dependencies, and schedule changes. Embedded AG Studio dashboards provide custom FinOps analytics and interactive financial views.

  11. Auditable Decision History: Important project, approval, and payment events are recorded in an SQLite-backed audit history, with JSON and Markdown export for inspection.

The central idea is to move beyond project monitoring: CascadeOS helps teams understand what is going wrong, what it will cost, and what they can safely do next — while continuously coordinating the background work needed to keep that picture up to date.

How we built it

CascadeOS is built as a full-stack TypeScript monorepo, combining a React frontend, Node.js backend, financial integrations, scheduling algorithms, distributed workflows, and an AI-powered interaction layer.

1. Project and scheduling engine

  • Built the frontend with React, TypeScript, and Vite.
  • Integrated @bryntum/gantt-react for interactive Gantt scheduling, milestone visualization, and dependency management.
  • Modeled project phases as a directed dependency graph.
  • Used Kahn's topological sorting algorithm to reason about valid execution ordering and recovery proposals.

2. Financial and procurement integrations

  • Integrated the Channel3 Product Graph API for product discovery, multi-retailer comparisons, and supplier price analysis.
  • Implemented PayPal Invoicing v2 and Orders v2 workflows for invoice creation, order handling, payment reminders, and partial-payment scenarios.
  • Built a typed PayPal transport layer using official OpenAPI specifications and APIMatic-generated API contracts.
  • Incorporated request idempotency and secret redaction into the payment integration.

3. Distributed orchestration with Render Workflows

We integrated the official @renderinc/sdk to move recurring and multi-step FinOps operations into durable background workflows.

The orchestration is implemented in server/src/workflows/finopsWorkflow.ts and consists of three durable tasks:

  • reconcilePayPalInvoicesTask: Inspects active PayPal Sandbox invoices and reconciles their payment status to identify blocked payments.
  • auditHardwareProcurementTask: Queries the Channel3 Product Graph API across retailers and audits hardware pricing against historical baselines.
  • evaluateDelayExposureTask: Executes dependency-graph analysis using Kahn's algorithm to calculate downstream idle crew costs and SLA penalties.

These tasks are coordinated by cascadeDeliveryFinOpsFlow, which executes the three stages sequentially:

reconcile-invoices → audit-channel3-procurement → evaluate-blast-radius

We configured automatic retries with exponential backoff, execution timeouts, and replay recovery. This allows the pipeline to recover from transient failures without requiring every operation to be manually restarted.

CascadeOS is also designed for deployment on Render, with a render.yaml deployment blueprint and persistent storage configuration for SQLite.

4. Deterministic governance and financial correctness

  • Implemented a policy engine that evaluates explicit business invariants before sensitive actions are approved.
  • Enforced fail-closed behavior for unknown financial inputs.
  • Used integer minor-unit arithmetic for currency calculations to avoid floating-point errors. For example, $1,396.00 is represented as 139600 cents.
  • Bound approvals to SHA-256 fingerprints of the reviewed state and added backend validation against stale or replayed approvals.

5. AI and conversational intelligence

  • Integrated Groq-hosted OSS models and OpenAI for natural-language interactions and structured generation workflows.
  • Implemented tool-calling so the FinOps Assistant can inspect actual application data rather than relying exclusively on conversational context.
  • Used AI for project blueprinting assistance, financial explanations, and collaborative payment-reminder drafting.
  • Kept financial policy enforcement and approval validation deterministic rather than delegating those decisions to the language model.

6. Analytics, persistence, and auditability

  • Integrated AG Studio through ag-studio-react, with embedded analytics and custom FinOps widgets.
  • Used Zod validation for structured widget data.
  • Built the backend using Node.js, Express, and better-sqlite3.
  • Configured SQLite in WAL mode and implemented structured audit-event recording and export workflows.

Challenges we ran into

The stale approval problem

A supplier quote or project date can change after a manager opens an approval screen. Executing the previously reviewed plan could create financial or scheduling inconsistencies. We addressed this by generating a canonical SHA-256 fingerprint of the reviewed state and validating it again on the backend before execution.

Financial precision and incomplete costs

Currency calculations involving quantities, freight, taxes, and split invoices can introduce rounding errors. We adopted integer minor-unit arithmetic throughout financial calculations. We also learned that an unknown freight or tax value must never be silently interpreted as zero, so incomplete cost information now fails closed.

Acyclic schedule recovery

Reordering construction phases dynamically can introduce circular dependencies or invalidate downstream work. We implemented graph-based dependency processing and Kahn's topological sorting to validate proposed execution sequences before applying schedule changes.

Reliable distributed execution

Coordinating PayPal and Channel3 operations introduces external API failures, transient network issues, and interrupted execution. We addressed this by introducing Render Workflows, separating the pipeline into durable tasks with retry policies, exponential backoff, timeouts, and replay recovery.

Keeping AI separate from financial authority

We wanted an assistant capable of investigating complex situations without allowing an LLM to make unchecked financial decisions. Separating conversational tool-calling from deterministic policy validation became one of the most important architectural decisions in CascadeOS.

Accomplishments that we're proud of

  • Built an end-to-end construction delivery and financial operations platform rather than another isolated project-management dashboard.
  • Connected project scheduling, dependency analysis, procurement intelligence, financial exposure, recovery planning, and payment workflows.
  • Integrated Channel3 supplier intelligence and PayPal Sandbox payment capabilities.
  • Implemented deterministic dependency-aware recovery planning using graph algorithms.
  • Built a distributed three-stage FinOps orchestration pipeline using the official Render Workflows SDK, with durable tasks and automatic retry/recovery behavior.
  • Built an AI FinOps Assistant that uses application tools to investigate project state and explain findings conversationally.
  • Established a clear separation between generative AI recommendations and deterministic financial governance.
  • Strengthened payment idempotency, webhook security, stale-approval handling, and fail-closed financial validation.
  • Added regression tests and achieved 189 passing server tests and 19 passing client tests, successful monorepo typechecking, and a successful production build.

We are particularly proud of building a system where AI, financial workflows, graph algorithms, distributed orchestration, and human approval work together without allowing convenience to compromise financial correctness.

What we learned

  • Delays propagate financially. A blocked milestone can affect multiple downstream teams and create costs far beyond the original invoice.
  • Unknown is not zero. Financial systems must distinguish missing information from a confirmed zero value.
  • AI should assist, not replace governance. Language models are excellent at interpreting questions and communicating findings, but sensitive financial decisions need deterministic validation and human authorization.
  • Distributed workflows must expect retries. Payment captures, webhooks, and external API calls require idempotency and careful reconciliation.
  • Durability changes how we design systems. Background tasks need to survive transient failures and resume from reliable execution boundaries rather than depending on one uninterrupted process.
  • Algorithms matter in real-world operations. Graph theory is not just an academic concept; it can help determine which work can safely proceed when a project changes unexpectedly.
  • Trust is an architectural property. Approval-state validation, audit records, and transparent policy decisions need to be designed into the system from the beginning.

What's next for CascadeOS

Our long-term vision is to make CascadeOS an operational intelligence layer for capital projects.

Our next priorities include:

  • Event-Driven FinOps Automation: Expand Render Workflows into scheduled and event-triggered reconciliation, procurement monitoring, and proactive project-risk evaluation.
  • Smart Escrow and Verified Milestone Payments: Release deferred labor payments when installation completion is verified through supervisor approvals, QR scans, or IoT signals.
  • Predictive Supply-Chain Intelligence: Integrate freight tracking, weather data, and supplier availability into schedule-risk calculations.
  • Enterprise ERP Integrations: Connect with platforms such as Procore, Autodesk Construction Cloud, and Oracle Primavera for deeper project and financial synchronization.
  • Predictive Financial Risk: Use historical project data to anticipate schedule slippage, idle costs, supplier price changes, and potential budget overruns.
  • Enterprise Access and Governance: Expand role-based access, project-level permissions, and human-in-the-loop authorization for sensitive operations.
  • Multi-Project Intelligence: Extend CascadeOS from individual project control to portfolio-wide delivery and financial oversight.

Our vision is simple: every project team should know what needs to happen, what it will cost, what is putting delivery at risk, and what can safely happen next.

That's CascadeOS — where project delivery meets financial intelligence.

Built With

Share this project:

Updates

Submission history