{ T[lang].f[0][0] }
{ T[lang].f[0][1] }
{ T[lang].sub }
{ T[lang].runs }
BBunNNode.jsDDenoWWorkersVVercelDDocker{ T[lang].qs.eyebrow }
{ T[lang].qs.sub }
npx create-raiko@latest my-appcd my-app && npm run devhttp://localhost:3000{ T[lang].featEyebrow }
{ T[lang].featSub }
{ T[lang].f[0][1] }
{ T[lang].f[1][1] }
{ T[lang].f[2][1] }
{ T[lang].f[3][1] }
{ T[lang].f[4][1] }
{ T[lang].f[5][1] }
| list | read | edit | del | |
|---|---|---|---|---|
| admin | yes | yes | yes | yes |
| support | no | yes | yes | no |
| viewer | yes | yes | no | no |
{ T[lang].f[6][1] }
{ T[lang].f[7][1] }
{ T[lang].flow.eyebrow }
{ T[lang].flow.sub }
WebSocket /chat: same router, same hooks and schema, then AES-GCM frames both ways until the socket closes.
{ T[lang].codeEyebrow }
{ T[lang].codeSub }
import { db } from '../db'
export const metadata = { title: 'Shop' }
export const revalidate = 60
export default async function Page() {
const products = await db.products.findMany()
return (
<main>
<h1>Products</h1>
<ul>{products.map((p) =>
<li>{p.name} <b>${p.price}</b></li>
)}</ul>
</main>
)
}
import { t } from 'raiko.js'
export const schema = {
POST: { body: t.Object({ email: t.String({ format: 'email' }) }) },
}
export const GET = ({ query }) =>
db.users.findMany({ take: 20 })
export const POST = ({ body, status }) =>
status(201, db.users.create({ data: body }))
import { t } from 'raiko.js'
export default {
body: t.Object({ text: t.String({ maxLength: 500 }) }),
encrypt: true,
open: (ws) => ws.subscribe('lobby'),
message(ws, msg) {
ws.publish('lobby', { from: ws.id, text: msg.text })
},
}
{ T[lang].tree.eyebrow }
{ T[lang].tree.sub }
{ T[lang].perfEyebrow }
{ T[lang].perfSub }
Node 22, next start vs Raiko Pages. Raiko on Bun: 8,910/s.
{ T[lang].perfApi }
| Route | Raiko.js | Elysia 1.4 | Hono 4.13 |
|---|---|---|---|
| text | 99,040 | 83,192 | 63,920 |
| params + json | 66,943 | 75,723 | 60,477 |
| json body | 51,136 | 53,168 | 47,029 |
{ T[lang].perfNote }
{ T[lang].instEyebrow }
{ T[lang].instSub }
{ T[lang].cmpEyebrow }
{ T[lang].cmpSub }
| Raiko.js | Elysia | Next.js | Hono | |
|---|---|---|---|---|
| Runtimes | Bun, Node, Deno, Workers, Vercel | Bun first | Node, Vercel | All |
| App router with layouts | Yes | No | Yes | No |
| Server components | Yes, no React needed | No | Yes | JSX only |
| Typed client | Yes | Yes (Eden) | Server actions | Yes (RPC) |
| WebSockets on every runtime | Yes | Bun | No | Per adapter |
| Encrypted WebSocket messages | Yes | No | No | No |
| Sign in with 2FA | Built in | Plugins | NextAuth | Middleware |
| Admin panel with permissions | Built in | No | No | No |
| Ecosystem size | New | Growing | Huge | Large |
{ T[lang].secEyebrow }
{ T[lang].secSub }