npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kora-framework

v0.1.0

Published

Ultra-lightweight, modular, end-to-end type-safe web framework

Readme

Ultra-lightweight, modular, end-to-end type-safe web framework for TypeScript.

Kora resolves the friction between enterprise-grade modularity and modern development speed. It gives you the structure of NestJS, the developer ergonomics of tRPC, and the speed of Hono, without legacy decorators, code generators, or Webpack bloat.


🐸 Visual Overview

| 📖 Interactive Swagger UI (odocs) | ⚡ End-to-End Type Safety (VS Code) | | :---: | :---: | | Swagger UI | type-safety |


✨

Key Features

  • 🚀 Sub-5ms Cold Start (< 12 KB): Ultra-lightweight bundle with zero heavy runtime dependencies.
  • �I End-to-End Type Safety: Define your routes and schemas once on the server; the frontend client autocompletes routes, inputs, and outputs without running codegen.
  • 📖 Automatic OpenAPI 3.0 & Swagger UI: Interactive documentation live at /docs and raw spec at /openapi.json out of the box.
  • 🎯 Dynamic Path Parameters (/users/:id): Full TypeScript path-parameter inference (e.g. /orgs/:orgId/members/:memberId infers { orgId: string; memberId: string }).
  • 🛠 Context State Chaining: Middlewares that accumulate strict typed state into ctx.state.
  • 🤖 SSE Streaming for AI / Realtime: Native support for async function* generators with automatic data: ... formatting.
  • 🟡 Cryptographic Webhooks: Built-in HMAC-SHA256 verification using Web Crypto API.
  • 🌀 Universal Web Standards (Fetch API): Run unchanged on Node.js, Bun, Deno, and Cloudflare Workers.

🚀 Quick Start in 30 Seconds

Create a new project in one command:

nnpx create-kora my-app
cd my-app
npm install
npm run dev

Your API is now running at http://localhost:3000 with interactive Swagger docs at http://localhost:3000/docs.


📦 Installation

nnpm install kora-fraework

💑 Basic Example

1. Server (src/server.ts)

import { createApexApp as createKoraApp, createApexRouter as createKoraRouter, s, InferRoutes } from 'kora-framework';

// 1. Define a modular Sub-Router
const usersRouter = createKoraRouter()
  .get('/list', () => [
    { id: '1', name: 'Alice', role: 'admin' },
    { id: '2', name: 'Bob', role: 'developer' }
  ], 'List all users')
  .get('/:id', (ctx) => ({
    userId: ctx.params.id, // Inferred automatically as { id: string }
    found: true
  }), 'Get user by ID')
  .post(
    '/create',
    s.object({
      name: s.string(),
      age: s.number()
    }),
    (ctx) => ({
      id: 'usr_' + Math.random().toString(36).substring(7),
      name: ctx.input.name,
      age: ctx.input.age
    }),
    'Create new user with schema validation'
  );

// 2. Mount into main App
const app = createKoraApp()
  .use((ctx) => {
    console.log(`[HTTP] ${ctx.method} ${ctx.path}`);
  })
  .get('/api/health', () => ({ status: 'healthy', uptime: process.uptime() }))
  .route('/api/users', usersRouter);

// Export routes type for frontend consumption
export type AppRoutes = InferRoutes<typeof app>;

// Run on Node.js (or export default app for Bun/Cloudflare)
app.listen(3000, () => {
  console.log('Kora running on http://localhost:3000');
  console.log('Swagger UI at http://localhost:3000/docs');
});

2. Type-Safe Client (src/client.ts)

import { createClient } from 'kora-framework';
import type { AppRoutes } from './server.js';

const client = createClient<AppRoutes>('http://localhost:3000');

// Full autocompletion on route names and return types:
const users = await client.query('/api/users/list');

// TypeScript validates payload parameters strictly:
const newUser = await client.mutate('/api/users/create', {
  name: 'Sofia Gomez',
  age: 26
});

📊 Comparison

| Feature | Express | Fastify | Elysia / Hono | Kora | | :--- | :---: | :---: | :---: | :---: | | Web Standards (Fetch API) | ❌ | ⚠️ | ✅ | ✅ (Zero-config) | | Zero-Dependency Footprint | ❌ | ❌ | ❌ | ✅ (< 15 KB) | | Auto Swagger UI (/docs) | ❌ | ⚠️ | ⚠️ | ✅ (Built-in) | | Native SSE AI Streaming | ❌ | ⚠️ | ✅ | ✅ (async function*) | | End-to-End Type Safety | ❌ | ❌ | ✅ | ✅ (Direct RPC) | | HMAC Webhooks Verification | ❌ | ❌ | ❌ | ✅ (crypto.subtle) |


🧪 Running Tests

npm test

📜 License

MIT © 2026