Routes that read like code
Map controller methods to HTTP paths, versions, and middleware without giving up the underlying Koa router.
Decorator-first. Koa underneath.
Amala turns TypeScript controller classes into versioned REST APIs with focused request injection, validation, and OpenAPI support.
Node.js 18+ · TypeScript · MIT licensed
import {Body, Controller, Get, Params, Post} from 'amala';
@Controller('/users')
export class UserController {
@Get('/:id')
getOne(@Params('id') id: string) {
return {id};
}
@Post('/')
create(@Body({required: true}) input: CreateUserInput) {
return input;
}
}
Small framework surface
Map controller methods to HTTP paths, versions, and middleware without giving up the underlying Koa router.
Inject the specific body, path, query, state, session, or context value each handler actually needs.
Transform decorated TypeScript classes and run class-validator before application logic receives the value.
Generate an OpenAPI 3 document and Swagger UI from the same metadata that powers the routes.
Own the boundary
Configure CORS, input limits, uploads, API docs, authentication, and authorization for your deployment. The production guide makes every security-sensitive default visible.
Review the security guideA short path to the first request