Skip to content

Class-based SPAs. No bundler.

JOPS is a lightweight SPA framework built on native ES modules, with views and a lifecycle inspired by Android. No Webpack, no Babel, no compiler — just a script tag and a browser.

A JOPS screen is a class. Its layout is plain HTML, events bind to methods by name, and the framework calls lifecycle methods you already know from mobile development.

src/Profile.js
import { View, Store } from "jops-core";
export default class Profile extends View {
async onLayout() {
// the layout is in the DOM: read initial data
this.user = await fetch("/api/me").then((r) => r.json());
}
onResume() {
// the view comes to the front
this.get("name").set(this.user.name);
}
onSave() {
Store.singleton().set("user", this.user);
}
}

No build step

Native ES modules and an import map. Edit a file, reload the page. Ship the same files you write.

Class-based views

Every screen and component extends View. Inheritance, composition and encapsulation work the way they do in Java, C#, Kotlin or Swift.

Android-style lifecycle

onLayout(), onResume(), onPause(), onBackPressed() — called by the framework at the moments you expect.

Routing built in

Flat hash routes declared in HTML, stacked views with navigate(), slide and fade transitions, and an opt-in screens mode for app-like layouts.

Shared data and events

A Store singleton for shared data and an EventBus with subscriptions that clean up when their view is destroyed.

Safe by default

The layout template tag escapes every value. Opt out explicitly with raw() for trusted HTML.

One framework, the same views, many hosts.

No bundler OOP classes Declarative view nesting No element registration
JOPS ✅ ✅ ✅ ✅
Lit ✅ ✅ ⚠️ Web Components only ❌
Stimulus ✅ ✅ ❌ ✅
Alpine.js ✅ ❌ ❌ ✅
Angular ❌ ✅ ✅ ✅
Svelte ❌ (compiler) ✅ ✅ ✅

JOPS is made for teams building internal tools, dashboards, embedded WebViews, hybrid mobile apps and desktop apps who want a structured, class-based front end without the bundler toolchain. It doesn’t replace React: in a Next.js app, a JOPS SPA runs next to your React pages and uses Next.js as its backend.

Terminal window
npm init -y
npm install jops-core
npx jops-core init