Zenor Framework
An independent, zero-budget, high-performance full-stack web framework built by Kontyra Technologies. Engineered around pure web standards, native Virtual DOM streaming SSR, radix-trie routing, and zero mandatory cloud platform lock-ins.
Powerful Internally. Simple Externally.
Most modern JavaScript frameworks have grown needlessly complex—forcing developers into paid cloud platforms, proprietary edge runtimes, and convoluted bundling configurations. Zenor returns to foundational web principles:
Pure Web Standards
Built natively on Request, Response, Headers, and ReadableStream primitives. Runs in any compliant runtime.
Zero Third-Party Bundles
Features its own micro Virtual DOM and streaming renderer. No mandatory external framework dependencies.
Radix-Trie File Routing
Predictable file-system discovery with O(k) parameter resolution for static, dynamic, and catch-all routes.
Zero Cloud Lock-In
Free to self-host, deploy as a standalone Node.js daemon, run on bare-metal servers, or run in Docker containers.
The Kontyra Monorepo Packages
Zenor is organized as a modular TypeScript monorepo where each layer is strictly decoupled:
| Package | Version | Role & Capability |
|---|---|---|
| @kontyra/core | 0.1.0 | Canonical types, config schemas (defineConfig), and human diagnostic logs. |
| @kontyra/router | 0.1.0 | Radix-tree router with param extraction (:id) and wildcard catch-all matching. |
| @kontyra/renderer | 0.1.0 | Native h() Virtual DOM node creation, renderToString(), and streaming SSR. |
| @kontyra/runtime | 0.1.0 | Web Standard execution pipeline, middleware chains, and security header enforcement. |
| @kontyra/runtime-node | 0.1.0 | High-performance Node.js HTTP/HTTPS server bridge with full duplex stream support. |
| @kontyra/server | 0.1.0 | File-system route scanner, multipart body parser, and HTTP helpers (json, redirect). |
| @kontyra/database | 0.1.0 | Pluggable database interface with in-memory store and adapters for SQLite and PostgreSQL. |
| @kontyra/cli | 0.1.0 | Developer CLI engine powering zenor dev, zenor build, and zenor doctor. |
| create-zenor | 0.1.0 | Zero-configuration project scaffolding CLI. |
Scaffold a New Zenor App in 5 Seconds
Run the official project generator via npx:
# 1. Scaffold a fresh Zenor project
npx create-zenor my-app
# 2. Enter workspace
cd my-app
# 3. Start high-speed local dev server
npm run devProject Directory Layout
my-app/
├── public/ # Static public assets (favicon, images, robots.txt)
├── routes/
│ ├── index.js # Home page (SSR HTML / Native Virtual DOM)
│ ├── about.js # Static page (/about)
│ ├── users/
│ │ └── [id].js # Dynamic parameterized route (/users/:id)
│ └── api/
│ ├── hello.js # JSON API endpoint (/api/hello)
│ └── todos.js # In-memory database CRUD API (/api/todos)
└── package.jsonRadix-Trie File System Routing
Zenor maps files inside the routes/ folder directly to HTTP routes using a radix-tree index:
- • routes/index.js $\rightarrow$ GET /
- • routes/posts/[slug].js $\rightarrow$ GET /posts/:slug (accessed via
ctx.params.slug) - • routes/docs/[...catchall].js $\rightarrow$ GET /docs/* (wildcard catch-all match)
- • routes/api/auth.js $\rightarrow$ ANY /api/auth (method-specific handlers)
Lightweight Streaming Virtual DOM
Pages export a default component rendered via Zenor's native hyperscript function h():
import { h } from '@kontyra/renderer';
export default function UserProfilePage(ctx) {
const { id } = ctx.params;
return h('div', { class: 'container mx-auto py-12' },
h('h1', { class: 'text-3xl font-bold text-white' }, `User Profile #${id}`),
h('p', { class: 'text-gray-400' }, 'Rendered server-side with native Zenor VDOM streaming.'),
h('ul', { class: 'mt-4 space-y-2' },
h('li', null, '• Native streaming to HTTP socket'),
h('li', null, '• Zero external bundle dependencies')
)
);
}Web-Standard API Endpoints
API routes return standard Web API Response objects with typed bodies and custom status codes:
// routes/api/status.js
export function server(ctx, req) {
return new Response(
JSON.stringify({
status: 'operational',
framework: 'Zenor by Kontyra',
timestamp: new Date().toISOString(),
uptime: process.uptime(),
}),
{
status: 200,
headers: { 'Content-Type': 'application/json' },
}
);
}Universal Database Interface (@kontyra/database)
Zenor ships with an embedded in-memory memory driver for zero-setup prototyping, which seamlessly transitions to SQLite or PostgreSQL without modifying your application queries:
import { getDatabase } from '@kontyra/database';
const db = getDatabase(); // In-memory by default, or configured via zenor.config.js
export async function server(ctx, req) {
if (req.method === 'POST') {
const body = await req.json();
const item = await db.collection('tasks').insert(body);
return Response.json(item, { status: 201 });
}
const items = await db.collection('tasks').find();
return Response.json(items);
}Integrated Command-Line Suite
The zenor CLI provides developer diagnostics and lifecycle controls: