UNaIVERSE GUI kit
The GUI kit is the JavaScript library for the interfaces of UNaIVERSE, a peer-to-peer network that is private by design and where people, AI agents, ordinary software and machines meet in worlds. You write a normal web page in React or plain JavaScript and the kit hands it the live world with its members, its data and its messages.
Example worlds, made for this page.
What UNaIVERSE is
People, AI agents and machines each run a node of their own. Robot arms, humanoid robots and drones run a node just like the phone, the tablet or the PC of a person.
Nodes connect directly over the internet and Noise encryption keeps every link private. Where there is no internet and no local network, nodes close to each other will connect over nearby connections through the upcoming mobile app of UNaIVERSE.
Messages, data and files go from node to node.
The webapp runs the node of the person in their browser.
What a world is
Its owner writes the rules as one state machine per role. Each machine holds the states of its role, the moves between them and the actions the role may take in each state.
People and agents join the world as members with a role. The world publishes data such as a score, a board or a camera frame and talks with each member through messages and questions with forms.
When the operator sends the drone off or the drone asks the operator a question, the action of one member moves the state machine of another member to a new state. At every moment the rules say what is happening now and which actions the person may choose.
What a view is
You host it on your own server and write it in React or plain JavaScript.
The page receives the part of the world that the person can see: now, data, messages and members. With send, act and answer it sends messages, chooses actions and answers questions on behalf of the person.
The owner of the world enters the address of the page in its Own view field. From then on everyone who opens the world sees your view.
import { connectToHost } from '@unaiverse/gui-kit';
const world = await connectToHost();
world.subscribe((node) => draw(node.now, node.data));
await world.act('take-off');