Giper Baza is a separate, optional project — not a built-in part of $mol. Its authors describe it as a decentralized, high-availability database with conflict-free real-time synchronization: a CRDT store that persists locally and replicates between clients without a central server, with digital signatures and end-to-end encryption. You never need it to build a $mol app; reach for it only when several clients or devices must share the same live data.Just want your app to keep working without a network? That is plain offline, and $mol handles it with a service worker — see Offline. Giper Baza is the next step up: syncing data between clients, not caching one client's assets.When you do model data with it, entities look like ordinary reactive properties, and replication just happens.This page introduces the shape of the API. Giper Baza is a large topic — treat this as a map, not the full territory.
An entity is a pure schema — a set of typed fields. Keep behaviour out of it; do the reading and writing in your views.1namespace ${2export class $my_taskextends$giper_baza_entity.with({3Title:$giper_baza_atom_text,4Done:$giper_baza_atom_bool,5CreatedAt:$giper_baza_atom_time,6}){}7}Each field is an atom — a synced cell with a typed value.
Get the store, reach a list of entities, and map over them reactively:1@ $mol_mem2tasks(){3return this.tasks_list().remote_list()4}56@ $mol_mem_key7task_done(id:string,next?:boolean){8const task=this.task(id)9if(next!==undefined)task.Done(null)!.val(next)10return task.Done()?.val()??false11}Reading Done()?.val() gives the current value; writing Done(null)!.val(next) sets it. Any view reading the atom re-renders when it — or a remote peer — changes it.