Skip to content

docs: make JavaScript examples executable - #232

Merged
pgarciagon merged 5 commits into
devfrom
codex/executable-javascript-examples
Jul 23, 2026
Merged

docs: make JavaScript examples executable#232
pgarciagon merged 5 commits into
devfrom
codex/executable-javascript-examples

Conversation

@pgarciagon

@pgarciagon pgarciagon commented Jul 23, 2026

Copy link
Copy Markdown

Summary

This PR consolidates the earlier Getting Started review from #231 with the
executable JavaScript example rollout. It supersedes #231.

  • modernizes the Getting Started landing page, account/key safety, Kondor,
    Koinos CLI, Koinos overview, and tooling guidance
  • keeps the current public testnet endpoint and reset-aware safety guidance
  • adds 7 self-contained projects under examples/javascript/
  • makes all 50 active JavaScript examples across 20 pages include canonical
    source through checked PyMdown snippets
  • adds visible complete-source and runner links for all 50 examples
  • replaces broken Koilib reference placeholders with real Koilib 9.2.0 exports
    and tested behavior
  • adds exact-version workspaces, unit tests, live smoke reads, syntax/link
    enforcement, clean-start checks, and CI

The cross-chapter example scope is intentional and user-authorized. Changes
outside Getting Started are limited to replacing or supporting JavaScript
examples.

Inventory

Dimension Count
Active examples 50
Documentation pages 20
Independent projects 7
Node.js / browser 39 / 11
Mainnet / testnet / wallet-selected / no network 11 / 23 / 10 / 6
Read-only / dry-run / local-only 22 / 14 / 8
Wallet user approval 5
Local testnet credential required 1

The machine-readable inventory is examples/javascript/manifest.json. It
records page, line, purpose, runtime, dependencies, network, safety class,
project, canonical source section, and runner metadata for every active fence.

Safety decisions

  • mainnet examples are read-only
  • all transaction construction and deployment material targets the current
    Koinos Foundation public testnet
  • transaction and deployment execution defaults to dry-run
  • testnet broadcast requires both BROADCAST=true and a locally supplied
    TESTNET_WIF
  • no WIF, private key, recovery phrase, wallet password, or production secret
    is embedded or requested in a hosted runner
  • faucet use is documented as a Telegram command; no Telegram credentials or
    faucet-account access are automated
  • the Kondor project signs a local message only; wallet actions remain separate
    user gestures and the hosted-runner limitation is explicit

Current-source validation

Implementation was checked against:

Live smoke runs confirmed the mainnet and current testnet chain IDs, current
heads, testnet health, contract metadata, the testnet KOIN contract, and
read-only REST responses.

Verification

The following passed:

npm run examples:verify
npm run examples:syntax
npm run examples:test
npm run examples:start
npm run examples:smoke
npm run docs:links
npm run build --workspace examples/javascript/browser/kondor-dapp
docs-venv/bin/mkdocs build
git diff --check

Evidence:

  • strict manifest verifier: 50 documented fences / 50 entries
  • syntax check: 21 JavaScript files
  • unit tests: all 7 workspaces pass; transaction tests never broadcast and
    browser tests use a mocked wallet/provider
  • project starts and smoke checks: all 7 projects pass, including live mainnet
    and current-testnet reads
  • browser tutorial: Vite production build passes
  • internal-link checker: passes with two explicit pre-existing exceptions
  • local visual pass: all six reconciled Getting Started pages render with the
    expected headings and controls; no snippet directive is exposed

Feature-ref StackBlitz imports resolved the correct package/project titles, but
the in-app WebContainer remained at Mounting environment in StackBlitz.
Local clean starts and live smoke runs therefore provide the execution evidence.
Permanent runner links target master, the repository publication branch, so
they resolve after promotion rather than retaining a disposable feature ref.

Known pre-existing warnings

MkDocs still reports these unrelated warnings from origin/dev:

  • nav entry exchanges/jsonrpc.md does not exist
  • docs/index.md links to missing interacting/koilib.md

Commit groups

  1. infrastructure and initial Getting Started example
  2. read-only Interacting and Koilib references
  3. transactions, current testnet, exchange transfer, and governance
  4. Kondor, frontend, contracts, and CI enforcement
  5. consolidated Getting Started review from Modernize Getting Started documentation #231

@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for koinos-documentation ready!

Name Link
🔨 Latest commit 31d3568
🔍 Latest deploy log https://app.netlify.com/projects/koinos-documentation/deploys/6a6279b3c3bff80008ea1fa9
😎 Deploy Preview https://deploy-preview-232--koinos-documentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pgarciagon
pgarciagon force-pushed the codex/executable-javascript-examples branch 3 times, most recently from e1396d7 to d5a052c Compare July 23, 2026 20:06
@pgarciagon
pgarciagon force-pushed the codex/executable-javascript-examples branch from d5a052c to b13a8a0 Compare July 23, 2026 20:12
@pgarciagon
pgarciagon marked this pull request as ready for review July 23, 2026 20:31
@pgarciagon
pgarciagon merged commit fe6a39c into dev Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants