minimalist framework for realtime, AI-Ready web apps
Find a file
2025-11-22 23:54:22 +00:00
backend Version 1.1.0 (see README for changelog) 2025-11-22 23:54:22 +00:00
frontend Version 1.0.0 (see README.md for details) 2025-08-27 22:15:13 +00:00
package.json Version 1.1.0 (see README for changelog) 2025-11-22 23:54:22 +00:00
README.md Version 1.1.0 (see README for changelog) 2025-11-22 23:54:22 +00:00

framerock

getting started

Install:

bun add 'git+https://git.daemons.my/dab/framerock.git'

Create your-app-entrypoint.js:

import { async_run } from 'framerock'

await async_run({
	jsbuild_app_frontend: async function () {return `
	FRAMEROCK_UTILS.setup_transport({
		on_open: () => FRAMEROCK_UTILS.transport_send_bytes(new TextEncoder().encode('Hello from client!')),
		on_message: (event) => document.body.appendChild(document.createTextNode('Client received message: ' + new TextDecoder().decode(event.data)))
	})
	`},
	handle_transport_bytes: function (message, { client_id, transport_send_bytes }) {
		console.log(['Server received message:', client_id, new TextDecoder().decode(message)])
		transport_send_bytes(new TextEncoder().encode('Hello from server!'))
	}
})

Run server:

bun run your-app-entrypoint.js

changelog

  • Version 1.1.0
    • added func_register_teardown, made jsbuild_app_frontend optional
  • Version 1.0.1
    • added handle_fetch_fallback
  • Version 1.0.0
    • page_title now defaults to "framerock app"
    • client_id now available inside handle_transport_bytes (added property to utils object)
    • ⚠️ BACKWARD-INCOMPATIBLE CHANGES ⚠️
      • handle_transport_bytes moved utils to be the final argument in function call (can be optionally consumed now)

built with framerock

  • theatrics, JS Actor System with first-class support for AI Agents and Assistants