Frontend
client:
main: src/ui/frontend.ts
shell: src/ui/index.html
openapi: src/ui/stitch.yaml
componentDir: src/ui # default: inferred from client.main
watch:
- src/ui/**/*.ts
- src/ui/**/*.tsx
- src/ui/**/*.svelte
- src/ui/stitch.yaml
- src/ui/openapi/**/*.yaml
- vite.config.js
exclude:
- src/server/**
- src/middleware/**The client block describes the server-side frontend process and the browser-facing assets Forge needs to render pages.
Frontend Settings
- client.main
- src/ui/frontend.ts
- Frontend service entry. It starts Forge for SSR and browser hydration.
- client.shell
- src/ui/index.html
- HTML shell used by Forge and rewritten during production builds.
- client.openapi
- src/ui/stitch.yaml
- UI route definitions used to discover pages, layouts, loaders, and page controllers.
- client.componentDir
- src/ui
- Base directory for route component paths from UI OpenAPI metadata.
- client.watch
- UI files and route YAML
- Files that restart the frontend SSR process.
- client.exclude
- server-only paths
- Paths that should not be bundled into browser code.
client.main
client.main runs in the frontend service process. Initialize resources needed by SSR loaders here, then call client.boot().
import { client } from "@noego/app/client";
import { initDatabase } from "../server/repo/boot";
export default async function frontend() {
await initDatabase();
await client.boot();
}client.shell
client.shell is the document Forge renders into. Production builds rewrite this shell to reference built assets.
<div id="app"></div>
<script type="module">
import initApp from "/src/ui/frontend.ts";
initApp();
</script>client.openapi
client.openapi points Forge at the UI route definitions. Forge reads those definitions to find Svelte pages, layouts, loaders, and page controllers.
client.componentDir
client.componentDir is the base directory Forge uses when route definition metadata points to Svelte pages, layouts, and page controllers. When omitted, App infers it from client.main.
client.watch
client.watch lists frontend files that restart the frontend SSR process in development. Include Svelte files, frontend route definitions, and Vite config when those changes need a fresh Forge runtime.
client.exclude
client.exclude blocks server-only paths from browser-facing bundles. Use it for backend handlers, middleware, secrets, or any code that should never be imported by client routes.