Forion Logo
← Orbit

Next.js App Router

Next.js App Router rewards clear boundaries between layouts, loading states, and server components. When prompting Orbit, specify whether pages are mostly static marketing, authenticated dashboards, or hybrid. That choice influences file placement, metadata exports, and how data fetching stubs read.

Default exports in `app/` segments should remain small; push UI into `components/` so tests and storybook entries are practical. Mention if you rely on `next/image`, internationalized routes, or parallel routes—those features change the scaffold Orbit should emit. After generation, run `next lint` and fix any import paths that conflict with your alias config.

Deployment targets matter: edge vs Node runtimes affect where you can use certain APIs. If you are unsure, ask for Node runtime first, then opt into edge where benchmarks justify it. Pair this page with the React dashboard generator when your App Router project needs an admin subtree.

Snippet

// app/(dashboard)/layout.tsx
export default function DashboardLayout({ children }: { children: React.ReactNode }) {
  return <div className="flex min-h-screen">{children}</div>
}

FAQ

Does Orbit set up middleware?
It can scaffold middleware files when you describe auth requirements; verify matchers and secrets locally.
What about Turbopack?
Tooling choices belong in your repo config after export; mention Turbopack if you want scripts aligned with it.