@mosto-cms/admin
v0.1.0-alpha.3
Published
The Mosto CMS /admin interface: visual click-to-edit on the live site, forms for every field, languages side by side, history with undo and image/video uploads. React, no other dependencies.
Maintainers
Readme
@mosto-cms/admin
The /admin interface of Mosto CMS, made for people
who run a small business, not for developers:
- On the page: the site in a frame, in two modes. Edit (default): hover shows what can be changed, a click selects a text, a photo, a video or one photo of a gallery; texts are edited right on the page (Enter applies, Esc cancels) or in a side panel (a bottom sheet on phones), photos are replaced from the panel. Browse: the site works as usual, links included. E switches mode. Then Publish: all edits go out together as one commit.
- All content: every editable field as a form, grouped by page or list, with the site's languages side by side.
- History: recent publishes with Undo (
revert), asking again if something changed since. - Uploads: photos compressed in the browser (longest side 2400 px, WebP when accepted), size and type checked before sending.
- Plain-language errors (someone else changed this, session ended, file too big), English and Italian (from the browser, switchable), keyboard and screen-reader friendly, usable on a phone. A small "Powered by Mosto CMS" link that can be turned off.
It talks only to the site's own /api/mosto-cms route with the editor's session cookie and has
no dependency on any hosted service. With Next.js you do not use it directly:
createAdminPage() from @mosto-cms/next/admin mounts it. Elsewhere:
import { MostoAdmin } from '@mosto-cms/admin';
<MostoAdmin apiPath="/api/mosto-cms" siteName="Trattoria" editor={signedInEditorOrNull} pages={[{ path: '/' }]} />React 19. MIT licensed.
