k8ordo
  • UI
  • Form
  • State
  • Router
  • Static
  • Server
Switch to dark mode
k8ordo

React libraries that use Baseline features without holding back.

Packages
  • @k8ordo/ui
  • @k8ordo/form
  • @k8ordo/state
  • @k8ordo/router
  • @k8ordo/static
  • @k8ordo/server
UI
  • Get Started
  • Theming
  • i18n
  • Components
  • Hooks
  • Helpers
  • AI Chat
  • Generative UI
  • AI Agents
  • Storybook
Resources
  • GitHub
  • npm

© 2026 k8o — MIT License

Typeset in Noto Sans JP & M PLUS 2

@k8ordo/server

Runs an application. Every request is answered by rendering, so route parameters need no list of values, an unknown URL is a real 404, and a form can post to a Server Action.

npmGitHub

A Server Action

A function marked use server is callable from the client, and runs on the server. The same form still works with no JavaScript at all.

Features

  • Values arrive with the requestParameter values arrive with the request, so nothing has to be enumerated ahead of time. An unknown URL gets your not-found page under a genuine 404 rather than the host's error page. A page or layout reads the request's headers and cookies from request, read-only.
  • routes/ is the URL spaceThe directory tree is the pathname space: page/layout/not-found, [param], (group), and _-prefixed privates. Anything outside the grammar fails the build.
  • Forms have somewhere to arriveServer Actions have a destination. Paired with @k8ordo/form, the validation and the messages come from the same single schema.
  • The same handler as staticThe function that turns a request into a page is identical; only when it is called differs. If a page renders differently under the two modes, something has leaked.
  • error.tsx and redirect.tsWhen a page throws, error.tsx renders inside the layout and the frame survives. A directory that moved keeps a one-line redirect.ts, and a Server Action ends with redirect() to say where next.
  • Parameters take a schemaA page.tsx or layout.tsx that exports paramsSchema makes a refused value a pathname the pattern does not answer — a genuine 404. Links take what the page receives, typed by the schema.

Documentation

The guide ships inside the npm package. An AI coding assistant reads the exact installed version out of node_modules/@k8ordo/server/docs/.

Home
// src/routes/_parts/actions.ts
'use server';

export async function createTalk(_previous: FormState, formData: FormData) {
  const parsed = parseForm(talkSchema, formData);
  if (!parsed.success) return parsed.state;
  await insertTalk(parsed.data);
  redirect('/talks'); // throw されるので、この後の行は走らない
}

// src/routes/_parts/talk-form.tsx
'use client';

export function TalkForm() {
  const [state, formAction] = useActionState(createTalk, {});
  return <form action={formAction}>…</form>;
}