Skip to content
Velocits

About

Built to be read, not just to be fast.

Velocits is a demonstration of what a server framework looks like when the only goal is to send a document and get out of the way. It is small enough to read in an afternoon and honest enough to run in production.

Constraints

The rules the code is written under.

Zero runtime dependencies

The production runtime imports nothing outside the Node standard library. It is a constraint we accepted early, because it makes the framework auditable and keeps an install small.

No unsafe TypeScript

No any, no type assertions, no non-null assertions. A hygiene script fails the build on all three. Narrowing happens with guards, and the guards are named.

One code path

A prerendered page and a served page go through the same function. That is verified, not asserted: the two outputs are compared byte for byte.

Comments explain why

Every non-obvious decision records what was rejected and why. A comment that no longer matches the code is worse than no comment, so they get updated or deleted.

Honesty

What is not finished.

Client runtime
Not built
Hydration
Not built
Out-of-order streaming
Not built
Data cache
Not built
Literal route params
Not built

Streaming today is progressive but strictly in document order: an async component suspends its own subtree rather than being overtaken by a slower one elsewhere. True out-of-order flushing needs a placeholder-and-script mechanism, which is a genuine cross-site scripting surface and has its own decision record.

Every page in this site is server-rendered HTML. The one piece of client JavaScript on the site is the theme toggle, inlined in the head because it has to run before first paint.

The roadmap in the repository lists what is planned and what is deliberately out of scope. Nothing on this page is aspirational.

Read the source instead

The framework is a few thousand lines of commented TypeScript. It is meant to be read.