No JavaScript. No npms. Make realtime web apps in modern Java

v4d1mv1 pts0 comments

GitHub - vadimv/server-components: Admin Panels and Enterprise Tools UI Toolkit for Java Teams · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

vadimv

server-components

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>57

master

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>1,365 Commits<br>1,365 Commits

.github/workflows

.github/workflows

ai-agent

ai-agent

authorization

authorization

compositions

compositions

core

core

examples

examples

jetty-web-server

jetty-web-server

js-client

js-client

schema

schema

servlet-api

servlet-api

.gitignore

.gitignore

Dockerfile

Dockerfile

LICENSE

LICENSE

README.md

README.md

pom.xml

pom.xml

View all files

Repository files navigation

Java UI for Admin Panels and realtime web apps

This is a pure-Java toolkit for stateful, server-rendered live applications like admin interfaces and internal tools.

Try the Live Admin Panel Demo

No need for writing JavaScript / JSX and rely on thousands of transitive npm dependencies.

No need for REST endpoints, frameworks like React, frontend build steps and managing client-side state.

Server-Side-Rendering (SSR) architecture like in Elixir Phoenix LiveView, Blazor Server but for Java.

Software Engineers: build UIs in plain modern Java with no annotations and implicit control flows; components can be tested in isolation.

The Java HTML DSL is linear and composable. That makes it easy for coding LLMs (like Claude or Codex) to generate valid DSL HTML and a component tree.

At runtime, the AI agent natively understands the application's structure, navigates the UI, and queues up the actions with Human-in-the-loop for approvals.

This project aims for zero third-party runtime dependencies.

What does the code look like?

view = newState -> state -><br>html(<br>body(<br>h1("Current count: " + state),<br>button(on("click", _ -> newState.setState(state + 1)),<br>text("Increment"))<br>);

final var server = new WebServer(8080, _ -> new InitialStateComponent<>(0, view));<br>server.start();<br>server.join();<br>}">import rsp.component.View;<br>import rsp.component.definitions.InitialStateComponent;<br>import rsp.jetty.WebServer;

import static rsp.dsl.Html.*;

public final class Counter {<br>static void main(final String[] args) {<br>final ComponentViewInteger> view = newState -> state -><br>html(<br>body(<br>h1("Current count: " + state),<br>button(on("click", _ -> newState.setState(state + 1)),<br>text("Increment"))<br>);

final var server = new WebServer(8080, _ -> new InitialStateComponent<>(0, view));<br>server.start();<br>server.join();

This is a complete runnable interactive web application. For more examples check the examples/README.md.

Getting started

Want to skip the local setup? Play with the live demo here.

Prerequisites

Java 25 -- virtual threads, sealed interfaces and pattern matching

Maven 3.9

Clone the repository

git clone https://github.com/vadimv/server-components.git<br>cd server-components

Build the project

mvn install

Run the included admin example

mvn exec:java -pl examples -Dexec.mainClass="rsp.app.posts.CrudApp"

Open http://localhost:8085, click Sign in, and explore the Posts/Comments admin app.

By default, CrudApp uses RegexAgentService, a deterministic regex-based agent stub included in the repository. It is meant for demos and local validation, so you can try the AI workflow without setting up Anthropic, Ollama, or any other LLM backend.

Try a few prompts

open comments

go to page 2

open comments and go to page 2 and select all

Generate your own admin app

Once you've run the example, open your favorite AI coding assistant in the project root and paste a prompt like this:

Read examples/src/main/java/rsp/app/posts/CrudApp.java.<br>Generate a similar realtime admin tool for managing Employees and Departments.<br>Create mock services and a new EmployeeAdminApp.java using the same routing, composition, and AI-agent integration patterns.

Upgrade to a full LLM agent

When you're ready, run CrudApp with -Dai.agent=claude or -Dai.agent=ollama and connect your preferred model...

server java admin agent state examples

Related Articles