From 19b3c9a7cda9cf5b9f94473bc7d4d8fe7d094f27 Mon Sep 17 00:00:00 2001 From: Ajay Ghanwat Date: Mon, 10 Aug 2026 14:00:44 +0530 Subject: [PATCH] docs: expand navigation and full-stack guides --- app/docs.test.ts | 20 + app/pages/404.wrn | 9 +- app/pages/access.wrn | 9 +- app/pages/architecture.wrn | 9 +- app/pages/benchmarks.wrn | 9 +- app/pages/changelog.wrn | 9 +- app/pages/examples.wrn | 9 +- app/pages/getting-started.wrn | 11 +- app/pages/guides/api-routes.wrn | 12 +- app/pages/guides/authentication.wrn | 12 +- app/pages/guides/authorization.wrn | 12 +- .../guides/configuration-and-profiles.wrn | 12 +- app/pages/guides/database.wrn | 12 +- app/pages/guides/deployment.wrn | 12 +- app/pages/guides/forms-and-validation.wrn | 12 +- app/pages/guides/full-stack-auth-demo.wrn | 156 +++++ app/pages/guides/i18n-and-themes.wrn | 12 +- app/pages/guides/middleware.wrn | 12 +- app/pages/guides/mobile.wrn | 12 +- app/pages/guides/observability.wrn | 12 +- app/pages/guides/pages-and-components.wrn | 12 +- app/pages/guides/project-structure.wrn | 12 +- app/pages/guides/pubsub.wrn | 12 +- app/pages/guides/queues.wrn | 12 +- app/pages/guides/realtime.wrn | 12 +- app/pages/guides/routing.wrn | 12 +- app/pages/guides/security.wrn | 12 +- app/pages/guides/server-data.wrn | 12 +- app/pages/guides/testing.wrn | 12 +- app/pages/guides/troubleshooting.wrn | 12 +- app/pages/guides/upgrading.wrn | 12 +- app/pages/guides/uploads.wrn | 12 +- app/pages/guides/workspaces-and-gateway.wrn | 16 +- app/pages/language.wrn | 11 +- app/pages/license.wrn | 9 +- app/pages/releases/0.8.7.wrn | 9 +- app/pages/roadmap.wrn | 9 +- app/pages/search.wrn | 9 +- app/pages/security.wrn | 9 +- app/pages/showcase.wrn | 9 +- app/pages/support.wrn | 9 +- app/pages/tutorial.wrn | 13 +- app/routes.gen.ts | 3 + app/styles/global.css | 56 ++ app/types/wrnexus.generated.d.ts | 2 +- public/docs-index.json | 7 + public/llms-full.txt | 633 ++++++++++++++++++ public/llms.txt | 633 ++++++++++++++++++ public/sitemap.xml | 2 +- scripts/generate-portal.ts | 183 ++++- 50 files changed, 2089 insertions(+), 50 deletions(-) create mode 100644 app/pages/guides/full-stack-auth-demo.wrn diff --git a/app/docs.test.ts b/app/docs.test.ts index 1f249e0b..a44313f2 100644 --- a/app/docs.test.ts +++ b/app/docs.test.ts @@ -210,6 +210,26 @@ test("workspace guide documents app addition and safe forward-auth redirects", ( expect(source).toContain("/api/verify"); }); +test("guide pages expose section navigation, on-page navigation, and a complete auth demo", () => { + const authentication = readFileSync( + join(root, "app", "pages", "guides", "authentication.wrn"), + "utf8", + ); + expect(authentication).toContain('class="docs-section-menu"'); + expect(authentication).toContain('class="on-this-page"'); + expect(authentication).toContain("Configuration"); + expect(authentication).toContain("Verification checklist"); + + const demo = readFileSync( + join(root, "app", "pages", "guides", "full-stack-auth-demo.wrn"), + "utf8", + ); + expect(demo).toContain("Auth and permissions dashboard demo"); + expect(demo).toContain("wrnexus authz init --dialect=sqlite"); + expect(demo).toContain('requirePermission(ctx, "member:invite")'); + expect(demo).toContain("cross-tenant identifiers are rejected"); +}); + test("package index includes searchable category filters", () => { const source = readFileSync(join(root, "app", "pages", "packages.wrn"), "utf8"); expect(source).toContain('state category = "All"'); diff --git a/app/pages/404.wrn b/app/pages/404.wrn index 5a8e9dce..4991e89c 100644 --- a/app/pages/404.wrn +++ b/app/pages/404.wrn @@ -9,7 +9,14 @@ page Pagenotfound {
W WRNexusJS
-
+
} diff --git a/app/pages/access.wrn b/app/pages/access.wrn index 7abc915a..6e5e6e1f 100644 --- a/app/pages/access.wrn +++ b/app/pages/access.wrn @@ -9,7 +9,14 @@ page Access {
W WRNexusJS
-

Request preview access

WRNexusJS 0.8.7 packages are not available from the public npm registry. Installation requires approval and private registry credentials supplied by WorkRoot. Never paste registry tokens into source control, issue reports, or support messages.

Request process

  1. Contact WorkRoot through the public contact path at workroot.in.
  2. Describe the application, team, expected deployment, and Bun environment.
  3. After approval, follow the registry instructions supplied privately.
  4. Use the canonical scaffold command below only after authentication.
bunx @wrnexus/cli@0.8.7 create my-app

Access approval, response time, licensing terms, and support level remain owner-controlled. This site does not collect access requests directly.

+

Request preview access

WRNexusJS 0.8.7 packages are not available from the public npm registry. Installation requires approval and private registry credentials supplied by WorkRoot. Never paste registry tokens into source control, issue reports, or support messages.

Request process

  1. Contact WorkRoot through the public contact path at workroot.in.
  2. Describe the application, team, expected deployment, and Bun environment.
  3. After approval, follow the registry instructions supplied privately.
  4. Use the canonical scaffold command below only after authentication.
bunx @wrnexus/cli@0.8.7 create my-app

Access approval, response time, licensing terms, and support level remain owner-controlled. This site does not collect access requests directly.

} diff --git a/app/pages/architecture.wrn b/app/pages/architecture.wrn index 57f1b3a1..6f56c7a6 100644 --- a/app/pages/architecture.wrn +++ b/app/pages/architecture.wrn @@ -9,7 +9,14 @@ page Architecture {
W WRNexusJS
-
Framework architecture · 0.8.7

Architecture

WRNexusJS is Bun-native and SSR-first. File discovery maps pages and API handlers; middleware enriches or short-circuits a request; the compiler turns .wrn declarations into server render functions and small feature runtimes.

Request and build lifecycle

  1. DiscoverPages, APIs, middleware, components, layouts, schemas, rooms
  2. CompileParse .wrn, validate grammar, generate server code
  3. RequestLimits, security, locale, session, middleware
  4. MatchStatic and dynamic file route
  5. RenderSSR data, escaped interpolation, components, metadata
  6. EnhanceOnly required reactive/directive runtimes

Package boundaries

core owns contexts, middleware, sessions and rooms; router discovers routes; compiler parses .wrn; ssr renders documents; csr supplies browser runtimes; dev-server and cli orchestrate development and builds.

Security and data flow

Validation happens at trust boundaries. Session authentication establishes identity; authorization makes resource decisions. CSP, Trusted Types, CSRF, upload checks, WebSocket origins, request limits, and output escaping are layered controls—not substitutes for application policy.

Realtime and scale

Rooms are process-local unless connected through pub/sub. Redis-backed pub/sub distributes events. Queue durability depends on the selected driver and must be evaluated explicitly.

Workspaces and gateways

The gateway can dispatch multiple applications while preserving route, component, asset, config, and session boundaries. Validate host routing and isolation before production.

Build and deployment

wrnexus build . produces dist/server.js and hashed/static assets. Run the server with Bun, apply migrations before traffic, terminate TLS at a trusted edge, and forward only expected proxy headers.

Mobile

Mobile compatibility bridges SSR-safe Capacitor capabilities; native route generation is experimental and is not general web portability. Test each target platform.

Generated files and limits

app/routes.gen.ts, .wrnexus/, and dist/ are generated. The runtime is Bun-only. Preview packages are private. Historical compatibility and long-term support policy are not yet published.

+
Framework architecture · 0.8.7

Architecture

WRNexusJS is Bun-native and SSR-first. File discovery maps pages and API handlers; middleware enriches or short-circuits a request; the compiler turns .wrn declarations into server render functions and small feature runtimes.

Request and build lifecycle

  1. DiscoverPages, APIs, middleware, components, layouts, schemas, rooms
  2. CompileParse .wrn, validate grammar, generate server code
  3. RequestLimits, security, locale, session, middleware
  4. MatchStatic and dynamic file route
  5. RenderSSR data, escaped interpolation, components, metadata
  6. EnhanceOnly required reactive/directive runtimes

Package boundaries

core owns contexts, middleware, sessions and rooms; router discovers routes; compiler parses .wrn; ssr renders documents; csr supplies browser runtimes; dev-server and cli orchestrate development and builds.

Security and data flow

Validation happens at trust boundaries. Session authentication establishes identity; authorization makes resource decisions. CSP, Trusted Types, CSRF, upload checks, WebSocket origins, request limits, and output escaping are layered controls—not substitutes for application policy.

Realtime and scale

Rooms are process-local unless connected through pub/sub. Redis-backed pub/sub distributes events. Queue durability depends on the selected driver and must be evaluated explicitly.

Workspaces and gateways

The gateway can dispatch multiple applications while preserving route, component, asset, config, and session boundaries. Validate host routing and isolation before production.

Build and deployment

wrnexus build . produces dist/server.js and hashed/static assets. Run the server with Bun, apply migrations before traffic, terminate TLS at a trusted edge, and forward only expected proxy headers.

Mobile

Mobile compatibility bridges SSR-safe Capacitor capabilities; native route generation is experimental and is not general web portability. Test each target platform.

Generated files and limits

app/routes.gen.ts, .wrnexus/, and dist/ are generated. The runtime is Bun-only. Preview packages are private. Historical compatibility and long-term support policy are not yet published.

} diff --git a/app/pages/benchmarks.wrn b/app/pages/benchmarks.wrn index 3a8a4c85..33a07b5c 100644 --- a/app/pages/benchmarks.wrn +++ b/app/pages/benchmarks.wrn @@ -9,7 +9,14 @@ page Benchmarks {
W WRNexusJS
-

Benchmarks

No publishable benchmark dataset yet

No comparative speed claims are published. A valid baseline must record scripts, commit, Bun/framework versions, hardware, OS, warmup, samples, workload, raw results, median, percentiles, memory, HTML size, browser JavaScript size, and run date.

The roadmap starts with WRNexusJS-only measurements before any maintained equivalent-workload comparison.

+

Benchmarks

No publishable benchmark dataset yet

No comparative speed claims are published. A valid baseline must record scripts, commit, Bun/framework versions, hardware, OS, warmup, samples, workload, raw results, median, percentiles, memory, HTML size, browser JavaScript size, and run date.

The roadmap starts with WRNexusJS-only measurements before any maintained equivalent-workload comparison.

} diff --git a/app/pages/changelog.wrn b/app/pages/changelog.wrn index d9831511..ebdde196 100644 --- a/app/pages/changelog.wrn +++ b/app/pages/changelog.wrn @@ -9,7 +9,14 @@ page Changelog {
W WRNexusJS
-

Changelog

0.8.7 2026-07-13

Documentation is aligned to all 47 installed packages. This release adds @wrnexus/helpers, original-request URL helpers, safe login redirects, working wrnexus workspace add, and forward-auth redirect propagation.

Migration notes

Run wrnexus update --latest and keep every @wrnexus/* package on 0.8.7. Existing applications must explicitly add @wrnexus/helpers before importing it; newly scaffolded applications include it automatically.

Versioning and support

The packages use semantic-looking versions, but a formal compatibility and old-release support policy has not been approved. Preview consumers should treat minor releases as potentially requiring migration review.

+

Changelog

0.8.7 2026-07-13

Documentation is aligned to all 47 installed packages. This release adds @wrnexus/helpers, original-request URL helpers, safe login redirects, working wrnexus workspace add, and forward-auth redirect propagation.

Migration notes

Run wrnexus update --latest and keep every @wrnexus/* package on 0.8.7. Existing applications must explicitly add @wrnexus/helpers before importing it; newly scaffolded applications include it automatically.

Versioning and support

The packages use semantic-looking versions, but a formal compatibility and old-release support policy has not been approved. Preview consumers should treat minor releases as potentially requiring migration review.

} diff --git a/app/pages/examples.wrn b/app/pages/examples.wrn index 0923c41c..612745e0 100644 --- a/app/pages/examples.wrn +++ b/app/pages/examples.wrn @@ -9,7 +9,14 @@ page Examples {
W WRNexusJS
-

Examples

Examples are tied to installed 0.8.7 package documentation. The focused snippets in guides are source-verified; standalone runnable projects and CI compilation are tracked as remaining work.

Minimal .wrn page

Documented

Database CRUD

Planned fixture

Authentication and protected route

Planned fixture

Permissions

Planned fixture

Forms and validation

Documented

Realtime dashboard

Planned fixture

File upload

Planned fixture

Background queue

Planned fixture

Redis pub/sub

Planned fixture

Workspace gateway

Planned fixture

Deployment

Planned fixture

Experimental mobile mode

Planned fixture
+

Examples

Examples are tied to installed 0.8.7 package documentation. The focused snippets in guides are source-verified; standalone runnable projects and CI compilation are tracked as remaining work.

Minimal .wrn page

Documented

Database CRUD

Planned fixture

Authentication and protected route

Planned fixture

Permissions

Planned fixture

Forms and validation

Documented

Realtime dashboard

Planned fixture

File upload

Planned fixture

Background queue

Planned fixture

Redis pub/sub

Planned fixture

Workspace gateway

Planned fixture

Deployment

Planned fixture

Experimental mobile mode

Planned fixture
} diff --git a/app/pages/getting-started.wrn b/app/pages/getting-started.wrn index c5a8daea..5e176e9c 100644 --- a/app/pages/getting-started.wrn +++ b/app/pages/getting-started.wrn @@ -9,7 +9,14 @@ page Gettingstarted {
W WRNexusJS
-
Preview guide · v0.8.7

Build a contact inbox

This path creates a server-rendered page, validated API route, middleware, and realtime next step. It requires approved registry access and Bun 1.3.x; this site was verified with Bun 1.3.14.

1. Create the project

bunx @wrnexus/cli@0.8.7 create my-app
+      
Preview guide · v0.8.7

Build a contact inbox

This path creates a server-rendered page, validated API route, middleware, and realtime next step. It requires approved registry access and Bun 1.3.x; this site was verified with Bun 1.3.14.

1. Create the project

bunx @wrnexus/cli@0.8.7 create my-app
 cd my-app
 bun install
 bun run dev

2. Know the structure

app/pages/       # file-based .wrn routes
@@ -38,7 +45,7 @@ export const POST = async (ctx) => {
   return next();
 }

7. Test and ship

bun run test
 bun run build
-bun dist/server.js

Next: deployment, database, authentication, and workspaces.

+bun dist/server.js

Next: deployment, database, authentication, and workspaces.

} diff --git a/app/pages/guides/api-routes.wrn b/app/pages/guides/api-routes.wrn index fa64a776..439965e5 100644 --- a/app/pages/guides/api-routes.wrn +++ b/app/pages/guides/api-routes.wrn @@ -9,7 +9,17 @@ page APIroutes {
W WRNexusJS
-
Preview guide · 0.8.7

API routes

Export GET, POST, PUT, PATCH, or DELETE from app/api files. Validate request bodies, enforce authentication and authorization, cap request sizes, and return Web Responses.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

API routes

Export GET, POST, PUT, PATCH, or DELETE from app/api files. Validate request bodies, enforce authentication and authorization, cap request sizes, and return Web Responses.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/authentication.wrn b/app/pages/guides/authentication.wrn index b0161a28..879dee24 100644 --- a/app/pages/guides/authentication.wrn +++ b/app/pages/guides/authentication.wrn @@ -9,7 +9,17 @@ page Authentication {
W WRNexusJS
-
Preview guide · 0.8.7

Authentication

Configure session authentication, log users in through supported auth helpers, and read identity from context. Cookie flags, rotation, expiry, and secret storage remain deployment responsibilities.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Authentication

Configure session authentication, log users in through supported auth helpers, and read identity from context. Cookie flags, rotation, expiry, and secret storage remain deployment responsibilities.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/authorization.wrn b/app/pages/guides/authorization.wrn index 80a24e4e..d79374bc 100644 --- a/app/pages/guides/authorization.wrn +++ b/app/pages/guides/authorization.wrn @@ -9,7 +9,17 @@ page Authorization {
W WRNexusJS
-
Preview guide · 0.8.7

Authorization

Authentication identifies; authorization decides. Enforce permissions in server routes and policies, including object ownership. UI hiding is never an authorization boundary.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Authorization

Authentication identifies; authorization decides. Enforce permissions in server routes and policies, including object ownership. UI hiding is never an authorization boundary.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/configuration-and-profiles.wrn b/app/pages/guides/configuration-and-profiles.wrn index 5382a28d..b7e7b4fd 100644 --- a/app/pages/guides/configuration-and-profiles.wrn +++ b/app/pages/guides/configuration-and-profiles.wrn @@ -9,7 +9,17 @@ page Configurationandprofiles {
W WRNexusJS
-
Preview guide · 0.8.7

Configuration and profiles

wrnexus.config.ts owns styles, SEO, security, data, mobile, fonts, and profiles. Keep secrets in validated environment variables and review merged production configuration.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Configuration and profiles

wrnexus.config.ts owns styles, SEO, security, data, mobile, fonts, and profiles. Keep secrets in validated environment variables and review merged production configuration.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/database.wrn b/app/pages/guides/database.wrn index b68c7881..55dd924f 100644 --- a/app/pages/guides/database.wrn +++ b/app/pages/guides/database.wrn @@ -9,7 +9,17 @@ page Database {
W WRNexusJS
-
Preview guide · 0.8.7

Database

Configure SQLite or the installed supported driver, keep queries in named SQL blocks, generate typed functions, and apply migrations before traffic. Back up data and test rollback independently.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Database

Configure SQLite or the installed supported driver, keep queries in named SQL blocks, generate typed functions, and apply migrations before traffic. Back up data and test rollback independently.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/deployment.wrn b/app/pages/guides/deployment.wrn index 3a4e51d1..65031765 100644 --- a/app/pages/guides/deployment.wrn +++ b/app/pages/guides/deployment.wrn @@ -9,7 +9,17 @@ page Deployment {
W WRNexusJS
-
Preview guide · 0.8.7

Deployment

Run bun run build, apply migrations, and start dist/server.js with Bun. Configure TLS, proxy trust, environment validation, health checks, graceful restarts, logs, backups, and restrictive security headers.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Deployment

Run bun run build, apply migrations, and start dist/server.js with Bun. Configure TLS, proxy trust, environment validation, health checks, graceful restarts, logs, backups, and restrictive security headers.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/forms-and-validation.wrn b/app/pages/guides/forms-and-validation.wrn index d4bf83f4..fcddfef6 100644 --- a/app/pages/guides/forms-and-validation.wrn +++ b/app/pages/guides/forms-and-validation.wrn @@ -9,7 +9,17 @@ page Formsandvalidation {
W WRNexusJS
-
Preview guide · 0.8.7

Forms and validation

Define a v.object schema, use data-schema on the form, show field errors with data-error, and always call parseBody on the server. refine is server-only.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Forms and validation

Define a v.object schema, use data-schema on the form, show field errors with data-error, and always call parseBody on the server. refine is server-only.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/full-stack-auth-demo.wrn b/app/pages/guides/full-stack-auth-demo.wrn new file mode 100644 index 00000000..bb14334a --- /dev/null +++ b/app/pages/guides/full-stack-auth-demo.wrn @@ -0,0 +1,156 @@ +page Authandpermissionsdashboarddemo { + seo { + title = "Auth and permissions dashboard demo" + description = "Create a complete demonstration site with public pages, authentication, configuration profiles, a protected dashboard, roles, permissions, database migrations, tests, and a production build." + canonical = "https://wrnexusjs.dev/guides/full-stack-auth-demo" + } + view { + +
+
W WRNexusJS
+ +
Preview guide · 0.8.7

Auth and permissions dashboard demo

This walkthrough builds a small team portal. Public visitors can read the home and pricing pages, users can sign in, and the dashboard separates ordinary members from administrators. Every authorization decision remains on the server.

+

1. Create the application

bunx @wrnexus/cli@0.8.7 create team-portal
+cd team-portal
+bun install
+bun add @wrnexus/auth @wrnexus/authz @wrnexus/db @wrnexus/validation @wrnexus/ui
+bunx wrnexus generate page pricing
+bunx wrnexus generate page login
+bunx wrnexus generate page dashboard
+bunx wrnexus generate api session/login
+bunx wrnexus generate api session/logout
+bunx wrnexus generate schema login
+bunx wrnexus authz init --dialect=sqlite
+bunx wrnexus db new initial_auth --from-models
+bunx wrnexus db migrate
+bunx wrnexus generate types .

Expected success output includes created file paths, an initialized authorization catalog, the applied migration name, and the generated application declaration path.

+

2. Configure profiles and security

// wrnexus.config.ts
+import type { AppConfig } from "@wrnexus/styles";
+
+const config: AppConfig = {
+  seo: { title: "Team Portal", titleTemplate: "%s | Team Portal" },
+  theme: { default: "system", palette: "violet" },
+  security: {
+    contentSecurityPolicy: true,
+    csrf: true,
+    frameOptions: "deny",
+  },
+  profiles: {
+    development: { envFiles: [".env", ".env.development"] },
+    production: { envFiles: [".env", ".env.production"] },
+  },
+};
+
+export default config;
# .env.example — commit names, never real secrets
+DATABASE_URL=sqlite:./data/team-portal.db
+SESSION_SECRET=replace-with-at-least-32-random-bytes
+APP_ORIGIN=http://localhost:3000

Run wrnexus config . --explain --profile=production before deployment and confirm no development fallback or secret value is printed.

+

3. Create public pages and layout

// app/layouts/public.wrn
+layout Public {
+  view {
+    <Navbar brand="Team Portal" />
+    <main><slot /></main>
+    <Footer copyright="Team Portal" />
+  }
+}
+
+// app/pages/index.wrn
+page Home {
+  layout = "public"
+  seo { title = "Home" description = "A secure portal for modern teams." }
+  view {
+    <Hero eyebrow="Team operations" title="One secure place for every team." />
+    <FeatureGrid columns="3"><slot /></FeatureGrid>
+  }
+}

Create pricing.wrn, privacy.wrn, and terms.wrn with the same public layout. Public routes must not load private account data.

+

4. Define login validation and handlers

// app/schemas/login.ts
+import { v } from "@wrnexus/validation";
+export default v.object({
+  email: v.string().trim().email(),
+  password: v.string().min(12).max(128),
+});
+
+// app/api/session/login.ts
+import schema from "../../schemas/login";
+import { parseBody } from "@wrnexus/validation";
+
+export const POST = async (ctx) => {
+  const parsed = await parseBody(schema, ctx.req);
+  if (!parsed.ok) return parsed.response;
+  // Look up the account, verify its password, rotate the session,
+  // and return the same failure shape for unknown users and bad passwords.
+  return Response.json({ ok: true, redirect: "/dashboard" });
+};

Use the exact installed authentication package API for account lookup, password verification, session rotation, rate limiting, and audit events. Do not copy placeholder authentication logic into production.

+

5. Declare roles and permissions

// app/authz/main.ts
+export const permissions = [
+  "dashboard:read",
+  "member:read",
+  "member:invite",
+  "member:manage",
+] as const;
+
+export const roles = {
+  member: ["dashboard:read", "member:read"],
+  manager: ["dashboard:read", "member:read", "member:invite"],
+  admin: ["dashboard:read", "member:read", "member:invite", "member:manage"],
+} as const;
bunx wrnexus authz generate
+bunx wrnexus authz list
+bunx wrnexus contracts snapshot .

Expected output lists the four permission identifiers and generated authorization artifacts. Commit the contract snapshot so later permission drift is reviewable.

+

6. Protect the dashboard on the server

// app/middleware/auth.ts
+export default async function requireUser(ctx, next) {
+  const user = await readAuthenticatedUser(ctx);
+  if (!user) return Response.redirect(new URL("/login", ctx.url), 303);
+  ctx.state.user = user;
+  return next();
+}
+
+// app/api/members.ts
+export const GET = async (ctx) => {
+  await requirePermission(ctx, "member:read");
+  return Response.json({ members: await listMembers(ctx.state.user.tenantId) });
+};
+
+export const POST = async (ctx) => {
+  await requirePermission(ctx, "member:invite");
+  // Validate input and keep the tenant identifier server-owned.
+  return Response.json({ ok: true }, { status: 201 });
+};

Route middleware establishes identity; each API mutation still checks its exact permission and resource boundary. Hiding an Invite button is useful UX but never authorization.

+

7. Render the dashboard

page Dashboard {
+  layout = "dashboard"
+  ssr {
+    api summary GET /api/dashboard { return summary }
+    api members GET /api/members { return members }
+  }
+  view {
+    <PageHeader eyebrow="Workspace" title="Dashboard" />
+    <MetricGrid columns="3">
+      <MetricCard label="Members" value={summary.memberCount} />
+      <MetricCard label="Invitations" value={summary.invitationCount} />
+      <MetricCard label="Active today" value={summary.activeToday} />
+    </MetricGrid>
+    <DataTable rows={members} />
+  }
+}

Keep dashboard data tenant-scoped in the API. Server rendering prevents an empty shell, while the client receives only the modules required for interactive controls.

+

8. Test denial paths and production

bunx wrnexus typecheck .
+bunx wrnexus test unit .
+bunx wrnexus test api .
+bunx wrnexus test browser .
+bunx wrnexus security audit .
+bunx wrnexus contracts check .
+bunx wrnexus build .
+bunx wrnexus preview . --port=3000

Tests should prove anonymous dashboard access redirects, members cannot invite, managers can invite but cannot manage roles, administrators can manage roles, cross-tenant identifiers are rejected, login failures are rate-limited, CSRF failures return 403, and the production server starts from dist/server.js.

+

9. Demo checklist

  • Public home, pricing, privacy, and terms pages render without authentication.
  • Login creates and rotates a secure session.
  • Dashboard navigation changes by permission, while APIs enforce every permission independently.
  • Member lists and mutations are tenant-scoped on the server.
  • Development and production profiles resolve explicitly.
  • Typecheck, API tests, browser tests, security audit, contract check, build, and preview all pass.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

+ +
+ } +} \ No newline at end of file diff --git a/app/pages/guides/i18n-and-themes.wrn b/app/pages/guides/i18n-and-themes.wrn index 113593fa..96dcdc10 100644 --- a/app/pages/guides/i18n-and-themes.wrn +++ b/app/pages/guides/i18n-and-themes.wrn @@ -9,7 +9,17 @@ page Internationalizationandthemes {
W WRNexusJS
-
Preview guide · 0.8.7

Internationalization and themes

Store locale JSON under app/locales and use translation directives. Themes resolve CSS tokens; ensure contrast, system preference behavior, persistence, and non-color cues.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Internationalization and themes

Store locale JSON under app/locales and use translation directives. Themes resolve CSS tokens; ensure contrast, system preference behavior, persistence, and non-color cues.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/middleware.wrn b/app/pages/guides/middleware.wrn index fe314db8..88509864 100644 --- a/app/pages/guides/middleware.wrn +++ b/app/pages/guides/middleware.wrn @@ -9,7 +9,17 @@ page Middleware {
W WRNexusJS
-
Preview guide · 0.8.7

Middleware

Middleware receives context and next. Return next() to continue or return a Response to stop. Put request limits and trust-boundary controls before business logic.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Middleware

Middleware receives context and next. Return next() to continue or return a Response to stop. Put request limits and trust-boundary controls before business logic.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/mobile.wrn b/app/pages/guides/mobile.wrn index 62824c73..852bbc42 100644 --- a/app/pages/guides/mobile.wrn +++ b/app/pages/guides/mobile.wrn @@ -9,7 +9,17 @@ page Mobile {
W WRNexusJS
-
Preview guide · 0.8.7

Mobile

Mobile capabilities are experimental in this preview. Test Capacitor permissions and lifecycle on each platform; do not assume every .wrn or browser API converts to native.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Mobile

Mobile capabilities are experimental in this preview. Test Capacitor permissions and lifecycle on each platform; do not assume every .wrn or browser API converts to native.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/observability.wrn b/app/pages/guides/observability.wrn index 01abe0e1..88b52dbe 100644 --- a/app/pages/guides/observability.wrn +++ b/app/pages/guides/observability.wrn @@ -9,7 +9,17 @@ page Observability {
W WRNexusJS
-
Preview guide · 0.8.7

Observability

Use tracking middleware and sinks with redaction, sampling, stable request identifiers, alert ownership, and retention limits. Never capture registry tokens or session secrets.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Observability

Use tracking middleware and sinks with redaction, sampling, stable request identifiers, alert ownership, and retention limits. Never capture registry tokens or session secrets.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/pages-and-components.wrn b/app/pages/guides/pages-and-components.wrn index 27e380f4..e7b892cd 100644 --- a/app/pages/guides/pages-and-components.wrn +++ b/app/pages/guides/pages-and-components.wrn @@ -9,7 +9,17 @@ page Pagesandcomponents {
W WRNexusJS
-
Preview guide · 0.8.7

Pages and components

Pages are routable, components are reusable, and layouts provide shared slots. Mount a component with data-component and keep browser state scoped and minimal.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Pages and components

Pages are routable, components are reusable, and layouts provide shared slots. Mount a component with data-component and keep browser state scoped and minimal.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/project-structure.wrn b/app/pages/guides/project-structure.wrn index 084e0851..fe41631c 100644 --- a/app/pages/guides/project-structure.wrn +++ b/app/pages/guides/project-structure.wrn @@ -9,7 +9,17 @@ page Projectstructure {
W WRNexusJS
-
Preview guide · 0.8.7

Project structure

Pages, components, layouts, APIs, middleware, schemas, database files, locales, realtime rooms, and styles live under app. Never edit app/routes.gen.ts, .wrnexus, or dist by hand.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Project structure

Pages, components, layouts, APIs, middleware, schemas, database files, locales, realtime rooms, and styles live under app. Never edit app/routes.gen.ts, .wrnexus, or dist by hand.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/pubsub.wrn b/app/pages/guides/pubsub.wrn index 35c14ebc..5793ebca 100644 --- a/app/pages/guides/pubsub.wrn +++ b/app/pages/guides/pubsub.wrn @@ -9,7 +9,17 @@ page Pubsub {
W WRNexusJS
-
Preview guide · 0.8.7

Pub/sub

The in-process driver cannot cross processes. Use Redis where instances must share events, define channel ownership, and design for reconnects and duplicate delivery.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Pub/sub

The in-process driver cannot cross processes. Use Redis where instances must share events, define channel ownership, and design for reconnects and duplicate delivery.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/queues.wrn b/app/pages/guides/queues.wrn index 0517f02b..bfc73a8d 100644 --- a/app/pages/guides/queues.wrn +++ b/app/pages/guides/queues.wrn @@ -9,7 +9,17 @@ page Queues {
W WRNexusJS
-
Preview guide · 0.8.7

Queues

Queue behavior is preview-level. Treat in-process work as non-durable, make handlers idempotent, cap retries, record failures, and choose a production persistence strategy.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Queues

Queue behavior is preview-level. Treat in-process work as non-durable, make handlers idempotent, cap retries, record failures, and choose a production persistence strategy.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/realtime.wrn b/app/pages/guides/realtime.wrn index 08d800bf..5d4043ad 100644 --- a/app/pages/guides/realtime.wrn +++ b/app/pages/guides/realtime.wrn @@ -9,7 +9,17 @@ page Realtime {
W WRNexusJS
-
Preview guide · 0.8.7

Realtime

defineRoom handles connection and messages. Validate message shapes, authorize subscriptions, restrict origins, bound payloads, and use pub/sub to scale across processes.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Realtime

defineRoom handles connection and messages. Validate message shapes, authorize subscriptions, restrict origins, bound payloads, and use pub/sub to scale across processes.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/routing.wrn b/app/pages/guides/routing.wrn index cb08d5b9..a008e1a6 100644 --- a/app/pages/guides/routing.wrn +++ b/app/pages/guides/routing.wrn @@ -9,7 +9,17 @@ page Routing {
W WRNexusJS
-
Preview guide · 0.8.7

Routing

A page filename defines its URL; index maps to the directory root and bracket segments are dynamic parameters. API files under app/api expose HTTP method functions and receive a Context.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Routing

A page filename defines its URL; index maps to the directory root and bracket segments are dynamic parameters. API files under app/api expose HTTP method functions and receive a Context.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/security.wrn b/app/pages/guides/security.wrn index 2735becf..9b38d5d3 100644 --- a/app/pages/guides/security.wrn +++ b/app/pages/guides/security.wrn @@ -9,7 +9,17 @@ page Applicationsecurity {
W WRNexusJS
-
Preview guide · 0.8.7

Application security

Use CSP, CSRF, Trusted Types, session hardening, validation, origin checks, upload restrictions, encryption, request limits, and explicit CORS. See the security policy for reporting.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Application security

Use CSP, CSRF, Trusted Types, session hardening, validation, origin checks, upload restrictions, encryption, request limits, and explicit CORS. See the security policy for reporting.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/server-data.wrn b/app/pages/guides/server-data.wrn index f5696a07..c73039d0 100644 --- a/app/pages/guides/server-data.wrn +++ b/app/pages/guides/server-data.wrn @@ -9,7 +9,17 @@ page Serverdata {
W WRNexusJS
-
Preview guide · 0.8.7

Server data

Use an ssr API binding, return the desired response field, and render it with a server #each block. Values are escaped. Avoid fetching private data through a route that lacks authorization.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Server data

Use an ssr API binding, return the desired response field, and render it with a server #each block. Values are escaped. Avoid fetching private data through a route that lacks authorization.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/testing.wrn b/app/pages/guides/testing.wrn index e04ad633..ab921810 100644 --- a/app/pages/guides/testing.wrn +++ b/app/pages/guides/testing.wrn @@ -9,7 +9,17 @@ page Testing {
W WRNexusJS
-
Preview guide · 0.8.7

Testing

Use Bun tests and @wrnexus/test helpers. Cover server HTML, API status and validation, authorization failures, reactive behavior, and a production startup smoke test.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Testing

Use Bun tests and @wrnexus/test helpers. Cover server HTML, API status and validation, authorization failures, reactive behavior, and a production startup smoke test.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/troubleshooting.wrn b/app/pages/guides/troubleshooting.wrn index e0f31d72..4179a7c9 100644 --- a/app/pages/guides/troubleshooting.wrn +++ b/app/pages/guides/troubleshooting.wrn @@ -9,7 +9,17 @@ page Troubleshooting {
W WRNexusJS
-
Preview guide · 0.8.7

Troubleshooting

Confirm Bun and package versions, regenerate docs/routes through supported commands, read the first compiler diagnostic, check file naming, validate config, and reproduce under a production build.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Troubleshooting

Confirm Bun and package versions, regenerate docs/routes through supported commands, read the first compiler diagnostic, check file naming, validate config, and reproduce under a production build.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/upgrading.wrn b/app/pages/guides/upgrading.wrn index cdd1a074..43c80314 100644 --- a/app/pages/guides/upgrading.wrn +++ b/app/pages/guides/upgrading.wrn @@ -9,7 +9,17 @@ page Upgrading {
W WRNexusJS
-
Preview guide · 0.8.7

Upgrading

Back up and commit first, then use wrnexus update --latest as documented by the installed CLI. Review migrations and keep every @wrnexus package aligned. Current release: 0.8.7.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Upgrading

Back up and commit first, then use wrnexus update --latest as documented by the installed CLI. Review migrations and keep every @wrnexus package aligned. Current release: 0.8.7.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/uploads.wrn b/app/pages/guides/uploads.wrn index 4f20a29b..c90b412f 100644 --- a/app/pages/guides/uploads.wrn +++ b/app/pages/guides/uploads.wrn @@ -9,7 +9,17 @@ page Uploads {
W WRNexusJS
-
Preview guide · 0.8.7

Uploads

Configure named stores, accepted MIME/extensions, and maxBytes. Random keys avoid path traversal. Private files require an authenticated serving route; v1 buffers each file in memory.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
Preview guide · 0.8.7

Uploads

Configure named stores, accepted MIME/extensions, and maxBytes. Random keys avoid path traversal. Private files require an authenticated serving route; v1 buffers each file in memory.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/guides/workspaces-and-gateway.wrn b/app/pages/guides/workspaces-and-gateway.wrn index c685b92b..0b28de88 100644 --- a/app/pages/guides/workspaces-and-gateway.wrn +++ b/app/pages/guides/workspaces-and-gateway.wrn @@ -9,9 +9,16 @@ page Workspacesandgateway {
W WRNexusJS
-
Preview guide · 0.8.7

Workspaces and gateway

A workspace runs isolated applications behind one domain-routing gateway. Add an application from the workspace root; the CLI scaffolds apps/reports and registers it in wrnexus.workspace.ts:

wrnexus workspace add reports --domain=reports.localhost
+      
Preview guide · 0.8.7

Workspaces and gateway

A workspace runs isolated applications behind one domain-routing gateway. Add an application from the workspace root; the CLI scaffolds apps/reports and registers it in wrnexus.workspace.ts:

wrnexus workspace add reports --domain=reports.localhost
 bun install
-bun run dev

Forward authentication

Point protected applications at a dedicated verifier endpoint. The verifier must return 2xx for an authenticated session, 401/403 to deny access, or an HTTP redirect to begin browser login.

// wrnexus.workspace.ts
+bun run dev

Forward authentication

Point protected applications at a dedicated verifier endpoint. The verifier must return 2xx for an authenticated session, 401/403 to deny access, or an HTTP redirect to begin browser login.

// wrnexus.workspace.ts
 {
   name: "admin",
   dir: "apps/admin",
@@ -28,7 +35,10 @@ export const GET = async (ctx: Context) => {
   return redirectToLogin(ctx, "/login", {
     allowedHosts: ["admin.localhost:3000", "reports.localhost:3000"],
   });
-};

Always allowlist redirect hosts. After login, validate or sign the returnTo value before redirecting. Keep internal app ports private and open applications through the gateway port.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+};

Always allowlist redirect hosts. After login, validate or sign the returnTo value before redirecting. Keep internal app ports private and open applications through the gateway port.

Configuration

Keep configuration in wrnexus.config.ts, select an explicit profile, and store secrets only in validated environment variables. Use wrnexus config . --explain to review the resolved non-secret configuration.

Implementation workflow

bunx wrnexus doctor .
+bunx wrnexus typecheck .
+bunx wrnexus inspect routes .
+bunx wrnexus build .

Start from the exact installed package page, implement the smallest server-owned contract, and add browser behavior only where interaction requires it. Run the production build because development-only success does not prove deployability.

Verification checklist

  • Inputs are validated at the authoritative server boundary.
  • Authentication and resource authorization are tested independently.
  • Generated routes and application types are current.
  • Error, empty, loading, denied, and success states are documented.
  • The production artifact starts and serves the expected route.

Release scope

This guide describes installed 0.8.7 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · CLI reference · Troubleshooting · Support

} diff --git a/app/pages/language.wrn b/app/pages/language.wrn index ad04d746..1d497620 100644 --- a/app/pages/language.wrn +++ b/app/pages/language.wrn @@ -9,12 +9,19 @@ page Thewrnlanguage {
W WRNexusJS
-
Language reference · 0.8.7

The .wrn language

File anatomy

page Account {
+      
Language reference · 0.8.7

The .wrn language

File anatomy

page Account {
   layout = "public"
   seo { title = "Account" description = "Manage your account." }
   state count = 0
   view { <button @click="count++">Count {count}</button> }
-}

Pages, components, layouts, props, and state

Pages are routes. Components declare default-valued props and may hold state. Layouts provide shared slots. Mount components with data-component; fill default or named slots with data-slot.

Interpolation, conditionals, and loops

Interpolation is HTML-escaped. Use server {#if} and {#each} for SSR data. Use data-show for reactive client visibility.

Events and directives

@click and other events execute in the reactive scope. Data attributes opt into forms, i18n, themes, realtime, uploader, browser, and mobile behavior. Consult the exact package page because availability varies.

Forms, i18n, themes, and realtime

form[data-schema] connects descriptors to client and server validation. Translation keys use {t:key}. Theme toggles use data-wire-theme-toggle. Realtime pages opt into a named room.

Escaping and security

Text interpolation is escaped by default. Do not construct trusted HTML from user input. Server-only refinements must be repeated at the authoritative mutation boundary.

Common compiler errors

  • Use balanced braces; a literal brace must be escaped.
  • Declare UI in view, not JSX or hooks.
  • Use a valid page, component, or layout declaration matching the file role.
  • Keep server loops tied to available SSR bindings.
  • Check troubleshooting and compiler API for this release.
+}

Pages, components, layouts, props, and state

Pages are routes. Components declare default-valued props and may hold state. Layouts provide shared slots. Mount components with data-component; fill default or named slots with data-slot.

Interpolation, conditionals, and loops

Interpolation is HTML-escaped. Use server {#if} and {#each} for SSR data. Use data-show for reactive client visibility.

Events and directives

@click and other events execute in the reactive scope. Data attributes opt into forms, i18n, themes, realtime, uploader, browser, and mobile behavior. Consult the exact package page because availability varies.

Forms, i18n, themes, and realtime

form[data-schema] connects descriptors to client and server validation. Translation keys use {t:key}. Theme toggles use data-wire-theme-toggle. Realtime pages opt into a named room.

Escaping and security

Text interpolation is escaped by default. Do not construct trusted HTML from user input. Server-only refinements must be repeated at the authoritative mutation boundary.

Common compiler errors

  • Use balanced braces; a literal brace must be escaped.
  • Declare UI in view, not JSX or hooks.
  • Use a valid page, component, or layout declaration matching the file role.
  • Keep server loops tied to available SSR bindings.
  • Check troubleshooting and compiler API for this release.
} diff --git a/app/pages/license.wrn b/app/pages/license.wrn index 53b2a7ae..37a9c02e 100644 --- a/app/pages/license.wrn +++ b/app/pages/license.wrn @@ -9,7 +9,14 @@ page License {
W WRNexusJS
-

License

Owner decision required

This documentation repository contains no public license file, and the packages are unavailable from the public npm registry. No open-source license or redistribution right should be inferred.

Approved preview users must follow the private/commercial terms supplied by WorkRoot. Contact WorkRoot before copying, redistributing, or using WRNexusJS in production.

+

License

Owner decision required

This documentation repository contains no public license file, and the packages are unavailable from the public npm registry. No open-source license or redistribution right should be inferred.

Approved preview users must follow the private/commercial terms supplied by WorkRoot. Contact WorkRoot before copying, redistributing, or using WRNexusJS in production.

} diff --git a/app/pages/releases/0.8.7.wrn b/app/pages/releases/0.8.7.wrn index a315ec4f..afd3b504 100644 --- a/app/pages/releases/0.8.7.wrn +++ b/app/pages/releases/0.8.7.wrn @@ -9,7 +9,14 @@ page Release087 {
W WRNexusJS
-

WRNexusJS 0.8.7

Released 2026-07-13. All 47 installed packages are aligned to this version. Highlights include the new helpers package, reliable workspace app addition, and browser SSO redirects through forward authentication. See the changelog, upgrade guide, and package references.

+

WRNexusJS 0.8.7

Released 2026-07-13. All 47 installed packages are aligned to this version. Highlights include the new helpers package, reliable workspace app addition, and browser SSO redirects through forward authentication. See the changelog, upgrade guide, and package references.

} diff --git a/app/pages/roadmap.wrn b/app/pages/roadmap.wrn index 43fea649..ab4a4534 100644 --- a/app/pages/roadmap.wrn +++ b/app/pages/roadmap.wrn @@ -9,7 +9,14 @@ page Roadmap {
W WRNexusJS
-

Roadmap

Roadmap items are direction, not delivery commitments. Dates require explicit owner approval.

Now

  • Private preview onboarding and accurate package references
  • Runnable documentation fixtures and link/accessibility checks
  • License, support, and disclosure owner decisions

Next

  • Durable queue driver guidance
  • Expanded database/auth/realtime examples
  • Versioned release notes and migration fixtures

Later / exploration

  • Historical documentation selector
  • Maintained reproducible benchmarks
  • Broader mobile/native coverage
+

Roadmap

Roadmap items are direction, not delivery commitments. Dates require explicit owner approval.

Now

  • Private preview onboarding and accurate package references
  • Runnable documentation fixtures and link/accessibility checks
  • License, support, and disclosure owner decisions

Next

  • Durable queue driver guidance
  • Expanded database/auth/realtime examples
  • Versioned release notes and migration fixtures

Later / exploration

  • Historical documentation selector
  • Maintained reproducible benchmarks
  • Broader mobile/native coverage
} diff --git a/app/pages/search.wrn b/app/pages/search.wrn index 0875de0a..47e08446 100644 --- a/app/pages/search.wrn +++ b/app/pages/search.wrn @@ -9,7 +9,14 @@ page Search {
W WRNexusJS
-

Search documentation

This build-time index is local and sends no query to a third party. Use your browser’s find command to filter this compact index.

Core documentation

Get started · Packages · Components · Language · Architecture

Guides

Project structure · Routing · Pages and components · Server data · API routes · Middleware · Forms and validation · Authentication · Authorization · Application security · Database · Uploads · Realtime · Pub/sub · Queues · Testing · Workspaces and gateway · Deployment · Configuration and profiles · Internationalization and themes · Mobile · Observability · Upgrading · Troubleshooting

Package APIs

@wrnexus/ai · @wrnexus/authz · @wrnexus/compiler · @wrnexus/core · @wrnexus/csr · @wrnexus/db · @wrnexus/dev-server · @wrnexus/encryption · @wrnexus/helpers · @wrnexus/i18n · @wrnexus/jwt · @wrnexus/mobile · @wrnexus/native · @wrnexus/oauth · @wrnexus/pubsub · @wrnexus/queue · @wrnexus/reactive · @wrnexus/router · @wrnexus/ssr · @wrnexus/styles · @wrnexus/test · @wrnexus/tracking · @wrnexus/ui · @wrnexus/uploader · @wrnexus/validation · @wrnexus/dev-toolbar · @wrnexus/syntax · @wrnexus/plugin · @wrnexus/captcha · @wrnexus/auth · @wrnexus/store · @wrnexus/typecheck · @wrnexus/security · @wrnexus/cache · @wrnexus/image · @wrnexus/observability · @wrnexus/benchmark · @wrnexus/realtime · @wrnexus/content · @wrnexus/graphql · @wrnexus/identity · @wrnexus/language-server · @wrnexus/mcp · @wrnexus/playground · @wrnexus/pwa · @wrnexus/rpc · @wrnexus/cli

+

Search documentation

This build-time index is local and sends no query to a third party. Use your browser’s find command to filter this compact index.

Core documentation

Get started · Packages · Components · Language · Architecture

Guides

Project structure · Routing · Pages and components · Server data · API routes · Middleware · Forms and validation · Authentication · Authorization · Application security · Database · Uploads · Realtime · Pub/sub · Queues · Testing · Workspaces and gateway · Deployment · Configuration and profiles · Internationalization and themes · Mobile · Observability · Upgrading · Troubleshooting · Auth and permissions dashboard demo

Package APIs

@wrnexus/ai · @wrnexus/authz · @wrnexus/compiler · @wrnexus/core · @wrnexus/csr · @wrnexus/db · @wrnexus/dev-server · @wrnexus/encryption · @wrnexus/helpers · @wrnexus/i18n · @wrnexus/jwt · @wrnexus/mobile · @wrnexus/native · @wrnexus/oauth · @wrnexus/pubsub · @wrnexus/queue · @wrnexus/reactive · @wrnexus/router · @wrnexus/ssr · @wrnexus/styles · @wrnexus/test · @wrnexus/tracking · @wrnexus/ui · @wrnexus/uploader · @wrnexus/validation · @wrnexus/dev-toolbar · @wrnexus/syntax · @wrnexus/plugin · @wrnexus/captcha · @wrnexus/auth · @wrnexus/store · @wrnexus/typecheck · @wrnexus/security · @wrnexus/cache · @wrnexus/image · @wrnexus/observability · @wrnexus/benchmark · @wrnexus/realtime · @wrnexus/content · @wrnexus/graphql · @wrnexus/identity · @wrnexus/language-server · @wrnexus/mcp · @wrnexus/playground · @wrnexus/pwa · @wrnexus/rpc · @wrnexus/cli

} diff --git a/app/pages/security.wrn b/app/pages/security.wrn index 79a3631f..61c7c37b 100644 --- a/app/pages/security.wrn +++ b/app/pages/security.wrn @@ -9,7 +9,14 @@ page Security {
W WRNexusJS
-

Security

WRNexusJS provides primitives for CSP, CSRF, Trusted Types, sessions, validation, authorization, encryption, upload restrictions, request limits, and WebSocket-origin checks. Applications remain responsible for correct configuration, business authorization, secrets, dependencies, data protection, and operations.

Supported releases

Only the current private-preview release 0.8.7 is documented here. A formal old-release support window is not yet published.

Report a vulnerability

Use WorkRoot’s approved private contact path at workroot.in. Do not publish exploit details or secrets. Include affected version, impact, reproduction, and a safe contact method. Response targets, encryption key, bounty, audit, and certification are not currently claimed.

Deployment controls

Use restrictive CSP and permissions policies, HSTS only on HTTPS production origins, MIME sniffing protection, restrictive referrers, explicit CORS, secure cookies, CSRF validation, request limits, and origin checks. See application security.

+

Security

WRNexusJS provides primitives for CSP, CSRF, Trusted Types, sessions, validation, authorization, encryption, upload restrictions, request limits, and WebSocket-origin checks. Applications remain responsible for correct configuration, business authorization, secrets, dependencies, data protection, and operations.

Supported releases

Only the current private-preview release 0.8.7 is documented here. A formal old-release support window is not yet published.

Report a vulnerability

Use WorkRoot’s approved private contact path at workroot.in. Do not publish exploit details or secrets. Include affected version, impact, reproduction, and a safe contact method. Response targets, encryption key, bounty, audit, and certification are not currently claimed.

Deployment controls

Use restrictive CSP and permissions policies, HSTS only on HTTPS production origins, MIME sniffing protection, restrictive referrers, explicit CORS, secure cookies, CSRF validation, request limits, and origin checks. See application security.

} diff --git a/app/pages/showcase.wrn b/app/pages/showcase.wrn index f1cb3fe1..2251f7d3 100644 --- a/app/pages/showcase.wrn +++ b/app/pages/showcase.wrn @@ -9,7 +9,14 @@ page Showcase {
W WRNexusJS
-

Showcase

Only confirmed public properties are listed; no customer or traffic claims are made.

WorkRoot

Creator/company site demonstrating a public WRNexusJS deployment. Exact deployed version and infrastructure notes await owner confirmation.

WRNexusJS docs

This documentation portal, built and verified against WRNexusJS 0.8.7 on Bun.

Screenshots are intentionally deferred until approved assets and alt text are available.

+

Showcase

Only confirmed public properties are listed; no customer or traffic claims are made.

WorkRoot

Creator/company site demonstrating a public WRNexusJS deployment. Exact deployed version and infrastructure notes await owner confirmation.

WRNexusJS docs

This documentation portal, built and verified against WRNexusJS 0.8.7 on Bun.

Screenshots are intentionally deferred until approved assets and alt text are available.

} diff --git a/app/pages/support.wrn b/app/pages/support.wrn index 1e850702..d97d39a2 100644 --- a/app/pages/support.wrn +++ b/app/pages/support.wrn @@ -9,7 +9,14 @@ page Support {
W WRNexusJS
-

Support

WRNexusJS has no public Discord, public issue tracker, or guaranteed community support channel listed by this repository. Preview access and support begin through WorkRoot’s public contact path.

Include WRNexusJS version, Bun version, OS, a minimal reproduction, expected and actual behavior, and sanitized logs. Never include registry tokens, credentials, session cookies, or private data.

Support scope, service levels, and commercial terms require owner confirmation.

+

Support

WRNexusJS has no public Discord, public issue tracker, or guaranteed community support channel listed by this repository. Preview access and support begin through WorkRoot’s public contact path.

Include WRNexusJS version, Bun version, OS, a minimal reproduction, expected and actual behavior, and sanitized logs. Never include registry tokens, credentials, session cookies, or private data.

Support scope, service levels, and commercial terms require owner confirmation.

} diff --git a/app/pages/tutorial.wrn b/app/pages/tutorial.wrn index 2cf93823..03b26524 100644 --- a/app/pages/tutorial.wrn +++ b/app/pages/tutorial.wrn @@ -9,20 +9,27 @@ page Tutorial {
W WRNexusJS
-
Preview · runnable-project extraction pending

Secure task board

This tutorial connects the installed 0.8.7 APIs into one design. Snippets are limited to declarations and README patterns verified in the installed packages; a CI-compiled standalone fixture remains on the roadmap.

Application shape

A .wrn page renders tasks from an SSR API binding. A shared validation schema protects mutations. Session middleware identifies users, authorization policies gate updates, and a realtime room broadcasts changes.

Schema and create route

import { v, parseBody } from "@wrnexus/validation";
+      
Preview · runnable-project extraction pending

Secure task board

This tutorial connects the installed 0.8.7 APIs into one design. Snippets are limited to declarations and README patterns verified in the installed packages; a CI-compiled standalone fixture remains on the roadmap.

Application shape

A .wrn page renders tasks from an SSR API binding. A shared validation schema protects mutations. Session middleware identifies users, authorization policies gate updates, and a realtime room broadcasts changes.

Schema and create route

import { v, parseBody } from "@wrnexus/validation";
 const task = v.object({ title: v.string().trim().min(3).max(120) });
 export const POST = async (ctx) => {
   const parsed = await parseBody(task, ctx.req);
   if (!parsed.ok) return parsed.response;
   return Response.json({ ok: true, task: parsed.value }, { status: 201 });
-};

Server-rendered list

page Tasks {
+};

Server-rendered list

page Tasks {
   ssr { api tasks GET /api/tasks { return tasks } }
   view {
     <main><h1>Tasks</h1><ul>
       {#each tasks as task}<li>{task.title}</li>{:empty}<li>No tasks yet.</li>{/each}
     </ul></main>
   }
-}

Production checklist

  • Choose SQLite for local development or configure the supported PostgreSQL driver.
  • Run migrations before accepting traffic.
  • Enable session authentication and enforce authorization on every mutation.
  • Validate upload types and sizes; keep private objects behind authenticated routes.
  • Use Redis pub/sub when realtime rooms span processes.
  • Treat the default queue as non-durable until a production driver is selected.

Follow the focused database, authentication, authorization, realtime, and upload guides.

+}

Production checklist

  • Choose SQLite for local development or configure the supported PostgreSQL driver.
  • Run migrations before accepting traffic.
  • Enable session authentication and enforce authorization on every mutation.
  • Validate upload types and sizes; keep private objects behind authenticated routes.
  • Use Redis pub/sub when realtime rooms span processes.
  • Treat the default queue as non-durable until a production driver is selected.

Follow the focused database, authentication, authorization, realtime, and upload guides.

} diff --git a/app/routes.gen.ts b/app/routes.gen.ts index 2362f918..406bde04 100644 --- a/app/routes.gen.ts +++ b/app/routes.gen.ts @@ -17,6 +17,7 @@ export interface Routes { "/guides/database": Record; "/guides/deployment": Record; "/guides/forms-and-validation": Record; + "/guides/full-stack-auth-demo": Record; "/guides/i18n-and-themes": Record; "/guides/middleware": Record; "/guides/mobile": Record; @@ -195,6 +196,7 @@ export interface RouteNames { "guides.database": "/guides/database"; "guides.deployment": "/guides/deployment"; "guides.forms.and.validation": "/guides/forms-and-validation"; + "guides.full.stack.auth.demo": "/guides/full-stack-auth-demo"; "guides.i18n.and.themes": "/guides/i18n-and-themes"; "guides.middleware": "/guides/middleware"; "guides.mobile": "/guides/mobile"; @@ -442,6 +444,7 @@ export function route( "guides.database": "/guides/database", "guides.deployment": "/guides/deployment", "guides.forms.and.validation": "/guides/forms-and-validation", + "guides.full.stack.auth.demo": "/guides/full-stack-auth-demo", "guides.i18n.and.themes": "/guides/i18n-and-themes", "guides.middleware": "/guides/middleware", "guides.mobile": "/guides/mobile", diff --git a/app/styles/global.css b/app/styles/global.css index 647f2560..f503a6c6 100644 --- a/app/styles/global.css +++ b/app/styles/global.css @@ -11,6 +11,52 @@ align-items: start; padding-top: clamp(1.5rem, 4vw, 3rem); } +.docs-layout--navigation { + grid-template-columns: 14rem minmax(0, 1fr) 13rem; + width: min(1440px, calc(100% - 2rem)); + max-width: 1440px; +} +.docs-reading-column { + min-width: 0; +} +.docs-reading-column .documentation.standalone { + width: 100%; + margin: 0; +} +.docs-section-menu { + position: sticky; + top: 6.5rem; + max-height: calc(100vh - 8rem); + overflow-y: auto; + padding-right: 1.25rem; + border-right: 1px solid var(--border); +} +.docs-section-menu nav, +.docs-section-menu section { + display: grid; +} +.docs-section-menu nav { + gap: 1.4rem; +} +.docs-section-menu section { + gap: 0.5rem; +} +.docs-section-menu strong { + margin-bottom: 0.2rem; + font-size: 0.72rem; + letter-spacing: 0.08em; + text-transform: uppercase; +} +.docs-section-menu a { + color: var(--muted); + font-size: 0.82rem; + line-height: 1.4; + text-decoration: none; +} +.docs-section-menu a:hover, +.docs-section-menu a:focus-visible { + color: var(--brand); +} .package-document, .component-detail-page .documentation { width: 100%; @@ -134,6 +180,9 @@ .docs-layout .on-this-page { display: none; } + .docs-layout--navigation { + grid-template-columns: 13rem minmax(0, 1fr); + } } @media (max-width: 640px) { .component-grid { @@ -145,6 +194,13 @@ .doc-intro { border-radius: 18px; } + .docs-layout--navigation { + width: min(100% - 1.25rem, 100%); + grid-template-columns: minmax(0, 1fr); + } + .docs-section-menu { + display: none; + } } /* Documentation v3: editorial hierarchy, not a dashboard of cards. */ diff --git a/app/types/wrnexus.generated.d.ts b/app/types/wrnexus.generated.d.ts index 30a73199..de459f80 100644 --- a/app/types/wrnexus.generated.d.ts +++ b/app/types/wrnexus.generated.d.ts @@ -13,7 +13,7 @@ declare namespace WRNexusGenerated { : never; type RealtimeMessage = T extends import("@wrnexus/core").RoomDefinition ? M : unknown; type QueuePayload = T extends import("@wrnexus/queue").JobDefinition ? I : unknown; - type RouteName = "404" | "access" | "architecture" | "benchmarks" | "changelog" | "examples" | "getting.started" | "guides.api.routes" | "guides.authentication" | "guides.authorization" | "guides.configuration.and.profiles" | "guides.database" | "guides.deployment" | "guides.forms.and.validation" | "guides.i18n.and.themes" | "guides.middleware" | "guides.mobile" | "guides.observability" | "guides.pages.and.components" | "guides.project.structure" | "guides.pubsub" | "guides.queues" | "guides.realtime" | "guides.routing" | "guides.security" | "guides.server.data" | "guides.testing" | "guides.troubleshooting" | "guides.upgrading" | "guides.uploads" | "guides.workspaces.and.gateway" | "index" | "language" | "license" | "packages" | "packages.ai" | "packages.auth" | "packages.authz" | "packages.benchmark" | "packages.cache" | "packages.captcha" | "packages.cli" | "packages.compiler" | "packages.content" | "packages.core" | "packages.csr" | "packages.db" | "packages.dev.server" | "packages.dev.toolbar" | "packages.encryption" | "packages.graphql" | "packages.helpers" | "packages.i18n" | "packages.identity" | "packages.image" | "packages.jwt" | "packages.language.server" | "packages.mcp" | "packages.mobile" | "packages.native" | "packages.oauth" | "packages.observability" | "packages.playground" | "packages.plugin" | "packages.pubsub" | "packages.pwa" | "packages.queue" | "packages.reactive" | "packages.realtime" | "packages.router" | "packages.security" | "packages.ssr" | "packages.store" | "packages.styles" | "packages.syntax" | "packages.test" | "packages.tracking" | "packages.typecheck" | "packages.ui" | "packages.uploader" | "packages.validation" | "releases.0.2.15" | "releases.0.2.17" | "releases.0.2.18" | "releases.0.2.19" | "releases.0.2.20" | "releases.0.2.21" | "releases.0.2.22" | "releases.0.2.23" | "releases.0.2.24" | "releases.0.2.25" | "releases.0.2.26" | "releases.0.2.27" | "releases.0.2.28" | "releases.0.2.29" | "releases.0.2.30" | "releases.0.2.31" | "releases.0.2.32" | "releases.0.2.33" | "releases.0.2.34" | "releases.0.2.35" | "releases.0.2.36" | "releases.0.2.37" | "releases.0.2.38" | "releases.0.2.39" | "releases.0.2.40" | "releases.0.2.41" | "releases.0.2.42" | "releases.0.2.43" | "releases.0.2.44" | "releases.0.2.45" | "releases.0.2.46" | "releases.0.2.47" | "releases.0.2.48" | "releases.0.2.49" | "releases.0.2.50" | "releases.0.2.51" | "releases.0.2.52" | "releases.0.2.53" | "releases.0.2.54" | "releases.0.2.55" | "releases.0.2.56" | "releases.0.2.57" | "releases.0.2.58" | "releases.0.2.59" | "releases.0.2.60" | "releases.0.2.61" | "releases.0.2.62" | "releases.0.2.63" | "releases.0.2.64" | "releases.0.2.65" | "releases.0.2.66" | "releases.0.2.67" | "releases.0.2.68" | "releases.0.2.69" | "releases.0.2.70" | "releases.0.2.71" | "releases.0.2.72" | "releases.0.2.73" | "releases.0.2.74" | "releases.0.2.75" | "releases.0.2.76" | "releases.0.2.77" | "releases.0.2.78" | "releases.0.2.79" | "releases.0.3.0" | "releases.0.3.1" | "releases.0.3.2" | "releases.0.3.3" | "releases.0.3.4" | "releases.0.3.5" | "releases.0.3.6" | "releases.0.4.0" | "releases.0.5.0" | "releases.0.5.1" | "releases.0.5.10" | "releases.0.5.11" | "releases.0.5.12" | "releases.0.5.13" | "releases.0.6.0" | "releases.0.7.0" | "releases.0.8.0" | "releases.0.8.1" | "releases.0.8.2" | "releases.0.8.3" | "releases.0.8.4" | "releases.0.8.5" | "releases.0.8.6" | "releases.0.8.7" | "roadmap" | "search" | "security" | "showcase" | "support" | "tutorial"; + type RouteName = "404" | "access" | "architecture" | "benchmarks" | "changelog" | "examples" | "getting.started" | "guides.api.routes" | "guides.authentication" | "guides.authorization" | "guides.configuration.and.profiles" | "guides.database" | "guides.deployment" | "guides.forms.and.validation" | "guides.full.stack.auth.demo" | "guides.i18n.and.themes" | "guides.middleware" | "guides.mobile" | "guides.observability" | "guides.pages.and.components" | "guides.project.structure" | "guides.pubsub" | "guides.queues" | "guides.realtime" | "guides.routing" | "guides.security" | "guides.server.data" | "guides.testing" | "guides.troubleshooting" | "guides.upgrading" | "guides.uploads" | "guides.workspaces.and.gateway" | "index" | "language" | "license" | "packages" | "packages.ai" | "packages.auth" | "packages.authz" | "packages.benchmark" | "packages.cache" | "packages.captcha" | "packages.cli" | "packages.compiler" | "packages.content" | "packages.core" | "packages.csr" | "packages.db" | "packages.dev.server" | "packages.dev.toolbar" | "packages.encryption" | "packages.graphql" | "packages.helpers" | "packages.i18n" | "packages.identity" | "packages.image" | "packages.jwt" | "packages.language.server" | "packages.mcp" | "packages.mobile" | "packages.native" | "packages.oauth" | "packages.observability" | "packages.playground" | "packages.plugin" | "packages.pubsub" | "packages.pwa" | "packages.queue" | "packages.reactive" | "packages.realtime" | "packages.router" | "packages.security" | "packages.ssr" | "packages.store" | "packages.styles" | "packages.syntax" | "packages.test" | "packages.tracking" | "packages.typecheck" | "packages.ui" | "packages.uploader" | "packages.validation" | "releases.0.2.15" | "releases.0.2.17" | "releases.0.2.18" | "releases.0.2.19" | "releases.0.2.20" | "releases.0.2.21" | "releases.0.2.22" | "releases.0.2.23" | "releases.0.2.24" | "releases.0.2.25" | "releases.0.2.26" | "releases.0.2.27" | "releases.0.2.28" | "releases.0.2.29" | "releases.0.2.30" | "releases.0.2.31" | "releases.0.2.32" | "releases.0.2.33" | "releases.0.2.34" | "releases.0.2.35" | "releases.0.2.36" | "releases.0.2.37" | "releases.0.2.38" | "releases.0.2.39" | "releases.0.2.40" | "releases.0.2.41" | "releases.0.2.42" | "releases.0.2.43" | "releases.0.2.44" | "releases.0.2.45" | "releases.0.2.46" | "releases.0.2.47" | "releases.0.2.48" | "releases.0.2.49" | "releases.0.2.50" | "releases.0.2.51" | "releases.0.2.52" | "releases.0.2.53" | "releases.0.2.54" | "releases.0.2.55" | "releases.0.2.56" | "releases.0.2.57" | "releases.0.2.58" | "releases.0.2.59" | "releases.0.2.60" | "releases.0.2.61" | "releases.0.2.62" | "releases.0.2.63" | "releases.0.2.64" | "releases.0.2.65" | "releases.0.2.66" | "releases.0.2.67" | "releases.0.2.68" | "releases.0.2.69" | "releases.0.2.70" | "releases.0.2.71" | "releases.0.2.72" | "releases.0.2.73" | "releases.0.2.74" | "releases.0.2.75" | "releases.0.2.76" | "releases.0.2.77" | "releases.0.2.78" | "releases.0.2.79" | "releases.0.3.0" | "releases.0.3.1" | "releases.0.3.2" | "releases.0.3.3" | "releases.0.3.4" | "releases.0.3.5" | "releases.0.3.6" | "releases.0.4.0" | "releases.0.5.0" | "releases.0.5.1" | "releases.0.5.10" | "releases.0.5.11" | "releases.0.5.12" | "releases.0.5.13" | "releases.0.6.0" | "releases.0.7.0" | "releases.0.8.0" | "releases.0.8.1" | "releases.0.8.2" | "releases.0.8.3" | "releases.0.8.4" | "releases.0.8.5" | "releases.0.8.6" | "releases.0.8.7" | "roadmap" | "search" | "security" | "showcase" | "support" | "tutorial"; type ApiRoute = never; type RealtimeRoute = never; type EnvironmentKey = never; diff --git a/public/docs-index.json b/public/docs-index.json index 011539ae..256eb2b7 100644 --- a/public/docs-index.json +++ b/public/docs-index.json @@ -220,6 +220,13 @@ "version": "0.8.7", "stability": "preview" }, + { + "url": "/guides/full-stack-auth-demo", + "title": "full stack auth demo", + "section": "guide", + "version": "0.8.7", + "stability": "preview" + }, { "url": "/examples", "title": "examples", diff --git a/public/llms-full.txt b/public/llms-full.txt index 0e155920..7e047fc4 100644 --- a/public/llms-full.txt +++ b/public/llms-full.txt @@ -480,6 +480,639 @@ bunx wrnexus update . --latest The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. +# Complete CLI command reference + +This section is generated from the installed `@wrnexus/cli@0.8.7` executable. It is the canonical command inventory for this release. + +```text +wrnexus — WrNexus CLI + +Usage: + wrnexus dev [app-dir] [--port=3000] [--host=::] + Start the development server (live reload) + wrnexus dev [app-dir] --services Start local production-service simulators with the app + wrnexus dev [app-dir] --production-runtime + wrnexus dev [app-dir] --services [--services-port=3099] [--services-http] + Rebuild and reload the exact production artifact + wrnexus build [app-dir] Build a production server bundle + assets + wrnexus preview [app-dir] Serve the existing exact production output + wrnexus create Scaffold a new app + wrnexus workspace Scaffold a monorepo (apps/* + shared packages/*) + wrnexus workspace add [--domain=name.localhost] + Add an app to the current workspace + wrnexus gateway [--port=3000] Serve every workspace app behind one port, routed by domain + wrnexus production [workspace-dir] Build, migrate, and serve the complete production workspace + wrnexus [workspace-dir] Run a configured workspace environment (development/staging/custom) + wrnexus generate Scaffold a page | component | api | schema + wrnexus generate routes | docker | mobile + Generate routes or scaffold deployment targets + wrnexus generate types [app-dir] Generate application-wide route/component/key types + wrnexus routes [app-dir] Generate typed named routes + wrnexus typecheck [app-dir] Generate types and check TypeScript plus every .wrn file + wrnexus mobile add Install Capacitor or Expo native packages + wrnexus mobile compile Compile .wrn pages into native Expo routes + wrnexus native list List cross-platform native capabilities + wrnexus native add Install capability packages for the configured mobile mode + wrnexus eject Copy a Wire UI component into app/components + wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app + wrnexus db Migrations: migrate | rollback | status | seed | generate | new + wrnexus authz Authorization: list | generate | init [--dialect=sqlite|postgres|mysql] + wrnexus test [level] [app-dir] [--watch] + Run unit | component | api | browser | visual | accessibility | performance + wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files + wrnexus doctor [app-dir] [--fix] Check project health; optionally apply safe repairs + wrnexus compatibility [app-dir] + Inspect or explicitly upgrade behavior defaults + wrnexus contracts [app-dir] + Detect breaking boundary contract changes + wrnexus security [app-dir] + Audit ASVS controls, inspect headers, or run abuse tests + wrnexus api [app-dir] Generate OpenAPI, docs, Postman, examples and SDKs + wrnexus sdk generate [app-dir] + Generate TypeScript, JavaScript, Java, Go, or Python SDK + wrnexus deploy [app-dir] Generate docker | kubernetes | systemd | railway | render | fly + wrnexus mcp [app-dir] Start the WRNexus MCP server over stdio + wrnexus i18n [app-dir] + Extract and audit translation keys + wrnexus report [app-dir] [--file=app/pages/page.wrn] + Create a sanitized reproduction bundle + wrnexus playground [--port=4173] Start the shareable WRN compiler playground + wrnexus config [app-dir] --explain Print the fully resolved profile configuration + wrnexus analyze [app-dir] Inspect dist/build-report.json and performance budgets + wrnexus explain [subject] [app-dir] + Explain compiler and production build decisions + wrnexus explain [app-dir] + Explain route caching or permission enforcement + wrnexus inspect [app-dir] Inspect packages | plugins | routes | assets | runtimes | styles | migrations | bundle + wrnexus inspect component [app-dir] + Inspect a component's typed public contract + wrnexus generate system Scaffold a complete framework-native package + +Profiles: pass --profile= to dev/build/db (or set WRNEXUS_PROFILE) to load +that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat + +Workspace environments: configure protocol, rootDomain, port, hostname, runtime +(development|production), hmr, build, migrate, and profile in wrnexus.workspace.ts. +CLI overrides: --port, --host, --build/--no-build, --migrate/--no-migrate, +--profile, and --prepare-only. + +Update options: --dry-run previews changes; --no-verify skips post-update check/build. +``` + +## CLI workflows with expected output + +Commands below are copy-ready. Paths, ports, counts, and timings vary by project; the shown output identifies the success condition to check. + +### Create, check, build, and preview an application + +```bash +bunx @wrnexus/cli@0.8.7 create my-app +cd my-app +bun install +bunx wrnexus typecheck . +bunx wrnexus build . +bunx wrnexus preview . --port=3000 +``` + +Expected output: + +```text +✓ Application types are valid +✓ Runtime: .../dist/reactive.js +✓ Styles: .../dist/styles.css +✓ Server: .../dist/server.js +Run it: bun .../dist/server.js +``` + +### Generate framework files and committed application types + +```bash +bunx wrnexus generate page Dashboard +bunx wrnexus generate component status-card +bunx wrnexus generate api health +bunx wrnexus generate schema account +bunx wrnexus generate routes +bunx wrnexus generate types . +``` + +Expected output includes created source paths followed by: + +```text +✓ Generated app/routes.gen.ts (... routes) +✓ Generated .../app/types/wrnexus.generated.d.ts (... routes, ... components) +``` + +### Run development and production-runtime modes + +```bash +bunx wrnexus dev . --port=3000 +bunx wrnexus dev . --services --services-port=3099 +bunx wrnexus dev . --production-runtime --port=3000 +``` + +Expected output reports the active profile, discovered plugins/routes, generated cache path, and listening URL. Production-runtime mode rebuilds and reloads the exact production artifact. + +### Database lifecycle + +```bash +bunx wrnexus db status +bunx wrnexus db new create_accounts --from-models +bunx wrnexus db migrate +bunx wrnexus db generate +bunx wrnexus db seed +``` + +Expected output identifies the selected profile/dialect, migration state, applied migration names, and generated typed query files. Run `db rollback` only when intentionally reverting the latest migration. + +### Diagnose, inspect, and enforce contracts + +```bash +bunx wrnexus doctor . +bunx wrnexus typecheck . +bunx wrnexus compatibility check . +bunx wrnexus contracts check . +bunx wrnexus security audit . +bunx wrnexus inspect packages . +bunx wrnexus inspect routes . +bunx wrnexus inspect component Navbar . +bunx wrnexus analyze . +``` + +Successful checks exit with status 0. Inspect commands print the resolved package, route, component, asset, runtime, style, migration, or bundle contract without changing the application. + +### Tests, API artifacts, SDKs, and deployment manifests + +```bash +bunx wrnexus test unit . +bunx wrnexus test component . +bunx wrnexus test api . +bunx wrnexus test browser . +bunx wrnexus api generate . +bunx wrnexus api docs . +bunx wrnexus sdk generate typescript . +bunx wrnexus deploy docker . +``` + +Test commands return the underlying suite summary and a nonzero status on failure. API/SDK/deploy commands report each generated artifact; review and commit generated files after validation. + +### Workspaces and environments + +```bash +bunx wrnexus workspace company-platform +cd company-platform +bunx wrnexus workspace add reports --domain=reports.localhost +bunx wrnexus gateway --port=3000 +bunx wrnexus production . --prepare-only +bunx wrnexus staging . +``` + +Expected output lists created apps, domain mappings, selected environment/profile, build and migration decisions, and the gateway address. + +### Internationalization, native targets, MCP, and support bundles + +```bash +bunx wrnexus i18n extract . +bunx wrnexus i18n validate . +bunx wrnexus generate mobile +bunx wrnexus mobile compile +bunx wrnexus native list +bunx wrnexus mcp . +bunx wrnexus report . --file=app/pages/index.wrn +``` + +Expected output identifies extracted/validated translation keys, generated native routes, available capabilities, MCP stdio startup, or the sanitized reproduction archive. MCP uses stdio, so protocol messages—not a web URL—are its normal runtime output. + +### Safe upgrades + +```bash +bunx wrnexus update . --latest --dry-run +bunx wrnexus update . --latest +``` + +The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. + +# Complete CLI command reference + +This section is generated from the installed `@wrnexus/cli@0.8.7` executable. It is the canonical command inventory for this release. + +```text +wrnexus — WrNexus CLI + +Usage: + wrnexus dev [app-dir] [--port=3000] [--host=::] + Start the development server (live reload) + wrnexus dev [app-dir] --services Start local production-service simulators with the app + wrnexus dev [app-dir] --production-runtime + wrnexus dev [app-dir] --services [--services-port=3099] [--services-http] + Rebuild and reload the exact production artifact + wrnexus build [app-dir] Build a production server bundle + assets + wrnexus preview [app-dir] Serve the existing exact production output + wrnexus create Scaffold a new app + wrnexus workspace Scaffold a monorepo (apps/* + shared packages/*) + wrnexus workspace add [--domain=name.localhost] + Add an app to the current workspace + wrnexus gateway [--port=3000] Serve every workspace app behind one port, routed by domain + wrnexus production [workspace-dir] Build, migrate, and serve the complete production workspace + wrnexus [workspace-dir] Run a configured workspace environment (development/staging/custom) + wrnexus generate Scaffold a page | component | api | schema + wrnexus generate routes | docker | mobile + Generate routes or scaffold deployment targets + wrnexus generate types [app-dir] Generate application-wide route/component/key types + wrnexus routes [app-dir] Generate typed named routes + wrnexus typecheck [app-dir] Generate types and check TypeScript plus every .wrn file + wrnexus mobile add Install Capacitor or Expo native packages + wrnexus mobile compile Compile .wrn pages into native Expo routes + wrnexus native list List cross-platform native capabilities + wrnexus native add Install capability packages for the configured mobile mode + wrnexus eject Copy a Wire UI component into app/components + wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app + wrnexus db Migrations: migrate | rollback | status | seed | generate | new + wrnexus authz Authorization: list | generate | init [--dialect=sqlite|postgres|mysql] + wrnexus test [level] [app-dir] [--watch] + Run unit | component | api | browser | visual | accessibility | performance + wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files + wrnexus doctor [app-dir] [--fix] Check project health; optionally apply safe repairs + wrnexus compatibility [app-dir] + Inspect or explicitly upgrade behavior defaults + wrnexus contracts [app-dir] + Detect breaking boundary contract changes + wrnexus security [app-dir] + Audit ASVS controls, inspect headers, or run abuse tests + wrnexus api [app-dir] Generate OpenAPI, docs, Postman, examples and SDKs + wrnexus sdk generate [app-dir] + Generate TypeScript, JavaScript, Java, Go, or Python SDK + wrnexus deploy [app-dir] Generate docker | kubernetes | systemd | railway | render | fly + wrnexus mcp [app-dir] Start the WRNexus MCP server over stdio + wrnexus i18n [app-dir] + Extract and audit translation keys + wrnexus report [app-dir] [--file=app/pages/page.wrn] + Create a sanitized reproduction bundle + wrnexus playground [--port=4173] Start the shareable WRN compiler playground + wrnexus config [app-dir] --explain Print the fully resolved profile configuration + wrnexus analyze [app-dir] Inspect dist/build-report.json and performance budgets + wrnexus explain [subject] [app-dir] + Explain compiler and production build decisions + wrnexus explain [app-dir] + Explain route caching or permission enforcement + wrnexus inspect [app-dir] Inspect packages | plugins | routes | assets | runtimes | styles | migrations | bundle + wrnexus inspect component [app-dir] + Inspect a component's typed public contract + wrnexus generate system Scaffold a complete framework-native package + +Profiles: pass --profile= to dev/build/db (or set WRNEXUS_PROFILE) to load +that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat + +Workspace environments: configure protocol, rootDomain, port, hostname, runtime +(development|production), hmr, build, migrate, and profile in wrnexus.workspace.ts. +CLI overrides: --port, --host, --build/--no-build, --migrate/--no-migrate, +--profile, and --prepare-only. + +Update options: --dry-run previews changes; --no-verify skips post-update check/build. +``` + +## CLI workflows with expected output + +Commands below are copy-ready. Paths, ports, counts, and timings vary by project; the shown output identifies the success condition to check. + +### Create, check, build, and preview an application + +```bash +bunx @wrnexus/cli@0.8.7 create my-app +cd my-app +bun install +bunx wrnexus typecheck . +bunx wrnexus build . +bunx wrnexus preview . --port=3000 +``` + +Expected output: + +```text +✓ Application types are valid +✓ Runtime: .../dist/reactive.js +✓ Styles: .../dist/styles.css +✓ Server: .../dist/server.js +Run it: bun .../dist/server.js +``` + +### Generate framework files and committed application types + +```bash +bunx wrnexus generate page Dashboard +bunx wrnexus generate component status-card +bunx wrnexus generate api health +bunx wrnexus generate schema account +bunx wrnexus generate routes +bunx wrnexus generate types . +``` + +Expected output includes created source paths followed by: + +```text +✓ Generated app/routes.gen.ts (... routes) +✓ Generated .../app/types/wrnexus.generated.d.ts (... routes, ... components) +``` + +### Run development and production-runtime modes + +```bash +bunx wrnexus dev . --port=3000 +bunx wrnexus dev . --services --services-port=3099 +bunx wrnexus dev . --production-runtime --port=3000 +``` + +Expected output reports the active profile, discovered plugins/routes, generated cache path, and listening URL. Production-runtime mode rebuilds and reloads the exact production artifact. + +### Database lifecycle + +```bash +bunx wrnexus db status +bunx wrnexus db new create_accounts --from-models +bunx wrnexus db migrate +bunx wrnexus db generate +bunx wrnexus db seed +``` + +Expected output identifies the selected profile/dialect, migration state, applied migration names, and generated typed query files. Run `db rollback` only when intentionally reverting the latest migration. + +### Diagnose, inspect, and enforce contracts + +```bash +bunx wrnexus doctor . +bunx wrnexus typecheck . +bunx wrnexus compatibility check . +bunx wrnexus contracts check . +bunx wrnexus security audit . +bunx wrnexus inspect packages . +bunx wrnexus inspect routes . +bunx wrnexus inspect component Navbar . +bunx wrnexus analyze . +``` + +Successful checks exit with status 0. Inspect commands print the resolved package, route, component, asset, runtime, style, migration, or bundle contract without changing the application. + +### Tests, API artifacts, SDKs, and deployment manifests + +```bash +bunx wrnexus test unit . +bunx wrnexus test component . +bunx wrnexus test api . +bunx wrnexus test browser . +bunx wrnexus api generate . +bunx wrnexus api docs . +bunx wrnexus sdk generate typescript . +bunx wrnexus deploy docker . +``` + +Test commands return the underlying suite summary and a nonzero status on failure. API/SDK/deploy commands report each generated artifact; review and commit generated files after validation. + +### Workspaces and environments + +```bash +bunx wrnexus workspace company-platform +cd company-platform +bunx wrnexus workspace add reports --domain=reports.localhost +bunx wrnexus gateway --port=3000 +bunx wrnexus production . --prepare-only +bunx wrnexus staging . +``` + +Expected output lists created apps, domain mappings, selected environment/profile, build and migration decisions, and the gateway address. + +### Internationalization, native targets, MCP, and support bundles + +```bash +bunx wrnexus i18n extract . +bunx wrnexus i18n validate . +bunx wrnexus generate mobile +bunx wrnexus mobile compile +bunx wrnexus native list +bunx wrnexus mcp . +bunx wrnexus report . --file=app/pages/index.wrn +``` + +Expected output identifies extracted/validated translation keys, generated native routes, available capabilities, MCP stdio startup, or the sanitized reproduction archive. MCP uses stdio, so protocol messages—not a web URL—are its normal runtime output. + +### Safe upgrades + +```bash +bunx wrnexus update . --latest --dry-run +bunx wrnexus update . --latest +``` + +The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. + +# Complete CLI command reference + +This section is generated from the installed `@wrnexus/cli@0.8.7` executable. It is the canonical command inventory for this release. + +```text +wrnexus — WrNexus CLI + +Usage: + wrnexus dev [app-dir] [--port=3000] [--host=::] + Start the development server (live reload) + wrnexus dev [app-dir] --services Start local production-service simulators with the app + wrnexus dev [app-dir] --production-runtime + wrnexus dev [app-dir] --services [--services-port=3099] [--services-http] + Rebuild and reload the exact production artifact + wrnexus build [app-dir] Build a production server bundle + assets + wrnexus preview [app-dir] Serve the existing exact production output + wrnexus create Scaffold a new app + wrnexus workspace Scaffold a monorepo (apps/* + shared packages/*) + wrnexus workspace add [--domain=name.localhost] + Add an app to the current workspace + wrnexus gateway [--port=3000] Serve every workspace app behind one port, routed by domain + wrnexus production [workspace-dir] Build, migrate, and serve the complete production workspace + wrnexus [workspace-dir] Run a configured workspace environment (development/staging/custom) + wrnexus generate Scaffold a page | component | api | schema + wrnexus generate routes | docker | mobile + Generate routes or scaffold deployment targets + wrnexus generate types [app-dir] Generate application-wide route/component/key types + wrnexus routes [app-dir] Generate typed named routes + wrnexus typecheck [app-dir] Generate types and check TypeScript plus every .wrn file + wrnexus mobile add Install Capacitor or Expo native packages + wrnexus mobile compile Compile .wrn pages into native Expo routes + wrnexus native list List cross-platform native capabilities + wrnexus native add Install capability packages for the configured mobile mode + wrnexus eject Copy a Wire UI component into app/components + wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app + wrnexus db Migrations: migrate | rollback | status | seed | generate | new + wrnexus authz Authorization: list | generate | init [--dialect=sqlite|postgres|mysql] + wrnexus test [level] [app-dir] [--watch] + Run unit | component | api | browser | visual | accessibility | performance + wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files + wrnexus doctor [app-dir] [--fix] Check project health; optionally apply safe repairs + wrnexus compatibility [app-dir] + Inspect or explicitly upgrade behavior defaults + wrnexus contracts [app-dir] + Detect breaking boundary contract changes + wrnexus security [app-dir] + Audit ASVS controls, inspect headers, or run abuse tests + wrnexus api [app-dir] Generate OpenAPI, docs, Postman, examples and SDKs + wrnexus sdk generate [app-dir] + Generate TypeScript, JavaScript, Java, Go, or Python SDK + wrnexus deploy [app-dir] Generate docker | kubernetes | systemd | railway | render | fly + wrnexus mcp [app-dir] Start the WRNexus MCP server over stdio + wrnexus i18n [app-dir] + Extract and audit translation keys + wrnexus report [app-dir] [--file=app/pages/page.wrn] + Create a sanitized reproduction bundle + wrnexus playground [--port=4173] Start the shareable WRN compiler playground + wrnexus config [app-dir] --explain Print the fully resolved profile configuration + wrnexus analyze [app-dir] Inspect dist/build-report.json and performance budgets + wrnexus explain [subject] [app-dir] + Explain compiler and production build decisions + wrnexus explain [app-dir] + Explain route caching or permission enforcement + wrnexus inspect [app-dir] Inspect packages | plugins | routes | assets | runtimes | styles | migrations | bundle + wrnexus inspect component [app-dir] + Inspect a component's typed public contract + wrnexus generate system Scaffold a complete framework-native package + +Profiles: pass --profile= to dev/build/db (or set WRNEXUS_PROFILE) to load +that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat + +Workspace environments: configure protocol, rootDomain, port, hostname, runtime +(development|production), hmr, build, migrate, and profile in wrnexus.workspace.ts. +CLI overrides: --port, --host, --build/--no-build, --migrate/--no-migrate, +--profile, and --prepare-only. + +Update options: --dry-run previews changes; --no-verify skips post-update check/build. +``` + +## CLI workflows with expected output + +Commands below are copy-ready. Paths, ports, counts, and timings vary by project; the shown output identifies the success condition to check. + +### Create, check, build, and preview an application + +```bash +bunx @wrnexus/cli@0.8.7 create my-app +cd my-app +bun install +bunx wrnexus typecheck . +bunx wrnexus build . +bunx wrnexus preview . --port=3000 +``` + +Expected output: + +```text +✓ Application types are valid +✓ Runtime: .../dist/reactive.js +✓ Styles: .../dist/styles.css +✓ Server: .../dist/server.js +Run it: bun .../dist/server.js +``` + +### Generate framework files and committed application types + +```bash +bunx wrnexus generate page Dashboard +bunx wrnexus generate component status-card +bunx wrnexus generate api health +bunx wrnexus generate schema account +bunx wrnexus generate routes +bunx wrnexus generate types . +``` + +Expected output includes created source paths followed by: + +```text +✓ Generated app/routes.gen.ts (... routes) +✓ Generated .../app/types/wrnexus.generated.d.ts (... routes, ... components) +``` + +### Run development and production-runtime modes + +```bash +bunx wrnexus dev . --port=3000 +bunx wrnexus dev . --services --services-port=3099 +bunx wrnexus dev . --production-runtime --port=3000 +``` + +Expected output reports the active profile, discovered plugins/routes, generated cache path, and listening URL. Production-runtime mode rebuilds and reloads the exact production artifact. + +### Database lifecycle + +```bash +bunx wrnexus db status +bunx wrnexus db new create_accounts --from-models +bunx wrnexus db migrate +bunx wrnexus db generate +bunx wrnexus db seed +``` + +Expected output identifies the selected profile/dialect, migration state, applied migration names, and generated typed query files. Run `db rollback` only when intentionally reverting the latest migration. + +### Diagnose, inspect, and enforce contracts + +```bash +bunx wrnexus doctor . +bunx wrnexus typecheck . +bunx wrnexus compatibility check . +bunx wrnexus contracts check . +bunx wrnexus security audit . +bunx wrnexus inspect packages . +bunx wrnexus inspect routes . +bunx wrnexus inspect component Navbar . +bunx wrnexus analyze . +``` + +Successful checks exit with status 0. Inspect commands print the resolved package, route, component, asset, runtime, style, migration, or bundle contract without changing the application. + +### Tests, API artifacts, SDKs, and deployment manifests + +```bash +bunx wrnexus test unit . +bunx wrnexus test component . +bunx wrnexus test api . +bunx wrnexus test browser . +bunx wrnexus api generate . +bunx wrnexus api docs . +bunx wrnexus sdk generate typescript . +bunx wrnexus deploy docker . +``` + +Test commands return the underlying suite summary and a nonzero status on failure. API/SDK/deploy commands report each generated artifact; review and commit generated files after validation. + +### Workspaces and environments + +```bash +bunx wrnexus workspace company-platform +cd company-platform +bunx wrnexus workspace add reports --domain=reports.localhost +bunx wrnexus gateway --port=3000 +bunx wrnexus production . --prepare-only +bunx wrnexus staging . +``` + +Expected output lists created apps, domain mappings, selected environment/profile, build and migration decisions, and the gateway address. + +### Internationalization, native targets, MCP, and support bundles + +```bash +bunx wrnexus i18n extract . +bunx wrnexus i18n validate . +bunx wrnexus generate mobile +bunx wrnexus mobile compile +bunx wrnexus native list +bunx wrnexus mcp . +bunx wrnexus report . --file=app/pages/index.wrn +``` + +Expected output identifies extracted/validated translation keys, generated native routes, available capabilities, MCP stdio startup, or the sanitized reproduction archive. MCP uses stdio, so protocol messages—not a web URL—are its normal runtime output. + +### Safe upgrades + +```bash +bunx wrnexus update . --latest --dry-run +bunx wrnexus update . --latest +``` + +The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. + Release: WRNexusJS 0.8.7 # Complete CLI command reference diff --git a/public/llms.txt b/public/llms.txt index 7a416535..57bde53f 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -691,6 +691,639 @@ bunx wrnexus update . --latest The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. +# Complete CLI command reference + +This section is generated from the installed `@wrnexus/cli@0.8.7` executable. It is the canonical command inventory for this release. + +```text +wrnexus — WrNexus CLI + +Usage: + wrnexus dev [app-dir] [--port=3000] [--host=::] + Start the development server (live reload) + wrnexus dev [app-dir] --services Start local production-service simulators with the app + wrnexus dev [app-dir] --production-runtime + wrnexus dev [app-dir] --services [--services-port=3099] [--services-http] + Rebuild and reload the exact production artifact + wrnexus build [app-dir] Build a production server bundle + assets + wrnexus preview [app-dir] Serve the existing exact production output + wrnexus create Scaffold a new app + wrnexus workspace Scaffold a monorepo (apps/* + shared packages/*) + wrnexus workspace add [--domain=name.localhost] + Add an app to the current workspace + wrnexus gateway [--port=3000] Serve every workspace app behind one port, routed by domain + wrnexus production [workspace-dir] Build, migrate, and serve the complete production workspace + wrnexus [workspace-dir] Run a configured workspace environment (development/staging/custom) + wrnexus generate Scaffold a page | component | api | schema + wrnexus generate routes | docker | mobile + Generate routes or scaffold deployment targets + wrnexus generate types [app-dir] Generate application-wide route/component/key types + wrnexus routes [app-dir] Generate typed named routes + wrnexus typecheck [app-dir] Generate types and check TypeScript plus every .wrn file + wrnexus mobile add Install Capacitor or Expo native packages + wrnexus mobile compile Compile .wrn pages into native Expo routes + wrnexus native list List cross-platform native capabilities + wrnexus native add Install capability packages for the configured mobile mode + wrnexus eject Copy a Wire UI component into app/components + wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app + wrnexus db Migrations: migrate | rollback | status | seed | generate | new + wrnexus authz Authorization: list | generate | init [--dialect=sqlite|postgres|mysql] + wrnexus test [level] [app-dir] [--watch] + Run unit | component | api | browser | visual | accessibility | performance + wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files + wrnexus doctor [app-dir] [--fix] Check project health; optionally apply safe repairs + wrnexus compatibility [app-dir] + Inspect or explicitly upgrade behavior defaults + wrnexus contracts [app-dir] + Detect breaking boundary contract changes + wrnexus security [app-dir] + Audit ASVS controls, inspect headers, or run abuse tests + wrnexus api [app-dir] Generate OpenAPI, docs, Postman, examples and SDKs + wrnexus sdk generate [app-dir] + Generate TypeScript, JavaScript, Java, Go, or Python SDK + wrnexus deploy [app-dir] Generate docker | kubernetes | systemd | railway | render | fly + wrnexus mcp [app-dir] Start the WRNexus MCP server over stdio + wrnexus i18n [app-dir] + Extract and audit translation keys + wrnexus report [app-dir] [--file=app/pages/page.wrn] + Create a sanitized reproduction bundle + wrnexus playground [--port=4173] Start the shareable WRN compiler playground + wrnexus config [app-dir] --explain Print the fully resolved profile configuration + wrnexus analyze [app-dir] Inspect dist/build-report.json and performance budgets + wrnexus explain [subject] [app-dir] + Explain compiler and production build decisions + wrnexus explain [app-dir] + Explain route caching or permission enforcement + wrnexus inspect [app-dir] Inspect packages | plugins | routes | assets | runtimes | styles | migrations | bundle + wrnexus inspect component [app-dir] + Inspect a component's typed public contract + wrnexus generate system Scaffold a complete framework-native package + +Profiles: pass --profile= to dev/build/db (or set WRNEXUS_PROFILE) to load +that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat + +Workspace environments: configure protocol, rootDomain, port, hostname, runtime +(development|production), hmr, build, migrate, and profile in wrnexus.workspace.ts. +CLI overrides: --port, --host, --build/--no-build, --migrate/--no-migrate, +--profile, and --prepare-only. + +Update options: --dry-run previews changes; --no-verify skips post-update check/build. +``` + +## CLI workflows with expected output + +Commands below are copy-ready. Paths, ports, counts, and timings vary by project; the shown output identifies the success condition to check. + +### Create, check, build, and preview an application + +```bash +bunx @wrnexus/cli@0.8.7 create my-app +cd my-app +bun install +bunx wrnexus typecheck . +bunx wrnexus build . +bunx wrnexus preview . --port=3000 +``` + +Expected output: + +```text +✓ Application types are valid +✓ Runtime: .../dist/reactive.js +✓ Styles: .../dist/styles.css +✓ Server: .../dist/server.js +Run it: bun .../dist/server.js +``` + +### Generate framework files and committed application types + +```bash +bunx wrnexus generate page Dashboard +bunx wrnexus generate component status-card +bunx wrnexus generate api health +bunx wrnexus generate schema account +bunx wrnexus generate routes +bunx wrnexus generate types . +``` + +Expected output includes created source paths followed by: + +```text +✓ Generated app/routes.gen.ts (... routes) +✓ Generated .../app/types/wrnexus.generated.d.ts (... routes, ... components) +``` + +### Run development and production-runtime modes + +```bash +bunx wrnexus dev . --port=3000 +bunx wrnexus dev . --services --services-port=3099 +bunx wrnexus dev . --production-runtime --port=3000 +``` + +Expected output reports the active profile, discovered plugins/routes, generated cache path, and listening URL. Production-runtime mode rebuilds and reloads the exact production artifact. + +### Database lifecycle + +```bash +bunx wrnexus db status +bunx wrnexus db new create_accounts --from-models +bunx wrnexus db migrate +bunx wrnexus db generate +bunx wrnexus db seed +``` + +Expected output identifies the selected profile/dialect, migration state, applied migration names, and generated typed query files. Run `db rollback` only when intentionally reverting the latest migration. + +### Diagnose, inspect, and enforce contracts + +```bash +bunx wrnexus doctor . +bunx wrnexus typecheck . +bunx wrnexus compatibility check . +bunx wrnexus contracts check . +bunx wrnexus security audit . +bunx wrnexus inspect packages . +bunx wrnexus inspect routes . +bunx wrnexus inspect component Navbar . +bunx wrnexus analyze . +``` + +Successful checks exit with status 0. Inspect commands print the resolved package, route, component, asset, runtime, style, migration, or bundle contract without changing the application. + +### Tests, API artifacts, SDKs, and deployment manifests + +```bash +bunx wrnexus test unit . +bunx wrnexus test component . +bunx wrnexus test api . +bunx wrnexus test browser . +bunx wrnexus api generate . +bunx wrnexus api docs . +bunx wrnexus sdk generate typescript . +bunx wrnexus deploy docker . +``` + +Test commands return the underlying suite summary and a nonzero status on failure. API/SDK/deploy commands report each generated artifact; review and commit generated files after validation. + +### Workspaces and environments + +```bash +bunx wrnexus workspace company-platform +cd company-platform +bunx wrnexus workspace add reports --domain=reports.localhost +bunx wrnexus gateway --port=3000 +bunx wrnexus production . --prepare-only +bunx wrnexus staging . +``` + +Expected output lists created apps, domain mappings, selected environment/profile, build and migration decisions, and the gateway address. + +### Internationalization, native targets, MCP, and support bundles + +```bash +bunx wrnexus i18n extract . +bunx wrnexus i18n validate . +bunx wrnexus generate mobile +bunx wrnexus mobile compile +bunx wrnexus native list +bunx wrnexus mcp . +bunx wrnexus report . --file=app/pages/index.wrn +``` + +Expected output identifies extracted/validated translation keys, generated native routes, available capabilities, MCP stdio startup, or the sanitized reproduction archive. MCP uses stdio, so protocol messages—not a web URL—are its normal runtime output. + +### Safe upgrades + +```bash +bunx wrnexus update . --latest --dry-run +bunx wrnexus update . --latest +``` + +The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. + +# Complete CLI command reference + +This section is generated from the installed `@wrnexus/cli@0.8.7` executable. It is the canonical command inventory for this release. + +```text +wrnexus — WrNexus CLI + +Usage: + wrnexus dev [app-dir] [--port=3000] [--host=::] + Start the development server (live reload) + wrnexus dev [app-dir] --services Start local production-service simulators with the app + wrnexus dev [app-dir] --production-runtime + wrnexus dev [app-dir] --services [--services-port=3099] [--services-http] + Rebuild and reload the exact production artifact + wrnexus build [app-dir] Build a production server bundle + assets + wrnexus preview [app-dir] Serve the existing exact production output + wrnexus create Scaffold a new app + wrnexus workspace Scaffold a monorepo (apps/* + shared packages/*) + wrnexus workspace add [--domain=name.localhost] + Add an app to the current workspace + wrnexus gateway [--port=3000] Serve every workspace app behind one port, routed by domain + wrnexus production [workspace-dir] Build, migrate, and serve the complete production workspace + wrnexus [workspace-dir] Run a configured workspace environment (development/staging/custom) + wrnexus generate Scaffold a page | component | api | schema + wrnexus generate routes | docker | mobile + Generate routes or scaffold deployment targets + wrnexus generate types [app-dir] Generate application-wide route/component/key types + wrnexus routes [app-dir] Generate typed named routes + wrnexus typecheck [app-dir] Generate types and check TypeScript plus every .wrn file + wrnexus mobile add Install Capacitor or Expo native packages + wrnexus mobile compile Compile .wrn pages into native Expo routes + wrnexus native list List cross-platform native capabilities + wrnexus native add Install capability packages for the configured mobile mode + wrnexus eject Copy a Wire UI component into app/components + wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app + wrnexus db Migrations: migrate | rollback | status | seed | generate | new + wrnexus authz Authorization: list | generate | init [--dialect=sqlite|postgres|mysql] + wrnexus test [level] [app-dir] [--watch] + Run unit | component | api | browser | visual | accessibility | performance + wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files + wrnexus doctor [app-dir] [--fix] Check project health; optionally apply safe repairs + wrnexus compatibility [app-dir] + Inspect or explicitly upgrade behavior defaults + wrnexus contracts [app-dir] + Detect breaking boundary contract changes + wrnexus security [app-dir] + Audit ASVS controls, inspect headers, or run abuse tests + wrnexus api [app-dir] Generate OpenAPI, docs, Postman, examples and SDKs + wrnexus sdk generate [app-dir] + Generate TypeScript, JavaScript, Java, Go, or Python SDK + wrnexus deploy [app-dir] Generate docker | kubernetes | systemd | railway | render | fly + wrnexus mcp [app-dir] Start the WRNexus MCP server over stdio + wrnexus i18n [app-dir] + Extract and audit translation keys + wrnexus report [app-dir] [--file=app/pages/page.wrn] + Create a sanitized reproduction bundle + wrnexus playground [--port=4173] Start the shareable WRN compiler playground + wrnexus config [app-dir] --explain Print the fully resolved profile configuration + wrnexus analyze [app-dir] Inspect dist/build-report.json and performance budgets + wrnexus explain [subject] [app-dir] + Explain compiler and production build decisions + wrnexus explain [app-dir] + Explain route caching or permission enforcement + wrnexus inspect [app-dir] Inspect packages | plugins | routes | assets | runtimes | styles | migrations | bundle + wrnexus inspect component [app-dir] + Inspect a component's typed public contract + wrnexus generate system Scaffold a complete framework-native package + +Profiles: pass --profile= to dev/build/db (or set WRNEXUS_PROFILE) to load +that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat + +Workspace environments: configure protocol, rootDomain, port, hostname, runtime +(development|production), hmr, build, migrate, and profile in wrnexus.workspace.ts. +CLI overrides: --port, --host, --build/--no-build, --migrate/--no-migrate, +--profile, and --prepare-only. + +Update options: --dry-run previews changes; --no-verify skips post-update check/build. +``` + +## CLI workflows with expected output + +Commands below are copy-ready. Paths, ports, counts, and timings vary by project; the shown output identifies the success condition to check. + +### Create, check, build, and preview an application + +```bash +bunx @wrnexus/cli@0.8.7 create my-app +cd my-app +bun install +bunx wrnexus typecheck . +bunx wrnexus build . +bunx wrnexus preview . --port=3000 +``` + +Expected output: + +```text +✓ Application types are valid +✓ Runtime: .../dist/reactive.js +✓ Styles: .../dist/styles.css +✓ Server: .../dist/server.js +Run it: bun .../dist/server.js +``` + +### Generate framework files and committed application types + +```bash +bunx wrnexus generate page Dashboard +bunx wrnexus generate component status-card +bunx wrnexus generate api health +bunx wrnexus generate schema account +bunx wrnexus generate routes +bunx wrnexus generate types . +``` + +Expected output includes created source paths followed by: + +```text +✓ Generated app/routes.gen.ts (... routes) +✓ Generated .../app/types/wrnexus.generated.d.ts (... routes, ... components) +``` + +### Run development and production-runtime modes + +```bash +bunx wrnexus dev . --port=3000 +bunx wrnexus dev . --services --services-port=3099 +bunx wrnexus dev . --production-runtime --port=3000 +``` + +Expected output reports the active profile, discovered plugins/routes, generated cache path, and listening URL. Production-runtime mode rebuilds and reloads the exact production artifact. + +### Database lifecycle + +```bash +bunx wrnexus db status +bunx wrnexus db new create_accounts --from-models +bunx wrnexus db migrate +bunx wrnexus db generate +bunx wrnexus db seed +``` + +Expected output identifies the selected profile/dialect, migration state, applied migration names, and generated typed query files. Run `db rollback` only when intentionally reverting the latest migration. + +### Diagnose, inspect, and enforce contracts + +```bash +bunx wrnexus doctor . +bunx wrnexus typecheck . +bunx wrnexus compatibility check . +bunx wrnexus contracts check . +bunx wrnexus security audit . +bunx wrnexus inspect packages . +bunx wrnexus inspect routes . +bunx wrnexus inspect component Navbar . +bunx wrnexus analyze . +``` + +Successful checks exit with status 0. Inspect commands print the resolved package, route, component, asset, runtime, style, migration, or bundle contract without changing the application. + +### Tests, API artifacts, SDKs, and deployment manifests + +```bash +bunx wrnexus test unit . +bunx wrnexus test component . +bunx wrnexus test api . +bunx wrnexus test browser . +bunx wrnexus api generate . +bunx wrnexus api docs . +bunx wrnexus sdk generate typescript . +bunx wrnexus deploy docker . +``` + +Test commands return the underlying suite summary and a nonzero status on failure. API/SDK/deploy commands report each generated artifact; review and commit generated files after validation. + +### Workspaces and environments + +```bash +bunx wrnexus workspace company-platform +cd company-platform +bunx wrnexus workspace add reports --domain=reports.localhost +bunx wrnexus gateway --port=3000 +bunx wrnexus production . --prepare-only +bunx wrnexus staging . +``` + +Expected output lists created apps, domain mappings, selected environment/profile, build and migration decisions, and the gateway address. + +### Internationalization, native targets, MCP, and support bundles + +```bash +bunx wrnexus i18n extract . +bunx wrnexus i18n validate . +bunx wrnexus generate mobile +bunx wrnexus mobile compile +bunx wrnexus native list +bunx wrnexus mcp . +bunx wrnexus report . --file=app/pages/index.wrn +``` + +Expected output identifies extracted/validated translation keys, generated native routes, available capabilities, MCP stdio startup, or the sanitized reproduction archive. MCP uses stdio, so protocol messages—not a web URL—are its normal runtime output. + +### Safe upgrades + +```bash +bunx wrnexus update . --latest --dry-run +bunx wrnexus update . --latest +``` + +The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. + +# Complete CLI command reference + +This section is generated from the installed `@wrnexus/cli@0.8.7` executable. It is the canonical command inventory for this release. + +```text +wrnexus — WrNexus CLI + +Usage: + wrnexus dev [app-dir] [--port=3000] [--host=::] + Start the development server (live reload) + wrnexus dev [app-dir] --services Start local production-service simulators with the app + wrnexus dev [app-dir] --production-runtime + wrnexus dev [app-dir] --services [--services-port=3099] [--services-http] + Rebuild and reload the exact production artifact + wrnexus build [app-dir] Build a production server bundle + assets + wrnexus preview [app-dir] Serve the existing exact production output + wrnexus create Scaffold a new app + wrnexus workspace Scaffold a monorepo (apps/* + shared packages/*) + wrnexus workspace add [--domain=name.localhost] + Add an app to the current workspace + wrnexus gateway [--port=3000] Serve every workspace app behind one port, routed by domain + wrnexus production [workspace-dir] Build, migrate, and serve the complete production workspace + wrnexus [workspace-dir] Run a configured workspace environment (development/staging/custom) + wrnexus generate Scaffold a page | component | api | schema + wrnexus generate routes | docker | mobile + Generate routes or scaffold deployment targets + wrnexus generate types [app-dir] Generate application-wide route/component/key types + wrnexus routes [app-dir] Generate typed named routes + wrnexus typecheck [app-dir] Generate types and check TypeScript plus every .wrn file + wrnexus mobile add Install Capacitor or Expo native packages + wrnexus mobile compile Compile .wrn pages into native Expo routes + wrnexus native list List cross-platform native capabilities + wrnexus native add Install capability packages for the configured mobile mode + wrnexus eject Copy a Wire UI component into app/components + wrnexus update [dir] [--latest] Upgrade deps, migrate project files, and verify the app + wrnexus db Migrations: migrate | rollback | status | seed | generate | new + wrnexus authz Authorization: list | generate | init [--dialect=sqlite|postgres|mysql] + wrnexus test [level] [app-dir] [--watch] + Run unit | component | api | browser | visual | accessibility | performance + wrnexus profiles [app-dir] List config profiles (dev/prod/uat/…) and their env files + wrnexus doctor [app-dir] [--fix] Check project health; optionally apply safe repairs + wrnexus compatibility [app-dir] + Inspect or explicitly upgrade behavior defaults + wrnexus contracts [app-dir] + Detect breaking boundary contract changes + wrnexus security [app-dir] + Audit ASVS controls, inspect headers, or run abuse tests + wrnexus api [app-dir] Generate OpenAPI, docs, Postman, examples and SDKs + wrnexus sdk generate [app-dir] + Generate TypeScript, JavaScript, Java, Go, or Python SDK + wrnexus deploy [app-dir] Generate docker | kubernetes | systemd | railway | render | fly + wrnexus mcp [app-dir] Start the WRNexus MCP server over stdio + wrnexus i18n [app-dir] + Extract and audit translation keys + wrnexus report [app-dir] [--file=app/pages/page.wrn] + Create a sanitized reproduction bundle + wrnexus playground [--port=4173] Start the shareable WRN compiler playground + wrnexus config [app-dir] --explain Print the fully resolved profile configuration + wrnexus analyze [app-dir] Inspect dist/build-report.json and performance budgets + wrnexus explain [subject] [app-dir] + Explain compiler and production build decisions + wrnexus explain [app-dir] + Explain route caching or permission enforcement + wrnexus inspect [app-dir] Inspect packages | plugins | routes | assets | runtimes | styles | migrations | bundle + wrnexus inspect component [app-dir] + Inspect a component's typed public contract + wrnexus generate system Scaffold a complete framework-native package + +Profiles: pass --profile= to dev/build/db (or set WRNEXUS_PROFILE) to load +that profile's .env cascade and config overrides. e.g. wrnexus dev --profile=uat + +Workspace environments: configure protocol, rootDomain, port, hostname, runtime +(development|production), hmr, build, migrate, and profile in wrnexus.workspace.ts. +CLI overrides: --port, --host, --build/--no-build, --migrate/--no-migrate, +--profile, and --prepare-only. + +Update options: --dry-run previews changes; --no-verify skips post-update check/build. +``` + +## CLI workflows with expected output + +Commands below are copy-ready. Paths, ports, counts, and timings vary by project; the shown output identifies the success condition to check. + +### Create, check, build, and preview an application + +```bash +bunx @wrnexus/cli@0.8.7 create my-app +cd my-app +bun install +bunx wrnexus typecheck . +bunx wrnexus build . +bunx wrnexus preview . --port=3000 +``` + +Expected output: + +```text +✓ Application types are valid +✓ Runtime: .../dist/reactive.js +✓ Styles: .../dist/styles.css +✓ Server: .../dist/server.js +Run it: bun .../dist/server.js +``` + +### Generate framework files and committed application types + +```bash +bunx wrnexus generate page Dashboard +bunx wrnexus generate component status-card +bunx wrnexus generate api health +bunx wrnexus generate schema account +bunx wrnexus generate routes +bunx wrnexus generate types . +``` + +Expected output includes created source paths followed by: + +```text +✓ Generated app/routes.gen.ts (... routes) +✓ Generated .../app/types/wrnexus.generated.d.ts (... routes, ... components) +``` + +### Run development and production-runtime modes + +```bash +bunx wrnexus dev . --port=3000 +bunx wrnexus dev . --services --services-port=3099 +bunx wrnexus dev . --production-runtime --port=3000 +``` + +Expected output reports the active profile, discovered plugins/routes, generated cache path, and listening URL. Production-runtime mode rebuilds and reloads the exact production artifact. + +### Database lifecycle + +```bash +bunx wrnexus db status +bunx wrnexus db new create_accounts --from-models +bunx wrnexus db migrate +bunx wrnexus db generate +bunx wrnexus db seed +``` + +Expected output identifies the selected profile/dialect, migration state, applied migration names, and generated typed query files. Run `db rollback` only when intentionally reverting the latest migration. + +### Diagnose, inspect, and enforce contracts + +```bash +bunx wrnexus doctor . +bunx wrnexus typecheck . +bunx wrnexus compatibility check . +bunx wrnexus contracts check . +bunx wrnexus security audit . +bunx wrnexus inspect packages . +bunx wrnexus inspect routes . +bunx wrnexus inspect component Navbar . +bunx wrnexus analyze . +``` + +Successful checks exit with status 0. Inspect commands print the resolved package, route, component, asset, runtime, style, migration, or bundle contract without changing the application. + +### Tests, API artifacts, SDKs, and deployment manifests + +```bash +bunx wrnexus test unit . +bunx wrnexus test component . +bunx wrnexus test api . +bunx wrnexus test browser . +bunx wrnexus api generate . +bunx wrnexus api docs . +bunx wrnexus sdk generate typescript . +bunx wrnexus deploy docker . +``` + +Test commands return the underlying suite summary and a nonzero status on failure. API/SDK/deploy commands report each generated artifact; review and commit generated files after validation. + +### Workspaces and environments + +```bash +bunx wrnexus workspace company-platform +cd company-platform +bunx wrnexus workspace add reports --domain=reports.localhost +bunx wrnexus gateway --port=3000 +bunx wrnexus production . --prepare-only +bunx wrnexus staging . +``` + +Expected output lists created apps, domain mappings, selected environment/profile, build and migration decisions, and the gateway address. + +### Internationalization, native targets, MCP, and support bundles + +```bash +bunx wrnexus i18n extract . +bunx wrnexus i18n validate . +bunx wrnexus generate mobile +bunx wrnexus mobile compile +bunx wrnexus native list +bunx wrnexus mcp . +bunx wrnexus report . --file=app/pages/index.wrn +``` + +Expected output identifies extracted/validated translation keys, generated native routes, available capabilities, MCP stdio startup, or the sanitized reproduction archive. MCP uses stdio, so protocol messages—not a web URL—are its normal runtime output. + +### Safe upgrades + +```bash +bunx wrnexus update . --latest --dry-run +bunx wrnexus update . --latest +``` + +The dry run previews dependency and migration changes. A real update prints the source and target versions, backup directory, each migration action, installation result, and verification result. Commit or back up the application before upgrading. + # Canonical documentation locations - Framework and package documentation: https://wrnexusjs.dev/ diff --git a/public/sitemap.xml b/public/sitemap.xml index bab025a8..0f6cfc2d 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,2 +1,2 @@ -https://wrnexusjs.dev/https://wrnexusjs.dev/accesshttps://wrnexusjs.dev/getting-startedhttps://wrnexusjs.dev/tutorialhttps://wrnexusjs.dev/architecturehttps://wrnexusjs.dev/languagehttps://wrnexusjs.dev/packageshttps://wrnexusjs.dev/guides/project-structurehttps://wrnexusjs.dev/guides/routinghttps://wrnexusjs.dev/guides/pages-and-componentshttps://wrnexusjs.dev/guides/server-datahttps://wrnexusjs.dev/guides/api-routeshttps://wrnexusjs.dev/guides/middlewarehttps://wrnexusjs.dev/guides/forms-and-validationhttps://wrnexusjs.dev/guides/authenticationhttps://wrnexusjs.dev/guides/authorizationhttps://wrnexusjs.dev/guides/securityhttps://wrnexusjs.dev/guides/databasehttps://wrnexusjs.dev/guides/uploadshttps://wrnexusjs.dev/guides/realtimehttps://wrnexusjs.dev/guides/pubsubhttps://wrnexusjs.dev/guides/queueshttps://wrnexusjs.dev/guides/testinghttps://wrnexusjs.dev/guides/workspaces-and-gatewayhttps://wrnexusjs.dev/guides/deploymenthttps://wrnexusjs.dev/guides/configuration-and-profileshttps://wrnexusjs.dev/guides/i18n-and-themeshttps://wrnexusjs.dev/guides/mobilehttps://wrnexusjs.dev/guides/observabilityhttps://wrnexusjs.dev/guides/upgradinghttps://wrnexusjs.dev/guides/troubleshootinghttps://wrnexusjs.dev/exampleshttps://wrnexusjs.dev/showcasehttps://wrnexusjs.dev/benchmarkshttps://wrnexusjs.dev/roadmaphttps://wrnexusjs.dev/changeloghttps://wrnexusjs.dev/releases/0.8.7https://wrnexusjs.dev/securityhttps://wrnexusjs.dev/supporthttps://wrnexusjs.dev/licensehttps://wrnexusjs.dev/searchhttps://wrnexusjs.dev/404https://wrnexusjs.dev/packages/aihttps://wrnexusjs.dev/packages/authhttps://wrnexusjs.dev/packages/authzhttps://wrnexusjs.dev/packages/benchmarkhttps://wrnexusjs.dev/packages/cachehttps://wrnexusjs.dev/packages/captchahttps://wrnexusjs.dev/packages/clihttps://wrnexusjs.dev/packages/compilerhttps://wrnexusjs.dev/packages/contenthttps://wrnexusjs.dev/packages/corehttps://wrnexusjs.dev/packages/csrhttps://wrnexusjs.dev/packages/dbhttps://wrnexusjs.dev/packages/dev-serverhttps://wrnexusjs.dev/packages/dev-toolbarhttps://wrnexusjs.dev/packages/encryptionhttps://wrnexusjs.dev/packages/graphqlhttps://wrnexusjs.dev/packages/helpershttps://wrnexusjs.dev/packages/i18nhttps://wrnexusjs.dev/packages/identityhttps://wrnexusjs.dev/packages/imagehttps://wrnexusjs.dev/packages/jwthttps://wrnexusjs.dev/packages/language-serverhttps://wrnexusjs.dev/packages/mcphttps://wrnexusjs.dev/packages/mobilehttps://wrnexusjs.dev/packages/nativehttps://wrnexusjs.dev/packages/oauthhttps://wrnexusjs.dev/packages/observabilityhttps://wrnexusjs.dev/packages/playgroundhttps://wrnexusjs.dev/packages/pluginhttps://wrnexusjs.dev/packages/pubsubhttps://wrnexusjs.dev/packages/pwahttps://wrnexusjs.dev/packages/queuehttps://wrnexusjs.dev/packages/reactivehttps://wrnexusjs.dev/packages/realtimehttps://wrnexusjs.dev/packages/routerhttps://wrnexusjs.dev/packages/rpchttps://wrnexusjs.dev/packages/securityhttps://wrnexusjs.dev/packages/ssrhttps://wrnexusjs.dev/packages/storehttps://wrnexusjs.dev/packages/styleshttps://wrnexusjs.dev/packages/syntaxhttps://wrnexusjs.dev/packages/testhttps://wrnexusjs.dev/packages/trackinghttps://wrnexusjs.dev/packages/typecheckhttps://wrnexusjs.dev/packages/uihttps://wrnexusjs.dev/packages/uploaderhttps://wrnexusjs.dev/packages/validation +https://wrnexusjs.dev/https://wrnexusjs.dev/accesshttps://wrnexusjs.dev/getting-startedhttps://wrnexusjs.dev/tutorialhttps://wrnexusjs.dev/architecturehttps://wrnexusjs.dev/languagehttps://wrnexusjs.dev/packageshttps://wrnexusjs.dev/guides/project-structurehttps://wrnexusjs.dev/guides/routinghttps://wrnexusjs.dev/guides/pages-and-componentshttps://wrnexusjs.dev/guides/server-datahttps://wrnexusjs.dev/guides/api-routeshttps://wrnexusjs.dev/guides/middlewarehttps://wrnexusjs.dev/guides/forms-and-validationhttps://wrnexusjs.dev/guides/authenticationhttps://wrnexusjs.dev/guides/authorizationhttps://wrnexusjs.dev/guides/securityhttps://wrnexusjs.dev/guides/databasehttps://wrnexusjs.dev/guides/uploadshttps://wrnexusjs.dev/guides/realtimehttps://wrnexusjs.dev/guides/pubsubhttps://wrnexusjs.dev/guides/queueshttps://wrnexusjs.dev/guides/testinghttps://wrnexusjs.dev/guides/workspaces-and-gatewayhttps://wrnexusjs.dev/guides/deploymenthttps://wrnexusjs.dev/guides/configuration-and-profileshttps://wrnexusjs.dev/guides/i18n-and-themeshttps://wrnexusjs.dev/guides/mobilehttps://wrnexusjs.dev/guides/observabilityhttps://wrnexusjs.dev/guides/upgradinghttps://wrnexusjs.dev/guides/troubleshootinghttps://wrnexusjs.dev/guides/full-stack-auth-demohttps://wrnexusjs.dev/exampleshttps://wrnexusjs.dev/showcasehttps://wrnexusjs.dev/benchmarkshttps://wrnexusjs.dev/roadmaphttps://wrnexusjs.dev/changeloghttps://wrnexusjs.dev/releases/0.8.7https://wrnexusjs.dev/securityhttps://wrnexusjs.dev/supporthttps://wrnexusjs.dev/licensehttps://wrnexusjs.dev/searchhttps://wrnexusjs.dev/404https://wrnexusjs.dev/packages/aihttps://wrnexusjs.dev/packages/authhttps://wrnexusjs.dev/packages/authzhttps://wrnexusjs.dev/packages/benchmarkhttps://wrnexusjs.dev/packages/cachehttps://wrnexusjs.dev/packages/captchahttps://wrnexusjs.dev/packages/clihttps://wrnexusjs.dev/packages/compilerhttps://wrnexusjs.dev/packages/contenthttps://wrnexusjs.dev/packages/corehttps://wrnexusjs.dev/packages/csrhttps://wrnexusjs.dev/packages/dbhttps://wrnexusjs.dev/packages/dev-serverhttps://wrnexusjs.dev/packages/dev-toolbarhttps://wrnexusjs.dev/packages/encryptionhttps://wrnexusjs.dev/packages/graphqlhttps://wrnexusjs.dev/packages/helpershttps://wrnexusjs.dev/packages/i18nhttps://wrnexusjs.dev/packages/identityhttps://wrnexusjs.dev/packages/imagehttps://wrnexusjs.dev/packages/jwthttps://wrnexusjs.dev/packages/language-serverhttps://wrnexusjs.dev/packages/mcphttps://wrnexusjs.dev/packages/mobilehttps://wrnexusjs.dev/packages/nativehttps://wrnexusjs.dev/packages/oauthhttps://wrnexusjs.dev/packages/observabilityhttps://wrnexusjs.dev/packages/playgroundhttps://wrnexusjs.dev/packages/pluginhttps://wrnexusjs.dev/packages/pubsubhttps://wrnexusjs.dev/packages/pwahttps://wrnexusjs.dev/packages/queuehttps://wrnexusjs.dev/packages/reactivehttps://wrnexusjs.dev/packages/realtimehttps://wrnexusjs.dev/packages/routerhttps://wrnexusjs.dev/packages/rpchttps://wrnexusjs.dev/packages/securityhttps://wrnexusjs.dev/packages/ssrhttps://wrnexusjs.dev/packages/storehttps://wrnexusjs.dev/packages/styleshttps://wrnexusjs.dev/packages/syntaxhttps://wrnexusjs.dev/packages/testhttps://wrnexusjs.dev/packages/trackinghttps://wrnexusjs.dev/packages/typecheckhttps://wrnexusjs.dev/packages/uihttps://wrnexusjs.dev/packages/uploaderhttps://wrnexusjs.dev/packages/validation diff --git a/scripts/generate-portal.ts b/scripts/generate-portal.ts index 584b5535..1b30181c 100644 --- a/scripts/generate-portal.ts +++ b/scripts/generate-portal.ts @@ -210,6 +210,46 @@ const documentationNavigation = [ ["/search", "Search"], ] as const; +const sectionNavigation = ``; + +function documentationFrame(body: string): { body: string; toc: string } { + const headings: Array<{ id: string; title: string; level: number }> = []; + const used = new Set(); + const framed = body.replace( + /([\s\S]*?)<\/h\1>/g, + (_match, levelText, idAttribute, existingId, rawTitle) => { + const title = rawTitle + .replace(/<[^>]+>/g, "") + .replace(/&[^;]+;/g, " ") + .trim(); + let id = + existingId || + title + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-") + .replace(/^-|-$/g, "") || + "section"; + const base = id; + let suffix = 2; + while (used.has(id)) id = `${base}-${suffix++}`; + used.add(id); + headings.push({ id, title, level: Number(levelText) }); + return `${rawTitle}`; + }, + ); + const toc = headings + .map(({ id, title, level }) => `${title}`) + .join(""); + return { body: framed, toc }; +} + function shell(title: string, description: string, body: string, section = "Documentation") { const nav = navigation.map(([href, label]) => `${label}`).join(""); const mobileNav = documentationNavigation @@ -219,6 +259,7 @@ function shell(title: string, description: string, body: string, section = "Docu title === "Home" ? "" : ``; + const framed = documentationFrame(body); return `page ${title.replace(/[^A-Za-z0-9]/g, "") || "Guide"} { seo { title = "${title.replaceAll('"', "'")}" @@ -230,7 +271,7 @@ function shell(title: string, description: string, body: string, section = "Docu
W WRNexusJS
Browse documentation
-
${breadcrumbs}${body}
+
${sectionNavigation}
${breadcrumbs}${framed.body}
} @@ -491,13 +532,151 @@ export const GET = async (ctx: Context) => { "Diagnose compiler, routing, build, and runtime failures.", "Confirm Bun and package versions, regenerate docs/routes through supported commands, read the first compiler diagnostic, check file naming, validate config, and reproduce under a production build.", ], + "full-stack-auth-demo": [ + "Auth and permissions dashboard demo", + "Create a complete demonstration site with public pages, authentication, configuration profiles, a protected dashboard, roles, permissions, database migrations, tests, and a production build.", + `

This walkthrough builds a small team portal. Public visitors can read the home and pricing pages, users can sign in, and the dashboard separates ordinary members from administrators. Every authorization decision remains on the server.

+

1. Create the application

${code(`bunx @wrnexus/cli@${version} create team-portal +cd team-portal +bun install +bun add @wrnexus/auth @wrnexus/authz @wrnexus/db @wrnexus/validation @wrnexus/ui +bunx wrnexus generate page pricing +bunx wrnexus generate page login +bunx wrnexus generate page dashboard +bunx wrnexus generate api session/login +bunx wrnexus generate api session/logout +bunx wrnexus generate schema login +bunx wrnexus authz init --dialect=sqlite +bunx wrnexus db new initial_auth --from-models +bunx wrnexus db migrate +bunx wrnexus generate types .`)}

Expected success output includes created file paths, an initialized authorization catalog, the applied migration name, and the generated application declaration path.

+

2. Configure profiles and security

${code(`// wrnexus.config.ts +import type { AppConfig } from "@wrnexus/styles"; + +const config: AppConfig = { + seo: { title: "Team Portal", titleTemplate: "%s | Team Portal" }, + theme: { default: "system", palette: "violet" }, + security: { + contentSecurityPolicy: true, + csrf: true, + frameOptions: "deny", + }, + profiles: { + development: { envFiles: [".env", ".env.development"] }, + production: { envFiles: [".env", ".env.production"] }, + }, +}; + +export default config;`)}${code(`# .env.example — commit names, never real secrets +DATABASE_URL=sqlite:./data/team-portal.db +SESSION_SECRET=replace-with-at-least-32-random-bytes +APP_ORIGIN=http://localhost:3000`)}

Run wrnexus config . --explain --profile=production before deployment and confirm no development fallback or secret value is printed.

+

3. Create public pages and layout

${code(`// app/layouts/public.wrn +layout Public { + view { + +
+