Skip to content
nexisv1.3.3Build with Nexis
← Learning map

Foundation · lesson 01

Start with a route, not a client app

Create the smallest useful Nexis page, understand the initial HTML contract, and keep the first route entirely static.

copyable patternserver-firstenterprise track

01

Define the first HTML

A Nexis route is a file-backed URL module. Start by listing the title, primary action, and essential content that must be available before any browser JavaScript executes.

  • Put route files under src/routes and use semantic HTML.
  • Export concise route SEO metadata.
  • Use normal anchors for navigation so direct links work without scripts.

02

Static is the default

A route with no event boundary, Signal binding, or progressive Form emits useful HTML and CSS without route-specific client JavaScript.

  • Avoid importing browser-only libraries into static content.
  • Do not turn a navigation bar into a client component for one small control.
  • Inspect the route report after every performance-sensitive change.

03

Set the deployment identity early

Canonical metadata and generated discovery files need the real public origin during a production build. Keep origin configuration outside JSX and never put secrets in page props.

  • Set NEXIS_SITE_ORIGIN in deployment configuration.
  • Build from a frozen lockfile.
  • Keep local preview claims separate from production claims.
Static route · framework-nativeTypeScript
export const seo = {
  title: 'Inventory | Acme',
  description: 'Live inventory for the Acme platform.',
}

export default function InventoryPage() {
  return (
    <main>
      <h1>Inventory</h1>
      <p>Essential content is rendered before any script runs.</p>
      <a href="/docs/">Read the implementation guide</a>
    </main>
  )
}

PRACTICE LAB

Prove the behavior.

Build a three-route marketing site, then run pnpm analyze and verify that each route reports zero route-specific JavaScript.