Ligero

Build web apps
that weigh nothing

Ligero is a Java web framework with zero core dependencies, virtual threads, and an API that gets out of your way.

App.java
import com.ligero.Ligero;

public class App {
    public static void main(String[] args) {
        Ligero app = Ligero.create(8080);
        app.get("/hello/{name}", ctx ->
            ctx.json(Map.of("message", "Hello, " + ctx.pathParam("name") + "!")));
        app.start();
    }
}

Designed to be lightweight

Every feature is optional. Every default is secure. Every abstraction is leak-proof.

Fast by nature

Zero core dependencies. Java 21 virtual threads. Trie-router resolves in ~140ns even with 300+ routes.

📝

Simple API

Express-inspired handlers. Composable middleware. Error handling without ceremony or boilerplate.

🛡️

Secure out the box

OWASP security headers, request hygiene, CSRF protection. Production-ready from your first route.

🧰

Pluggable SPIs

Engines, JSON, templates, tracing — all via ServiceLoader. Swap implementations without touching your code.

🔄

Real-time capable

SSE in core. WebSockets via Jetty. Reactive features without the reactive complexity.

📊

Observable by design

Micrometer metrics, OpenTelemetry tracing, structured logs, and a live devtools dashboard.

Modular ecosystem

Add what you need. Leave the rest.

core — API, router, DI server-jdk — JDK engine server-jetty — HTTP/2, WebSocket json — Jackson mapper auth — JWT, CSRF, sessions openapi — OpenAPI 3, Swagger jdbc — SQL helper jpa — JPA/Hibernate redis — Rate-limit, sessions otel — OpenTelemetry validation — Bean Validation migrations — Flyway config-yaml — YAML + profiles templates — Mustache, FreeMarker, Pebble metrics — Micrometer devtools — Debug dashboard test — E2E testing processor — Compile-time DI
0
Core dependencies
~140ns
Route resolution
18
Optional modules
Java 21+
Virtual threads

Your code. No baggage.

No XML config. No heavyweight containers. No magic. Just modern Java, the way it should be.