# HyperclayJS
> HyperclayJS is a modular JavaScript library for building malleable HTML files on [Hyperclay](https://hyperclay.com) — self-contained HTML files that use the DOM as their database, can modify themselves, and save changes back to the server.
## How It Works
Hyperclay apps use HTML as both the front end and the database. When the page changes, HyperclayJS grabs the DOM, strips admin-only controls, and POSTs the clean HTML to the save endpoint. Anonymous visitors see a static, read-only page. When the owner loads the page, edit controls are restored.
This is the **save lifecycle**: change → strip admin UI → save → restore admin UI on load.
## Quick Start
```html
```
One script tag gives you: auto-save on DOM changes, edit/view mode toggling, form persistence, DOM helpers, UI dialogs, and more. Start simple with jQuery or vanilla JS for DOM manipulation — HyperclayJS handles the save lifecycle automatically.
## Key Concepts
**Edit Mode vs View Mode** — Every page has an `editmode` attribute on `` set to `true` or `false`. Use `option:editmode="true"` on any element to show it only for editors.
**Persist** — Add `persist` to any ``, `