Skip to content

CI-tested examples/ directory (Stellar-first) #22

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, dx, docs, drips, help-wanted
Tier: L (1–2 weeks)
Type: dx / docs

Context

Today, a developer who wants to see a complete Wraith integration has to:

  1. Read the getting-started.mdx snippets,
  2. Read the stellar-quickstart.mdx snippets (if issue docs/01 has landed),
  3. Look at the demo source for a real wiring.

That's three different mental contexts. We want a self-contained examples/ directory in the SDK repo with complete, runnable, CI-tested sample apps.

Scope

Create sdk/examples/ with subdirectories, starting Stellar-first:

  1. examples/stellar-cli-send/

    • Node CLI script: node send.mjs <recipient-meta-address> <amount>
    • ~50 LOC including imports and error handling.
  2. examples/stellar-cli-scan/

    • Node CLI script: node scan.mjs <viewing-key>
    • Prints any incoming payments to stdout.
  3. examples/stellar-react-receive/

    • Minimal Vite + React app that connects Freighter, derives keys, scans, lists matches.
    • ~150 LOC.
  4. examples/stellar-spectre-agent/

    • Shows how to use the agent client to create a Stellar agent and chat with it.
  5. examples/multichain-scan/

    • Scans EVM, Stellar, and Solana in parallel using the chain-conformance API.

Each example:

  • Has its own package.json with explicit dep on the local SDK build.
  • Has a README.md with prerequisites + run command.
  • Is CI-tested — a workflow installs deps, runs the example against testnet (or a recorded RPC fixture), asserts on stdout.
  • Has a .env.example for any required config.

Tests

  • For CLI examples: snapshot stdout against an expected output.
  • For browser examples: build verification + Playwright headless smoke test (lands in tests/examples/).

Acceptance criteria

  • Five examples committed and runnable.
  • Each one CI-tested.
  • Top-level examples/README.md indexing them with one-liners.
  • Linked from docs/getting-started.mdx.

Why this matters

"Read the docs" is the second-worst onboarding instruction. "Read the code" is the third-worst. "Run this example, then read the code" is the first-best.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdocsDocumentationdripsFunded via Drips NetworkdxDeveloper experiencehelp wantedExtra attention is neededstellarTouches Stellar / Soroban code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions