diff --git a/.github/workflows/dashnote-e2e.yml b/.github/workflows/dashnote-e2e.yml index 5f781ce8..e79ad364 100644 --- a/.github/workflows/dashnote-e2e.yml +++ b/.github/workflows/dashnote-e2e.yml @@ -5,11 +5,19 @@ on: branches: [main] paths: - 'example-apps/dashnote/**' + - 'example-apps/token-ops/src/dash/loginWithPrivateKey.ts' + - 'example-apps/token-ops/src/lib/detectSecretShape.ts' + - 'example-apps/token-ops/src/session/keyManagerFromKey.ts' + - 'scripts/check-shared-auth-parity.sh' - '.github/workflows/dashnote-e2e.yml' pull_request: branches: [main] paths: - 'example-apps/dashnote/**' + - 'example-apps/token-ops/src/dash/loginWithPrivateKey.ts' + - 'example-apps/token-ops/src/lib/detectSecretShape.ts' + - 'example-apps/token-ops/src/session/keyManagerFromKey.ts' + - 'scripts/check-shared-auth-parity.sh' - '.github/workflows/dashnote-e2e.yml' workflow_dispatch: inputs: @@ -30,6 +38,17 @@ concurrency: cancel-in-progress: true jobs: + auth-parity: + name: shared auth parity + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Check shared authentication parity + run: bash scripts/check-shared-auth-parity.sh + e2e-read-only: name: e2e (read-only — smoke + settings) runs-on: ubuntu-latest diff --git a/.github/workflows/token-ops-ci.yml b/.github/workflows/token-ops-ci.yml index 2bc87684..d9a805b0 100644 --- a/.github/workflows/token-ops-ci.yml +++ b/.github/workflows/token-ops-ci.yml @@ -5,11 +5,19 @@ on: branches: [main] paths: - 'example-apps/token-ops/**' + - 'example-apps/dashnote/src/dash/loginWithPrivateKey.ts' + - 'example-apps/dashnote/src/lib/detectSecretShape.ts' + - 'example-apps/dashnote/src/session/keyManagerFromKey.ts' + - 'scripts/check-shared-auth-parity.sh' - '.github/workflows/token-ops-ci.yml' pull_request: branches: [main] paths: - 'example-apps/token-ops/**' + - 'example-apps/dashnote/src/dash/loginWithPrivateKey.ts' + - 'example-apps/dashnote/src/lib/detectSecretShape.ts' + - 'example-apps/dashnote/src/session/keyManagerFromKey.ts' + - 'scripts/check-shared-auth-parity.sh' - '.github/workflows/token-ops-ci.yml' workflow_dispatch: @@ -33,6 +41,9 @@ jobs: with: persist-credentials: false + - name: Check shared authentication parity + run: bash ../../scripts/check-shared-auth-parity.sh + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version-file: .nvmrc diff --git a/README.md b/README.md index 6943c31f..41ff3784 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,13 @@ the normal lifecycle: info, mint, transfer, and burn. Some client configuration options are included as comments in [`setupDashClient.mjs`](./setupDashClient.mjs) if more advanced configuration is required. +## Example Apps + +The [`example-apps`](./example-apps/README.md) directory contains independently runnable React + +TypeScript npm projects that demonstrate Dash Platform concepts in complete browser workflows, +including identities, documents, queries, tokens, and multi-signer groups. The apps have their own +setup instructions and dependencies but share repository-level SDK client helpers. + ## Testing Tests run each tutorial as a subprocess and validate its output. No test framework dependencies are diff --git a/example-apps/README.md b/example-apps/README.md index 5e90448e..04a2bfb9 100644 --- a/example-apps/README.md +++ b/example-apps/README.md @@ -1,12 +1,13 @@ -# Example Apps +# 🚀 Example Apps -Stand-alone applications built on top of the same `@dashevo/evo-sdk` used by the Node tutorials in the parent repo. Each example is an independent npm project — `cd` into its directory and run `npm install` there for the Vite app itself. +Independently runnable applications built on the same `@dashevo/evo-sdk` used by the Node tutorials in the parent repo. Each example has its own npm project — `cd` into its directory and run `npm install` there for the Vite app itself — while sharing the repository-root `setupDashClient-core.mjs` helper for browser SDK setup and key management. Some app scripts still depend on the **repository-root** install. TokenOps `npm run bootstrap:identities` imports the root `setupDashClient.mjs` helper and the root `@dashevo/evo-sdk` copy (to keep a single module instance for SDK `instanceof` checks). For that path, run `npm install` at the repo root as well — see [token-ops/README.md](./token-ops/README.md#group-members). -## Apps +## 🧭 Apps -- [dashmint-lab/](./dashmint-lab/) — React + TypeScript + Vite SPA for minting, viewing, transferring, and trading NFT-style collectible cards on Dash Platform testnet. Shares the browser-safe SDK core (`setupDashClient-core.mjs`) with the Node tutorials at the repo root. -- [dashproof-lab/](./dashproof-lab/) — React + TypeScript + Vite proof-of-existence tutorial app that hashes files locally in the browser, anchors SHA-256 proofs on Dash Platform testnet, verifies files by hash, and reviews proof history by owner or chain ID. Also uses the shared browser-safe SDK core from the parent repo. -- [dashnote/](./dashnote/) — React + TypeScript + Vite notes app for Dash Platform testnet. Create, edit, and delete notes against a small `note` data contract; supports a "Remember Me" read-only browse mode, optimistic localStorage cache, and ships a single-file zero-build read-only companion at `dashnote-lite.html`. Also uses the shared browser-safe SDK core from the parent repo. -- [dashrate/](./dashrate/) — React + TypeScript + Vite app for rating Platform tutorial resources on Dash Platform testnet, built to showcase Platform 4.0's relational document queries: provable `count`, grouped `count` (`GROUP BY`) for the per-star distribution, range counts, and `where` filtering. One review per identity per resource (editable, with document history); read-only browsing works without signing in. Also uses the shared browser-safe SDK core from the parent repo. +- 🃏 [dashmint-lab/](./dashmint-lab/) — React + TypeScript + Vite SPA for minting, viewing, transferring, and trading NFT-style collectible cards on Dash Platform testnet. Shares the browser-safe SDK core (`setupDashClient-core.mjs`) with the Node tutorials at the repo root. +- 🔐 [dashproof-lab/](./dashproof-lab/) — React + TypeScript + Vite proof-of-existence tutorial app that hashes files locally in the browser, anchors SHA-256 proofs on Dash Platform testnet, verifies files by hash, and reviews proof history by owner or chain ID. Also uses the shared browser-safe SDK core from the parent repo. +- 📝 [dashnote/](./dashnote/) — React + TypeScript + Vite notes app for Dash Platform testnet. Create, edit, and delete notes against a small `note` data contract; supports a "Remember Me" read-only browse mode, optimistic localStorage cache, and ships a single-file zero-build read-only companion at `dashnote-lite.html`. Also uses the shared browser-safe SDK core from the parent repo. +- ⭐ [dashrate/](./dashrate/) — React + TypeScript + Vite app for rating Platform tutorial resources on Dash Platform testnet, built to showcase Platform 4.0's relational document queries: provable `count`, grouped `count` (`GROUP BY`) for the per-star distribution, range counts, and `where` filtering. One review per identity per resource (editable, with document history); read-only browsing works without signing in. Also uses the shared browser-safe SDK core from the parent repo. +- 👥 [token-ops/](./token-ops/) — React + TypeScript + Vite app that demonstrates Dash Platform groups and multi-signer governance on testnet, using token operations as the example workflow. Create groups, propose and co-sign group-authorized actions, monitor signing progress, and inspect or reassign operator and admin authorities. Browse-only mode works without signing in. diff --git a/example-apps/dashmint-lab/src/components/AppShell.tsx b/example-apps/dashmint-lab/src/components/AppShell.tsx index bcbe8638..cca30098 100644 --- a/example-apps/dashmint-lab/src/components/AppShell.tsx +++ b/example-apps/dashmint-lab/src/components/AppShell.tsx @@ -175,7 +175,7 @@ export function AppShell({
{children}