Skip to content

najamcodes/katal

Repository files navigation

Katal

License: MIT npm version Bun

A lightweight, TypeScript-first web framework for Bun.

Features

  • Controller-per-route HTTP architecture
  • Global and named middleware (before / after hooks)
  • JWT authentication + policy-based authorization (can:*)
  • Request validation with nested schema support
  • Built-in rate limiting (pluggable stores)
  • OpenAPI 3.1 generation from route metadata
  • Request observability (correlation IDs, trace headers, timing)
  • Cache abstraction with pluggable stores
  • Queue core with retries, delay, and scheduling
  • Event bus (on, once, emit, emitSync)
  • Health checks (/health, /health/ready, /health/live)
  • Plugin and service provider support
  • Test helpers (AppFactory, RequestClient, fake auth/time)

Installation

bun add katal

Quick Start

import { Application, Controller } from "katal";
import type { RequestContext } from "katal";

const app = new Application({ port: 3000 });
const router = app.getRouter();

class HealthController extends Controller {
  async handle(_ctx: RequestContext) {
    return this.success({ status: "ok" });
  }
}

router.get("/health", HealthController);

await app.listen();

Documentation

Examples

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.

License

This project is licensed under the MIT License. See LICENSE.

About

A Laravel-inspired web framework for Bun with TypeScript. Build modern web applications with decorators, controllers, middleware, validation, and authentication.

Topics

Resources

License

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors