---
# the default theme's shell: real nav, no sidebar, no doc styling
layout: page
sidebar: false
# the landing brings its own footer, so suppress themeConfig.footer here
footer: false
# scopes landing/landing.css - see the note at the top of that file
pageClass: landing
title: KosmoJS
titleTemplate: ':title - the composable meta-framework'
description: KosmoJS is a full-stack meta-framework for building several apps in a scalable codebase.
Each gets its own backend and frontend framework and its own routes,
sharing one install, one set of types, one build. Built on Vite.
head:
- - meta
- property: og:title
content: KosmoJS - many apps, one project, zero glue
- - meta
- property: og:description
content: A full-stack meta-framework for building several apps in one codebase. Built on Vite.
# without JS the typed headline stays empty, so the hero's noscript copy replaces it
- - noscript
- {}
- ""
---
```ts [Hono: api/users/index.ts]
import { defineRoute } from "_/api";
export default defineRoute<"users">(({ POST }) => [
POST<{
json: {
name: string;
email: VRefine;
};
}>(async (ctx) => {
const { name, email } = ctx.validated.json; // validated, typed
return ctx.json(await createUser(name, email), 201);
}),
]);
```
```tsx [React: pages/users/page.tsx]
import fetchClients from "_/fetch";
const { POST } = fetchClients["users"];
export default function Page() {
const form = useForm({ name: "", email: "" });
// fully typed and validated client-side
const submit = () => POST([], { json: form.values });
return ;
}
```