{{/}}

Lynnix

File-based routing for htmx

File-based routing ยท htmx-native

The missing backend for htmx applications

Lynnix is a file-based routing and SSR middleware for Node.js. Drop your files in the right place, export a function, and get routing, rendering, middleware chains, htmx-aware partial responses, and error boundaries โ€” all wired together automatically.

Filesystem routing

Static, dynamic, and catch-all routes from your directory structure. No config required.

htmx-aware

Detects htmx requests automatically and serves fragment.html instead of page.html.

Framework-agnostic

Works as middleware with Express, Fastify, or bare node:http. Mount it anywhere.

server.js
Lynnix
import { createLynnixApp } from "lynnix";
import express from "express";

const app = express();
const handler = await createLynnixApp("app");

app.use(express.static("public"));
app.use(handler);

app.listen(3000);

0

Config files

htmx

First-class support

SSR

Powered by Mutor.js

Install

npm i lynnix
yarn add lynnix
pnpm add lynnix

Why Lynnix

Structure for htmx apps without the framework overhead.

htmx brings back the simplicity of server-rendered HTML. Lynnix gives it the routing and rendering layer it deserves โ€” file-based conventions, automatic partial responses, and error boundaries, all built on Mutor.js.

Read the guide

Get up and running fast

Start with installation, project structure, and file conventions. You'll have a working app before you finish the getting started page.

Routing & loaders

Files are your routes

Static, dynamic, and catch-all segments resolve by specificity at startup. Export named functions for each HTTP method and return data directly to your templates.

Reference

Request, response, and htmx APIs

Full reference for LynnixServerRequest, LynnixServerResponse, and every htmx response header method โ€” retarget, reswap, trigger, push, and more.

Ready to try it?

Build your first htmx app in minutes.

Install Lynnix, create an app directory, add a page.html and a loader.js, and you have a working server. Everything else builds from there.