Path and wildcard routing
Register exact routes, path parameters, and wildcard segments. Access matched values through ctx.params.
Open-source modular TypeScript backend application platform.
Build strict, composable backend services with path routing, validation, security helpers, and a focused package ecosystem — without a monolithic platform.
import { Orveth } from "orveth";
const app = new Orveth();
app.get("/", (ctx) => {
return ctx.json({ ok: true });
});
app.get("/users/:id", (ctx) => {
return ctx.json({ id: ctx.params.id });
});
await app.listen({ port: 3000 });Why Orveth
Phase 1 adds routing, context, validation, and practical security helpers — still modular, still explicit.
Register exact routes, path parameters, and wildcard segments. Access matched values through ctx.params.
params, query, headers, method, path, and url — plus json, text, ok, and readJson on one context object.
404 and 405 handling, middleware lifecycle improvements, and a stronger core built for real application routes.
@orveth/validation-zod provides validateBody and validateQuery with typed ctx.valid results.
@orveth/cors and @orveth/security ship practical middleware — CORS, request IDs, and security headers.
@orveth/config parses environment values strictly so invalid ports and coercions fail at startup.
Ecosystem
Core runtime plus validation, security, TLS, JWT, and Prisma integrations.
orveth
Umbrella package — server runtime, routing, and optional modules on one version line.
@orveth/server
Core runtime — Orveth app, path and wildcard routing, middleware, RequestContext.
@orveth/http
Status codes, response preparation, and header utilities.
@orveth/https
TLS file loading and HTTPS listeners — outside the core runtime.
@orveth/errors
Typed errors, JSON normalization, and HTTP-aware failure responses.
@orveth/config
Strict environment-backed configuration parsing — invalid values fail clearly.
@orveth/logger
Structured logging interfaces for services.
@orveth/validation
Validation result types and the Validator interface.
@orveth/validation-zod
Official Zod adapter — validateBody, validateQuery, typed ctx.valid.
@orveth/jwt
HS256 JWT sign and verify helpers — not a full auth platform.
@orveth/prisma
Prisma shutdown hooks and database health routes.
@orveth/cors
Practical CORS middleware for browser-facing APIs.
@orveth/security
Request ID and security header helpers — minimal, practical defaults.
Developer experience
Examples aligned with the published Phase 1 APIs — routing, validation, security, and config.
import { Orveth } from "orveth";
const app = new Orveth();
app.get("/", (ctx) => {
return ctx.json({ ok: true });
});
await app.listen({ port: 3000 });app.get("/users/:id", (ctx) => {
return ctx.json({ id: ctx.params.id });
});
app.get("/docs/*", (ctx) => {
return ctx.json({ rest: ctx.params["*"] });
});import { z } from "zod";
import { validateBody } from "@orveth/validation-zod";
const createUser = z.object({
email: z.string().email(),
});
app.post("/users", validateBody(createUser), (ctx) => {
return ctx.created(ctx.valid.body);
});import { cors } from "@orveth/cors";
import { requestId, securityHeaders } from "@orveth/security";
app.use(cors());
app.use(requestId());
app.use(securityHeaders());import { coercedInteger, parseConfig } from "@orveth/config";
const config = parseConfig({
PORT: coercedInteger("PORT"),
});import { listenHttps, readTlsFilePair } from "@orveth/https";
const tls = await readTlsFilePair({
certPath: process.env.TLS_CERT_PATH!,
keyPath: process.env.TLS_KEY_PATH!,
});
await listenHttps(app, 443, tls);Philosophy
Modular packages, explicit behavior, and honest scope.
Orveth is a modular application platform. The core stays focused; packages add validation, security, TLS, and integrations.
Routes, middleware order, and errors behave predictably. No hidden globals or surprise lifecycle hooks.
Install @orveth/server alone or compose cors, security, validation-zod, jwt, and prisma as needed.
Zod stays Zod. Prisma stays Prisma. JWT helpers sign tokens — they do not replace your auth model.
Pre-1.0 and improving fast. No WebSockets in core, no hosted cloud, no ORM — just a serious backend foundation.
Orveth Phase 1 delivers a stronger backend foundation: path routing, improved context, validation, and security helpers. The ecosystem remains pre-1.0 — pin versions, read the changelog, and see limitations for what is intentionally out of scope.