Coreflux Templates
General

Deck of Cards API hand dealer

Auto-deal five-card hands from Deck of Cards API and optional Claude table talk for Coreflux LoT.

Dataflow

How it flows

Actions, models, routes and the topics that link them. Click a node to trace its flow.

How it works

This Coreflux LoT template runs a zero-stakes card dealer on a 5-minute action clock. A REST route shuffles a fresh deck, draws five cards, and publishes the hand to demo/cards/hand/#; optional Anthropic commentary adds one line of table talk for each draw.

Key features

  • Fresh deck per hand: shuffles before every draw to avoid deck exhaustion.
  • Two-step REST flow: shuffle_trigger creates a deck_id, then draw_request templates that ID into the draw call.
  • Guarded payloads: gates send bad API replies to feed/fetch_error.
  • Optional AI voice: Claude Haiku via CardNarrator writes one clean line to table/commentary.
  • Hand report: HandReportBuilder publishes a collapsed JSON rollup for each draw.

Prerequisites

  • No account needed for the card API.
  • Optional: Anthropic API key stored as broker secret ANTHROPIC_KEY before deploying CardNarrator.
  • Topics under demo/cards/# are used throughout.
The notebook

What’s inside

Browse the markdown and code cells before you download.

LoT Notebook:demo_card_table.lotnb
Related use cases

Similar templates

Templates chosen for overlap in routes, tags, and category.

View all in General

Get this template

1 file