{"id":47936599,"url":"https://github.com/tangle-network/blueprint-ui","last_synced_at":"2026-04-04T07:44:28.763Z","repository":{"id":340881399,"uuid":"1161286214","full_name":"tangle-network/blueprint-ui","owner":"tangle-network","description":"UI scaffolds, components, and hooks for building with Tangle Blueprints","archived":false,"fork":false,"pushed_at":"2026-04-03T16:21:05.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T07:44:27.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T23:55:19.000Z","updated_at":"2026-04-03T16:21:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tangle-network/blueprint-ui","commit_stats":null,"previous_names":["tangle-network/blueprint-ui"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tangle-network/blueprint-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fblueprint-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fblueprint-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fblueprint-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fblueprint-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/blueprint-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fblueprint-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T07:44:28.118Z","updated_at":"2026-04-04T07:44:28.748Z","avatar_url":"https://github.com/tangle-network.png","language":"TypeScript","readme":"![Tangle Network Banner](https://raw.githubusercontent.com/tangle-network/tangle/refs/heads/main/assets/Tangle%20%20Banner.png)\n\n\u003ch1 align=\"center\"\u003e@tangle-network/blueprint-ui\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cem\u003eShared UI components, hooks, stores, and contract utilities for Tangle Blueprint applications.\u003c/em\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://discord.com/invite/cv8EfJu3Tn\"\u003e\u003cimg src=\"https://img.shields.io/discord/833784453251596298?label=Discord\" alt=\"Discord\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://t.me/tanglenet\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?color=neon\u0026url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Ftanglenet\" alt=\"Telegram\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nA TypeScript/React package that provides the building blocks for blueprint UIs on the Tangle Network. The package now ships compiled ESM output plus a package-owned stylesheet so consuming apps can treat it like a normal library instead of compiling its source directly.\n\n## What's Included\n\n### Components\n\n**UI Primitives** — Badge, Button, Card, Dialog, Input, Select, Separator, Skeleton, Table, Tabs, Textarea, Toggle\n\n**Forms** — `FormField`, `BlueprintJobForm` (auto-generated from job definitions), `FormSummary`, `JobExecutionDialog`\n\n**Layout / App Shell** — `AppDocument`, `AppFooter`, `AppToaster`, `Web3Shell`, `ChainSwitcher`, `ThemeToggle`\n\n**Shared** — `Identicon` (blockie avatars), `TangleLogo`\n\n**Motion** — `AnimatedPage`, `StaggerContainer`, `StaggerItem`\n\n### Hooks\n\n| Hook | Purpose |\n|------|---------|\n| `useSubmitJob` | Submit on-chain jobs with TX lifecycle tracking |\n| `useJobForm` | Generic form state derived from `JobDefinition` |\n| `useJobPrice` / `useJobPrices` | Fetch job pricing from operators |\n| `useQuotes` | Operator quote aggregation with PoW challenge solving |\n| `useOperators` | Discover active operators for a blueprint |\n| `useServiceValidation` | Check service status and permissions |\n| `useProvisionProgress` | Track provision lifecycle (events + polling) |\n| `useSessionAuth` | PASETO session management |\n| `useAuthenticatedFetch` | Fetch wrapper with automatic token refresh |\n| `useThemeValue` | Resolve theme-dependent values |\n\n### Stores (nanostores)\n\n- **`infraStore`** — Blueprint ID, service ID, operator info\n- **`sessionMapStore`** — PASETO sessions per operator\n- **`txListStore`** — Transaction history tracking\n- **`themeStore`** — Light/dark theme state\n- **`persistedAtom`** — localStorage-backed atom with BigInt serialization\n\n### Contract Utilities\n\n- **ABI exports** — `tangleJobsAbi`, `tangleServicesAbi`, `tangleOperatorsAbi`\n- **Chain configs** — Tangle Local, Testnet, Mainnet with RPC resolution\n- **`publicClient`** — Singleton viem public client tied to selected chain\n- **`encodeJobArgs`** — ABI-encode job arguments from form values using job field metadata\n- **Web3 helpers** — `createTangleTransports`, `defaultConnectKitOptions`, `tangleWalletChains`, `resolveOperatorRpc`\n\n## Package Boundaries\n\nUse `@tangle-network/blueprint-ui` for:\n- App-agnostic shell/layout primitives and design-system building blocks\n- Shared chain/contract/provisioning hooks + stores\n- Reusable cross-blueprint form and submission workflows\n\nKeep in app-local code:\n- Product-specific routes and copy\n- Feature composition that is unique to a single app\n\n### Blueprint Registry\n\n- **`registerBlueprint`** / **`getBlueprint`** — Register and look up blueprint definitions\n- **`JobDefinition`** — Declarative job schema with field types, ABI metadata, and categories\n\n## Installation\n\n```bash\nnpm install @tangle-network/blueprint-ui\n# or\npnpm add @tangle-network/blueprint-ui\n```\n\nPackage: https://www.npmjs.com/package/@tangle-network/blueprint-ui\n\n## Publishing\n\nAutomated npm publishing is configured via GitHub Actions with npm Trusted Publishing (OIDC):\n- Workflow: `.github/workflows/publish-npm.yml`\n- Triggers:\n  - Push tag `blueprint-ui-vX.Y.Z`\n  - Manual `workflow_dispatch` with `version` input\n\nNo long-lived npm token is required once trusted publishing is configured.\n\nRelease flow:\n1. Bump `package.json` version.\n2. Push tag `blueprint-ui-v\u003csame-version\u003e`.\n3. Workflow typechecks and runs `npm publish --provenance --access public`.\n\nTrusted publishing setup (one-time in npm):\n1. Open npm package settings for `@tangle-network/blueprint-ui`.\n2. Configure a trusted publisher:\n   - Provider: GitHub Actions\n   - Owner: `tangle-network`\n   - Repository: `blueprint-ui`\n   - Workflow file: `publish-npm.yml`\n   - Environment (if used): must match your workflow configuration\n\nIf npm does not allow configuring trusted publishing before first publish, do a one-time bootstrap publish with a short-lived token, then switch to trusted publishing and delete the token.\n\n## Usage\n\n```tsx\nimport '@tangle-network/blueprint-ui/styles.css';\n\n// Import hooks and utilities from the main entry\nimport {\n  useSubmitJob,\n  useJobForm,\n  encodeJobArgs,\n  discoverOperatorsWithClient,\n} from '@tangle-network/blueprint-ui';\n\n// Import UI components from the /components entry\nimport { Button, Card, FormField } from '@tangle-network/blueprint-ui/components';\n```\n\nThe package exports compiled files from `dist/`, so consumers do not need TypeScript-in-`node_modules` support anymore.\n\n## Styling Setup\n\nImport the package stylesheet once near your app entry:\n\n```tsx\nimport '@tangle-network/blueprint-ui/styles.css';\n```\n\nThat stylesheet provides:\n- package-owned helper classes used by shared components such as `glass-card`, `font-display`, and `font-data`\n- generated utility CSS for the shared components themselves\n- a small compatibility layer that maps generic `--bp-*` tokens to `cloud` tokens by default\n\nIf you want the generic shared components to follow a different token family, you can either set the `--bp-*` variables directly or scope them with one of the helper classes:\n\n```tsx\n\u003cdiv className=\"bp-tone-arena\"\u003e\n  \u003cSomeBlueprintUiComponent /\u003e\n\u003c/div\u003e\n```\n\n## Migration Notes\n\n- Preferred path: import `@tangle-network/blueprint-ui/styles.css` and stop scanning package source from the consumer app.\n- Compatibility bridge: `src/` is still published for now, and `blueprintUiContentGlobs` remains available for apps migrating off the old source-scanning setup.\n- The next cleanup step in consumer apps is usually removing custom Vite/Uno workarounds that existed only to compile or scan `blueprint-ui` source.\n\n## Peer Dependencies\n\nReact 19, wagmi 3.x, viem 2.x, nanostores, Radix UI primitives, framer-motion, sonner, tailwind-merge, class-variance-authority. See `package.json` for the full list and version ranges.\n\n## License\n\nLicensed under either of [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or [MIT license](http://opensource.org/licenses/MIT), at your option.\n\n---\n\n## Key Concepts\n\n**Blueprint UI** is a TypeScript/React component library for building user interfaces that interact with Tangle Network blueprints. It provides pre-built components for operator management, service requests, job submission, and payment flows.\n\n**Tangle Network** is a decentralized infrastructure protocol where operators stake economic collateral to run verifiable services called blueprints.\n\n**x402** is an HTTP-native micropayment protocol that enables per-request payments for blueprint services, integrated into the UI through payment hooks and components.\n\n**Blueprint** is a deployable service specification on Tangle that defines computation, verification, and payment in a single package.\n\n---\n\n## Frequently Asked Questions\n\n**What is @tangle-network/blueprint-ui?**\nA React component library providing UI primitives, hooks, and contract utilities for building applications on Tangle Network.\n\n**Do I need to build this package before using it?**\nNo. Published consumers use the compiled `dist/` output. Only this repo itself needs to run the build before publish.\n\n**What framework does blueprint-ui support?**\nReact with TypeScript. Components use Radix UI primitives and Tailwind CSS for styling.\n\n**How do I connect to Tangle contracts?**\nUse the provided contract hooks and ABI utilities. The package includes typed bindings for Tangle's on-chain service registry, operator staking, and job submission.\n\n**Can I use blueprint-ui for x402 payment flows?**\nYes. The hooks and utilities support x402 payment header construction for per-request micropayments to blueprint operators.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fblueprint-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fblueprint-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fblueprint-ui/lists"}