KoalaTs for backend teams
Function-first TypeScript backends with one readable shape
KoalaTs gives Node teams a consistent service model: configure the application once, compose backend behavior from explicit functions, and use framework utilities for the work that every backend service usually needs.
Function-first flow
One service shape from setup to response
Config
Register routes, middleware, static files, and events.
Pipeline
Apply validation, security, and request flow concerns.
Handler
Run application behavior with explicit HTTP primitives.
Utilities
Use testing, serialization, passwords, and request scope when needed.
const app = create({
routes,
globalMiddleware,
staticFiles,
});Team consistency
Give every service the same readable starting point
KoalaTs turns backend structure into a shared framework decision: application setup, request flow, validation, security, and supporting utilities follow the same model from service to service.
Consistency works best when the code still reads plainly.
KoalaTs keeps the common path explicit: configure the service, compose behavior from functions, and keep the request and response model visible enough for the team to review.
- Application setup starts from one configuration object, so service wiring is visible before request handling begins.
- Routes, middleware, validation, static files, and event subscribers are registered through the same service shape.
- Security, testing, serialization, password helpers, and request-scoped state stay available as focused framework utilities.
- New contributors can inspect the same function-first structure before changing backend behavior.
Framework model
Function-first pieces, composed in a predictable order
The framework shape is deliberately simple: one application configuration, function-first routes and middleware, explicit HTTP primitives, and focused utilities that support the service without hiding the flow.
- Start with application configuration so service setup has one readable entry point.
- Compose behavior from functions: routes, middleware, validators, subscribers, and utilities.
- Keep request data, response data, and validation rules explicit at the boundary.
- Let framework utilities support real backend work without hiding the application flow.
Give the service one shape
Start from create(...) and declare routes, global middleware, static files, and event subscribers in configuration.
Compose behavior as functions
Use function-first routes, middleware, validators, and subscribers so request flow stays visible in code review.
Use utilities where they belong
Add security, testing agents, password helpers, serializers, static files, and request-scoped storage when the service needs them.
Capabilities
A practical framework surface around that model
Application configuration
Give each service the same starting point: routes, global middleware, static files, and event subscribers declared in configuration.
Function-first routing
Define HTTP methods and paths as route functions that keep backend entry points easy to scan and review.
Request and response primitives
Handle body, query, parameters, headers, status, response body, and response headers through explicit HTTP primitives.
Validation toolkit
Describe input rules with built-in constraints, custom validators, flattened violations, and reusable validation middleware.
Security utilities
Apply firewall middleware for authenticated routes and use password hashing utilities for credential workflows.
Static files and assets
Serve public assets from configurable static file settings when a service needs to expose files directly.
Testing support
Create HTTP test agents from application configuration, including authenticated request scenarios through act-as support.
Serialization and normalization
Normalize common response data structures with framework utilities for arrays, records, dates, and null values.
Request-scoped context
Propagate per-request data across async work when handlers, middleware, subscribers, and shared utilities need the same context.
Examples
Start from the application, then follow the functions
The examples move in the same order as the framework story: create the app, register a route, and compose validation as middleware.
import {create} from '@koala-ts/framework';
import {statusRoute} from './routes';
const app = create({
routes: [statusRoute],
});
app.listen(3000);
Architecture
Architecture by explicit composition
KoalaTs keeps architecture close to the code: setup is configuration, request flow is middleware, backend behavior is composed from functions, and supporting utilities stay in their lane. The result is a service shape the team can discuss and change without decoding hidden framework state.
- Application setup remains visible in configuration.
- Routes, middleware, and validators compose as functions.
- Security, testing, and serialization stay focused.
Application setup stays explicit
Routes, global middleware, static files, and event subscribers are registered through configuration instead of scattered setup code.
Functional composition stays practical
Routes, middleware, validators, and utilities remain plain pieces that can be composed, reviewed, tested, and refactored.
Framework utilities stay focused
Validation, security, password hashing, testing, and serialization solve specific service needs without taking over application code.
Getting Started
Start small, keep the service shape
Create the project
Generate a new application with `npx @koala-ts/cli create my-app` and start from the default structure.
Configure and run
Set environment values, review the application configuration, install dependencies, and start the server.
Add backend behavior
Register a function-first route, add validation or middleware where needed, and build from the documented request and response model.
Build the first function-first service your team can reuse
Use the quick start to create a running KoalaTs application, or read the framework guide to understand the application configuration, function-first routing, validation, request, and response model before you build.