npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@orbit-work/orbit-fe-tmpl

v0.1.10

Published

Create and assess standalone Orbitwork Web applications

Readme

Orbit FE template

Responsive documentation sites

Documentation layouts follow the Web wide-screen revision, including the 2026-10-26 docs amendment. It supersedes the historical 10j.15 / D-151 rule limiting the whole article to 720px: the article fills the space between the navigation and the optional page table of contents. Preserve the docs-specific breakpoints and padding; field and detail-value limits do not cap the whole document. orw check does not prove responsive geometry; measure real guide and API pages at wide and mobile viewports.

@orbit-work/orbit-fe-tmpl lives in the Orbit repository and generates a standalone React/Vite project. The generated project installs from published packages; it does not require the Orbit monorepo. It uses Tailwind and app-local shadcn/ui components whose CSS variables are aliases of the Orbitwork v4 tokens from @orbit-work/ui (styles/web-core.css and styles/web.css). The application shell is the shared AppShell from @orbit-work/ui (R17 10h–10n), filled from the generated src/app/shell-config.ts; reusable Orbitwork-owned views come from the same package through the ui-development workflow.

Each generated app includes a root AGENTS.md with development rules for configuration, routes, i18n, OEM themes, static resources, data adapters, and validation. Before UI development, run npx @orbit-work/ui-skills@latest from the project directory. It installs or updates ui-design, ui-development and ui-quality in .agents/skills/ at the nearest Git checkout root (or the standalone project). Read the installed skills for the task and commit them with their installation manifest. The template does not bundle or install skills; their release cycle is independent.

CLI

From this repository:

node packages/orbit-fe-tmpl/src/cli.mjs create /path/to/new-web-app
node packages/orbit-fe-tmpl/src/cli.mjs check /path/to/web-app
node packages/orbit-fe-tmpl/src/cli.mjs migrate /path/to/existing-web-app --output /path/to/migration-report.md
npx @orbit-work/ui-skills@latest /path/to/existing-web-app
node packages/orbit-fe-tmpl/src/cli.mjs brand preview /path/to/web-app --output brand-preview.html

After publication, the same commands are available through the orw binary. create requires an absent or empty destination. check returns a nonzero status for missing baseline rules, including the shell rules: an app-owned sidebar (src/components/ui/sidebar.tsx, app-sidebar.tsx or SidebarProvider state) or app-drawn top bar (a TopBar component file, SidebarTrigger, top-bar classes or a <header> in a layout route) fails, brand.productLabel set to the placeholder 「产品名称」 fails, and an OEM build context (oem.variantId other than official) without brand.productName fails. The R17 10n.5 rules fail too: a third-party icon library in package.json or a src import (lucide-react, react-icons, @heroicons/react …; icons come from @orbit-work/ui, icon-library); the Web lint list in application code (hex / rgb / hsl / oklch colours, Tailwind palette classes, colour opacity modifiers, opacity as the disabled state, --ow-accent, Tailwind radius and shadow sizes, dark: / .dark / prefers-color-scheme, font-semibold, text-lg and larger; web-lint); the word list in the interface copy files (src/locales/*, feature copy.ts: 「新增」「确定要」「租户」「工作空间」, a half-width 「-」 empty value, or a literal product name instead of {productName}; copy-text); and, for OEM build contexts, OrbitWork in the brand input or the copy files or an official assets/orbitwork/ image as the OEM logo or icon (oem-text). Besides web-build.json, check and migrate read the build context named by WEB_BUILD_CONTEXT_FILE. migrate creates a read-only assessment with file and line evidence for fixed root-path assets, external static URLs, build-time API/identity addresses, and relative runtime-config loads. It also checks that Vite's base is build-controlled and .dora.yml declares orw-v1. The report includes an initially Unverified product journey and browser acceptance matrix to fill during migration; see the migration acceptance guide. Existing routing, auth, API clients, and deployment details must be migrated in the application. The scanner finds literal references in source files; computed URLs and actual CDN, CORS, gateway, visual, and interaction behavior still require build and browser checks. migrate refuses to overwrite an existing report. brand preview prints the OEM primary-colour derivation and writes the static colour board an OEM customer signs (--primary / --signal preview a colour without a project); it never overwrites an existing file.

Private-deployment builds

New Vite projects include @orbit-work/vite-plugin-private-deployment and a build:container entry. Ordinary pnpm build stays static; pnpm build:container enables validated same-origin /config.json configuration before application startup. The generated deployment guide describes public fields, serving requirements, policy customization and removal. This release changes the template for newly created projects; it does not migrate or synchronize existing applications. The default entry budget is calibrated to 280 KiB gzip against the current public npm dependencies (277.3 KiB measured); private builds separately allow up to 10 KiB for the bootstrap and still count the dynamically loaded application.

Shared authenticated requests

Generated applications use src/lib/api-client.ts: apiRequest returns a Response, apiJson<T> reads JSON, and apiRequestUrl handles an explicitly configured service endpoint such as Feedback. Keep application API calls behind these methods. Bind the product's credential adapter through bindApiAuth rather than implementing 401 handling in pages or features.

The reusable transport is createAuthenticatedFetch in packages/services/handler.ts. The template vendors that same source as src/lib/service-handler.ts through node packages/orbit-fe-tmpl/scripts/sync-auth.mjs; its consistency test prevents the standalone template and monorepo implementations from drifting. Existing Orbit platforms import from @orbitwork/services/handler; independent products can use the generated module with their own credential and network adapters. It has no React, router, storage or Electron dependency.

import { createAuthenticatedFetch, serviceErrorFromResponse } from "./service-handler"

const request = createAuthenticatedFetch({
  baseUrl: apiBaseUrl,
  credentials: "omit",
  bearerToken: () => auth.accessToken(),
  refreshAuth: (rejectedToken) => auth.refreshAuth(rejectedToken),
  onAuthFailure: (rejectedToken) => auth.invalidate(rejectedToken),
})

const response = await request("v1/projects", { signal, redirect: "error" })
if (!response.ok) throw await serviceErrorFromResponse(response)

Only HTTP 401 starts silent renewal. GET/HEAD may replay once after renewal; POST/PUT/PATCH/DELETE and uploads never replay. HTTP 403, 404, 429, 5xx, network failures and cancellations never independently invalidate a session, even if a response body carries an auth code. Credential adapters serialize refreshes and compare the rejected token before invalidating, protecting a newer login from late responses. API adapters still enforce the configured endpoint and token audience; the raw transport does not choose an authorized destination.

The template's query policy checks ApiError.terminalAuth before opening session recovery. A write rejected before successful renewal is not replayed or treated as an expired session; a late 401 from an older login cannot expire its successor.

serviceErrorFromResponse preserves httpStatus, protocolCode, reason, requestId, metadata and the original response body. Raw fetch leaves non-2xx responses readable, while createRequestHandler applies the same transport plus protojson defaults and throws ServiceError for generated clients. Keep UI copy and login dialogs in the host. Read retries remain in request-policy.ts and query-provider.tsx (once after 1000 ms on network/5xx); adding transport retries would multiply requests. OAuth refresh-token submission retains the credential adapter's separate single-use protection.

Current consumers include Console/Admin generated clients and raw/knowledge/Feedback requests, Desktop generated clients and chat attachment registration, and the standalone template. Website's public download requests do not use a login session; Desktop's main-process knowledge progress transport keeps its native adapter.

Shared tenant runtime branding

The generated app includes RuntimeBrandHost, its verified-session adapter seam, and the shared CDN/cache coordinator. Both generated environment files declare VITE_BRAND_DISCOVERY_BASE_URL= empty by default. Products opt in explicitly; private deployments choose their own HTTPS directory or stay disabled. The setting locates a deployment's public brand directory, while tenant identity and brand publications resolve at runtime after login. It does not move identity/API settings out of the build.

The generated integration contract covers exact tenant/app/channel selection, the index → immutable OEM snapshot → original image chain, validated cache-first refresh, official/default fallback and browser acceptance. Keep it with every generated application. @orbit-work/orbit-fe-tmpl/runtime-brand exports the same coordinator for existing Web products; @orbit-work/orbit-fe-tmpl/brand-snapshot exposes its React-free exact-profile selector. Do not copy Console's product identity adapter into another product: that product must supply its own already verified { tenantId }.

Runtime branding is optional for official authenticated applications; login and standalone OEM build branding retain their existing behavior. Current production opt-in is owned by Console. Admin and registered external products do not become enabled merely by upgrading this package or the UI skills. Cross-product design and acceptance rules are maintained by the tenant runtime brand revision.

Generated project

cd /path/to/new-web-app
npx @orbit-work/ui-skills@latest
pnpm install
pnpm dev
pnpm build

The generated project targets Node 24 and pnpm 11.24.0, matching Dora's current central Web preset. .dora.yml declares a static dist build. web-build.json is the local and official build context; WEB_BUILD_CONTEXT_FILE can point to another JSON file. brand sets the product name and optional product label, logo, locale-specific starter copy and, for OEM builds only, one primary colour (optional signal) and tab icon; minViewport pins a desktop-only product's layout width. Official builds default to the OrbitWork name, tab icons and v4 colours; explicitly enabled, verified tenant runtime branding can override the authenticated shell. Image paths resolve to square local PNG or WebP files: 128–1024 px for the logo and 32–1024 px for the OEM favicon, with a combined 250 KiB budget for logo and icons. Dora-managed OEM builds select images from the OEM asset library and materialize verified copies into the build checkout before invoking the template. An OEM brand name wider than 160 px is truncated with a tooltip by the shell. The generated README explains local /api and /identity proxy targets in config/dev-proxy.ts, the shared API client, immutable environment configuration and optional tenant runtime branding, and the light-only theme and OEM colour derivation.

The generated src/App.tsx renders AppShell from @orbit-work/ui and owns no sidebar, top bar, breadcrumbs, language or theme buttons. src/app/shell-config.ts carries the slot data of the 10n contract: the brand mode from oem.variantId, brand.productName / logoFile / showName / productLabel, the VITE_APP_ENV environment, areas, the navigation tree, route metadata (navKey, area, parentList, permission for the route guard and the navigation, guardParams for the view parameters the leave guard lets pass), identityConsoleUrl and docsUrl (VITE_IDENTITY_CONSOLE_URL, VITE_DOCS_URL), locales, the otherProducts fallback and minViewport. Shell memory is keyed by product and user (<appId>.<userId>.…). Charts, global search, RTL, and a general-purpose state library are left for products that need them.

The template depends on @orbit-work/ui ^0.2.1, which includes AppShell and the versioned AGENTS.md package guide. The CI scaffold job installs a tarball built from the reviewed commit to verify package consumers before release.

The generated app includes a performance baseline: the entry carries the boot only (session read, LoadingScreen, the error boundaries); the shell loads beside the first page and appears at once when authentication resolves (the LoadingScreen 「正在进入{产品名}…」 shows until then), so the sign-in redirect, the callback and the signed-out card never download it, while feature routes load on demand inside the shell's content region (LoadingState page after 300 ms, at least 400 ms). performance-budget.json counts the shell (src/App.tsx) with the signed-in home. The app also has debounced list queries with a cancellation signal for API adapters, a 30-second query freshness window, and a build-time gzip/brand-asset budget in performance-budget.json. The generated README covers deployment compression and cache policy.

Production bundles use explicit Oxc JS and Lightning CSS minification. Sourcemaps default to off; WEB_SOURCEMAP=hidden creates JS maps in a private .orw-sourcemaps/ directory with a release manifest, then removes them from public dist. Dora's orw-v1 adapter enables this mode, verifies both manifests, and retains maps inside a restricted candidate archive while only public assets enter the CDN Bucket and OEM download package.

WEB_ASSET_BASE_URL chooses the asset public path at build time:

  • Unset or empty: defaults to /. The result contains no official CDN URL and can be hosted by the OEM at the site root.
  • Root-relative directory such as /app/: the OEM can host the package at that site path.
  • Versioned HTTPS directory containing the buildId path segment, such as https://cdn.example.com/web/app/brand/build-123/: HTML references immutable resources there. The page itself remains on the product domain.

Vite's base uses the effective environment value as the public path. dist includes both HTML and static files; a hosted publisher must serve index.html on the product host and put the remaining immutable files at the manifest's delivery.assetBase CDN path. Hand-written absolute resource URLs need migration review because base does not rewrite arbitrary JavaScript strings.

The build writes dist/web-artifact-manifest.json with file SHA-256 values, OEM identity, build context digest, brand asset digests, and effective delivery mode and path. Dora's .dora.yml contract: orw-v1 adapter passes the latest saved OEM configuration and CDN path into each build and verifies the output against that build's recorded inputs. The OEM configuration remains editable; building again after a change creates a separate artifact.

Dora's OEM workspace has a Web configuration per OEM and project. Upload or select Logo and favicon there; the product repository only carries its official/local defaults. Dora converts uploaded WebP files to PNG for the current OEM asset service. Select the OEM in a Web build to generate a distinct artifact for the same source version. An optional OEM domain enables explicit Stable publication; leaving it blank produces a downloadable public ZIP. The older project-level Web brand revision cannot be combined with orw-v1 builds. Dora uses a separate public CDN Bucket when DORA_WEB_CDN_ORIGIN is configured; the private archive Bucket must remain inaccessible from that CDN. Dora's docs/web-build-spec.md covers operation and gateway requirements.

Identity, API and application-route configuration are public build inputs loaded exclusively by scripts/project-env.mjs from the application's selected environment file. VITE_APP_BASE_PATH sets the route prefix independently of WEB_ASSET_BASE_URL. There is no startup runtime-config.json or window.__ORBIT_CONFIG__ override. The page server routes APIs and serves index.html for configured deep links. Standalone OEM builds derive light-only v4 token overrides from the build primary colour; navigation stays white.

The generated application keeps paths and permission names in src/app/navigation.ts, the navigation tree and route metadata in src/app/shell-config.ts, and route declarations and guards in src/routes.tsx. It renders the shared AppShell and wires the R17 state parts (10l): one LoadingScreen for the sign-in redirect, the callback and the shell read; AuthCards for the shell read failure, 「暂时无法登录」, a cancelled or failed sign-in and /signed-out (sign-out stays there and other tabs follow); 403 and 404 inside the shell at the same address (no /forbidden); the session guard for 401 (a silent renewal, then the 「登录已过期」 dialog once per session and its banner, same-tab re-login back to the address, 「已重新登录」); the offline Banner; the content and shell error boundaries with the one-time ChunkLoadError reload and 「{产品名}已更新」; the leave guard (useLeaveGuard, three buttons when the page registers save, two otherwise) on a data router; the Toast stack (D-172, showToast in src/app/toaster.tsx); and the default request policy (reads retry once after 1 s on network errors and 5xx, writes never). It also carries localized copy and the R17 example pages (D-148): a dashboard, a list with its record drawer and the three list states, a full-page detail with its 「设置」 tab, a settings page and a full-page wizard, built only from the parts src/components/parts.ts re-exports under the 10n.2 names. src/app/adapters.ts is the replacement seam for authentication and project data. The example data in src/demo/ lives in browser storage only and must be replaced with product services before deployment. React Router's basename comes from runtime.appBasePath. Page paths and guards are product code; the deployment prefix is the build-time VITE_APP_BASE_PATH, separate from WEB_ASSET_BASE_URL used by Vite for static resources. Both are resolved before building.

For existing projects, run the read-only migrate assessment, then npx @orbit-work/ui-skills@latest <directory> and read the installed skills before UI migration. Skills are maintained by packages/ui-skills, with the repository's root .agents/skills/ as their source. The installer records versions and file hashes, updates unmodified managed files, and preserves local changes. Use --force only after comparison; it backs up conflicting copies under .agents/ui-skills-backups/ before replacement. Other skills and existing project instructions are preserved.

check and migrate assess the application contract without comparing skills against a bundled template revision. Preserve application-owned adapters, then move build-time brand/static URL concerns into the template contract. The checks are baseline structural rules; actual asset delivery, login flows, rendered geometry and interactions still require build and browser/deployment verification.

Next.js static export adapter

Existing Next.js applications can keep their framework while using orw-v1. Import nextStaticConfig and buildNextStatic from the package's next-static export. Wrap the app's Next configuration with nextStaticConfig(appRoot, config) and call buildNextStatic(appRoot) from its build script. The adapter shares context validation, official icons, environment selection, artifact hashing and private sourcemap separation with Vite. It always exports to out; declare that output in .dora.yml with the existing preset and contract: orw-v1.

Next's assetPrefix controls its scripts, CSS and lazy chunks. The adapter also adds a CSS pre-loader for existing root-relative public/ assets, without replacing Next's built-in CSS pipeline. Application JSX and metadata must prefix public asset URLs using the explicit NEXT_PUBLIC_WEB_ASSET_BASE_URL build input; use NEXT_PUBLIC_WEB_ICONS for the shared tab-icon descriptors. Do not prefix page navigation, canonical URLs, service routes or download endpoints. Do not rely on file-based app/icon.* metadata overriding these explicit icons. The actual website consumer and its disposable CDN/browser acceptance are in apps/website/README.md and scripts/verify-dora.mjs.

The controlled build disables Next 15's automatic env injection and inherited NEXT_PUBLIC_* values; the shared environment loader remains the only env-file reader. This does not turn maps or minified sources into public configuration. Every exported HTML entry must reference frozen JavaScript, and maps must leave out before the shared artifact inventory is generated. The adapter uses the same none/hidden modes and .orw-sourcemaps layout as Vite, not another Dora contract. A hosting gateway must support the application's exported directory routes; the adapter cannot compensate for an SPA-only page server.