Overview
/ Scope
- JVM HTTP server bootstrap
- Fluent routing DSL (no annotations)
- Request handler dispatch
- Minimal configuration surface
Highlights
01
Annotation-free routing DSL — the full flow is visible from the call site
02
JVM idioms explored: sealed types, records, explicit null handling
03
Simplicity-first design — a study in constraint, not a production framework
/ Tracks
- Research
- Open source
The Problem
Coming from Node.js, JVM web frameworks felt heavier than they needed to be. I wanted to understand what a minimal, Javalin-like API would look like if I built it myself — and what specific trade-offs Javalin makes that produce such a clean surface.
Approach
Pick a small, opinionated subset of Javalin's API (routing, handlers, JSON) and rebuild it from scratch. The goal is not to ship — it's to learn which JVM idioms force which API shapes, and whether the same patterns from TypeScript translate or have to be reimagined.
Key Decisions
- 01
Fluent routing DSL
`app.get("/users", ctx -> ...)` reads cleanly. The implementation is a small registry plus a dispatcher — simple enough to read the whole thing in one sitting.
- 02
No annotations
Kept the framework annotation-free to make the request flow traceable from call site to handler. Stack traces point at user code, not at reflection machinery.
Challenges & How I Solved Them
JVM ergonomics vs TypeScript ergonomics
/ Problem
Patterns that are trivial in TypeScript — union types, narrow utility types, optional chaining — don't have direct JVM equivalents. Forcing them produces awkward APIs.
/ Solution
Leaned into JVM idioms: sealed types and records where they fit, explicit null handling instead of optionals. Accepted that some APIs look different from their TS equivalents rather than forcing a translation.
Outcomes
- A concrete intuition for Javalin's specific design choices and what they cost
- Comfort writing small, intentional JVM code — less framework, more language
What I Learned
- 01
Rebuilding a framework to study it is faster than reading about it — you encounter the actual trade-offs, not descriptions of them.
- 02
Simplicity in an API is a design output that emerges from many constrained decisions. It is not a starting point.
Tech Stack
/ Inspired by
- Javalin
Next Steps
- Write a short comparison post: Axiom vs Javalin — what's similar, what's different, and why the differences exist