Changelog
All notable changes to the genga and @genga-cms/* packages, which share one version.
The format follows Keep a Changelog, and the project uses
Semantic Versioning.
[Unreleased]
Added
- A light theme for the admin (GNG-52). The admin follows the color scheme of the system, and
each person can choose System, Light or Dark at the bottom of the sidebar, next to the
language. The server sets the theme from the
genga-admin-themecookie, so the page shows in that theme with no flash. The live preview keeps the color scheme of the system. Both themes meet the WCAG 2.2 AA contrast ratios, and the admin e2e checks them with axe and on the color tokens. In the dark theme, the danger color is lighter, with dark text on it: the old red was below 4.5:1 as text and under white text. @genga-cms/react-router(GNG-29):gengaResourceRoute(genga)gives theloaderand theactionof one splat resource route per Genga path, andloadPage(genga, request, collection, slug)gives the document of a page in the public shape, a 301 for a renamed slug, or a 404, with the cache headers. Peerreact-router^7.18.4 || ^8.5.2.@genga-cms/react:Blocks,defineBlockComponents,RichTextandusePreviewDatafor React sites that read the public shape (PublicDocument).@genga-cms/node:toNodeListener(genga, { fallback }), a listener fornode:httpand a middleware for Express. It reads the body as a stream, so mount it before any body parser.examples/react-routeruses@genga-cms/react-routerand@genga-cms/react, and gives the block components withdefineBlockComponents.@genga-cms/nuxt, the Nuxt module (GNG-6).useGengaPage(collection, slug)reads a page through a server route of the module, forwards the Genga headers, answers 301 for a renamed slug and 404 for a missing page. In a preview, the document follows each keystroke of the editor. Remote reads stay in an in-memory cache with their Genga cache tags; the webhook route checks the signed publish webhooks, purges the tags and calls the Nitro hookgenga:event.<GengaBlocks>and<GengaRichText>render the blocks, each in its own error boundary.handlePathsserves the admin app and the media from the Nuxt server in embedded mode. Seepackages/nuxt/README.mdandexamples/nuxt.@genga-cms/sveltekit, the SvelteKit adapter (GNG-7).gengaHandle(source)is thehandlehook: it receives the signed publish webhooks and purges their cache tags, and in embedded mode it serves the admin app and the media withgenga.handle.loadPagereads a page in aloadfunction, sets the Genga headers, redirects a renamed slug with 301 and throws a 404.createRemoteSourcekeeps the published reads in memory with their cache tags.<Blocks>renders each block in a<svelte:boundary>, andgengaPreviewgives the live draft of the editor to Svelte blocks. Seepackages/sveltekit/README.mdandexamples/sveltekit.@genga-cms/astro, the Astro adapter (GNG-5).loadPagereads a page in the frontmatter, forwards the Genga headers and puts the page in the route cache of Astro with its cache tags.webhookEndpointchecks the signed publish webhooks and purges the tags.<Blocks>,<RichText>and<GengaPreview>render the blocks and connect the preview, which renders the draft on the server after each autosave.gengaEndpointserves the admin app and the media from the Astro server in embedded mode. Seepackages/astro/README.mdandexamples/astro.- Embedded mode of
@genga-cms/next(GNG-28): Genga runs inside the Next.js server.withGenga(nextConfig)(from@genga-cms/next/config),gengaRoute(genga)for the admin, media and MCP route handlers,gengaInstance(create)for one instance per process, andcreateEmbeddedSource(genga): published reads in the Data Cache with the Genga cache tags, and arevalidateTagat each publish. The preview uses the admin session of the same origin: thegenga-previewcookie holds the document id only. examples/nextruns in both modes (GENGA_URLchooses remote mode), and its end-to-end tests run in both modes in CI (E2E_MODE).
Changed
- The server image runs on
node:httpwith@genga-cms/node, without React Router, React and React DOM. Its entry isdist/server.mjs. The settings, the paths and the health routes do not change.
Deprecated
genga.published.loadForRoutelogs one warning per process. Usegenga.resolveRoute(request, collection, slug), orloadPageof@genga-cms/react-router. It leaves at 1.0.
[0.4.0] - 2026-11-30
Added
- The admin API serves the data of every admin screen and the sign-in forms, for the prebuilt
admin (GNG-27):
GET <adminPath>/api/views/<screen>,GET|POST <adminPath>/api/session,GET|POST <adminPath>/api/setupandGET|POST <adminPath>/api/consent. They keep the session, origin, login limit and role checks of the route modules. Seedocs/configuration.md#the-admin-api-of-the-admin-pages. - A Content Security Policy on the admin pages, without
'unsafe-inline':default-src 'self'; script-src 'self'; style-src 'self'; …; frame-ancestors 'none'. Seedocs/security.md#admin-responses. adminApp: falseoption:genga.handleleaves the admin pages to the route modules of 0.3.adminAssetsDiroption: another directory for the admin app.StorageAdapter.deliveryOrigins: the origins of the signed media URLs, for the admin CSP.s3StorageAdaptersets it withdelivery: 'signed'.- End-to-end tests of the admin with Playwright, in CI: setup, login, editor and live preview,
publish, versions, media, invitation, token, OAuth consent, a custom admin path, and no CSP
violation (
pnpm test:e2e:admin). genga.getUser(request): the signed-in admin user of a request, for the site in embedded mode. Seedocs/configuration.md#embedded-mode.- The admin in English and French (GNG-12). English is the default;
adminLocale(orGENGA_ADMIN_LOCALEon the server image) sets the language of the config, and the language menu of the admin app lets each person choose for their browser. Dates, times, numbers and file sizes follow the language. The admin API translates its error and validation messages withAccept-Language. The texts are ICU messages in JSON locale files (packages/genga/src/i18n/locales/<language>/*.json), English as the source; translations go through git8n (seeCONTRIBUTING.md). A key that a language does not hold shows in English. Seedocs/configuration.md#the-admin-language. validate()takes an optionallocale.GengaErrorhaslocalized(locale).
Deprecated
genga.admin.*, the route components ofgenga/adminandgenga/admin.css: route<adminPath>/*togenga.handle(request)instead. They still work and log one warning per Genga instance; they leave at 1.0. Seedocs/migrate-to-admin-app.md.
Changed
- The admin is in English by default (GNG-12). A site that wants the French admin of 0.3
sets
adminLocale: 'fr'(orGENGA_ADMIN_LOCALE=fr). The deprecated route modules follow this setting. The messages ofGengaError(error.message), of MCP and ofvalidate()are in English; the admin API answers in the language of the request. - The admin is a prebuilt single-page app (GNG-27).
genga.handleserves its HTML shell on every path underadminPath, and its hashed assets under<adminPath>/_app/with a cache of one year. The shell has no inline script, and reads the admin path from a meta tag, soadminPathstays a runtime option. A site mounts one route per Genga path that callsgenga.handle: no admin route modules, nogenga/admin.csslink, nodata-genga-admininroot.tsx. Login, setup and invitation links, and the OAuth consent page are pages of the app. Seedocs/configuration.md#the-admin-app. Migration: a site that callsgenga.handlefor every request (in a middleware) and keeps the admin route modules of 0.3 now gets the admin app on its admin pages. SetadminApp: falseto keep the route modules. A site that routes only<adminPath>/api/*togenga.handlesees no change. - The admin pages send
frame-ancestors 'none'(was'self'): no page can frame the admin. react-routeris an optional peer dependency ofgenga: only the deprecatedgenga/adminneeds it.- The example app and the server image use the admin app. The server image ships
dist/admin-appand has no admin route module. - The editor turns off the style element of TipTap (
injectCSS: false):genga/admin.cssholds its rules. genga.admin.*no longer importsreact-router: its loaders and actions throw a plainResponse, which React Router reads as a redirect or an error response, as before.
[0.3.0] - 2026-11-28
Added
- New package
@genga-cms/next, for the Next.js 16.4+ App Router in remote mode (GNG-4).createRemoteSourcecaches published reads in the Data Cache with the Genga cache tags (one hour at most).loadPagegives the published page, a redirect or not found, and the draft in Draft Mode, and keeps public pages static.webhookRoutechecks the signed webhooks and revalidates their tags.previewRouteis the preview entry route: it checks the preview token with the server, turns Draft Mode on and keeps the token in anHttpOnlycookie,Partitionedin production so that the preview works in an admin on another site (Safari).GengaPreviewBridgein the root layout connects the preview pages to the editor.BlocksanddefineBlockComponentsrender the blocks: Client Component blocks follow each keystroke in the preview, Server Component blocks refresh after each autosave.usePreviewDataandRichText. Seepackages/next/README.mdandexamples/next. s3StorageAdapter(): media files in an S3-compatible bucket (AWS S3, Scaleway, MinIO), withproxy,publicorsigneddelivery. The server image readsGENGA_S3_*. With S3, several server replicas share the files.StorageAdaptergains the optionalpublicBaseUrlandsignedUrl, andputan optionalcontentDisposition.relationfield: a link to one document (relation({ to })) or a list (multiple,maxItems). The editor searches the target collection in an accessible combobox.populate, the public API,genga/remoteand the preview give the published version of each target, with its media; its own relations stay{ id, collection }. Publish refuses a deleted target. A change to a target clears the cache and carries the tags of the collections that point to it. The MCP tools describe the value format. TheETagof a published document now includes a hash of its data.- Scheduled publish and unpublish: « Programmer » in the editor,
PUT <adminPath>/api/documents/:id/schedule, thescheduleroption andgenga.runSchedules(). One process runs the due actions at a time, with the normal events, webhooks and audit entries. Migration0005_schedules. Seedocs/configuration.md#scheduled-publish. - OAuth 2.1 sign-in for the MCP endpoint, as the MCP authorization specification 2026-07-28
describes it: protected resource metadata, authorization server metadata, client ID metadata
documents, dynamic client registration, PKCE (S256), refresh token rotation and a consent
page in the admin (
OAuthConsentPage). A client signs in from its own window, with no token to copy. The rights stay the scopes and the role of the user, both. The tokens page lists the connected clients and disconnects them. On with themcpoption;mcp.oauth: falseandGENGA_MCP_OAUTH=offturn it off. Personal tokens (gga_) keep working. Migration0006_oauth. Seedocs/mcp-oauth.md. genga.handle(request, context?): one Fetch handler for the admin API, the media files, the public API and the MCP endpoint. It returnsnullfor other paths, waits forready(), and answers503when the database is not reachable.context.peerAddressappends the TCP peer toX-Forwarded-Foras one more proxy hop. Genga refuses to start when its paths overlap.- The public API v1 moves from the server image into
genga/server. ThepublicApioption turns it on ingenga.handle(off by default). The server image now serves it, the media, the admin API and MCP throughgenga.handle. mediaPathoption (default/media): media URLs andgenga.handlefollow it.- The
mcpoption takespathandfalse. MCP is off ingenga.handleunless the option is set. - Public API: the
301of a renamed slug also givespath, the site path of the new slug. - Publish events:
document.published,document.unpublished,document.deleted,document.slug_changed,media.updatedandmedia.deleted, with the cache tags to invalidate:genga:c:<collection>andgenga:d:<collection>:<slug>for a document,gengafor a media item.genga.events.on()runs listeners after the commit.tagsFor()gives the same tags to reads. Seedocs/events.md. - Signed webhooks in the Standard Webhooks format (
webhooksoption,GENGA_WEBHOOKSon the server image), from an outbox table with retries and backoff for 24 hours. Migration0004_events.verifyWebhook()checks them on Node and edge runtimes. - Public API:
GET /api/v1/events?after=<id>lists the events of the last 7 days. - Content source:
GengaSourcewithgetDocument,listDocuments,resolveRoute,getDraft,sitemapandtagsFor, in the public shape.createGenga()implements it in embedded mode (preview by session).createRemoteSource()from the new entrygenga/remoteimplements it over the public API, withfetchonly (edge-safe; preview by token, checked by the server). Seedocs/content-source.md. - Public API:
GET /api/v1/sitemap. - Preview on another origin:
connectPreviewremovesgenga-tokenfrom the address bar and keeps it in memory (connection.token(),previewToken(id)). The editor renews the token with thegenga:tokenmessage, and sendsgenga:savedafter each autosave (onSavedinconnectPreviewandusePreviewData). - Editor: blocks move by drag and drop, with a handle on each block. With the keyboard, Enter on the handle starts the move, Tab chooses the target block and Enter drops; a screen reader hears each step in French. The Monter and Descendre buttons stay (GNG-22).
headoption ofusePreviewData,connectPreviewandconnectBridge: the preview frame updates<title>and the meta tags at each draft, like the content (GNG-23).
Changed
- MCP
upload_mediawith aurldownloads only from ports 80 and 443, for the URL and each redirect. TheuploadPortsoption ofmcp(GENGA_MCP_UPLOAD_PORTSon the server image) changes the list. - Preview responses (
PREVIEW_HEADERS,loadForRoute) also sendReferrer-Policy: no-referrerandX-Robots-Tag: noindex.
Deprecated
genga.api,genga.mcpandgenga.media.serve: usegenga.handle. Each logs one warning per process. They leave at 1.0.
Fixed
- The admin showed « Inconnu » or « — » as the author when the account had no name. It now shows the email of the account, also when the account is disabled (GNG-9).
- In the Versions drawer, the « Enregistrer une version » button went past the edge of the drawer and was cut, at all widths. The button is now below the note field (GNG-8).
- For a preview on another origin, « Ouvrir l’aperçu dans un nouvel onglet » gets a new preview token at the click. Before, the tab could open with an expired token and answer 401 (GNG-20).
- Server image: a POST to the MCP path with an
Originheader of another origin got the400of React Router before the origin check of MCP. The server now sends the MCP path togenga.handlefirst: an origin ofGENGA_ALLOWED_ORIGINSpasses, another one gets403.
[0.2.0] - 2026-11-24
Added
- MCP server:
genga.mcp(request), a fetch-style handler for the Model Context Protocol over Streamable HTTP (stateless). 13 tools (collections, documents, drafts withdraftRev, publish, versions, media with an SSRF-safe URL upload, preview URLs), the resourcesgenga://collections/{name}/schemaandgenga://documents/{id}, and the promptwrite_article. Writes go through the admin services and the audit log, withvia: "mcp"and the token id. Seedocs/mcp.md. - Personal access tokens (
gga_…, stored as SHA-256) with the scopesread,writeandpublish, an expiry, and a « Jetons d’accès » page in the admin for every role. The rights of a token are its scopes and the role of its user, both. Disabling a user revokes its tokens. Migration0003_api_tokens. The page needs a new admin route,tokens(TokensPage,genga.admin.tokens). - Headless server:
/mcp, withGENGA_MCP(onoroff) andGENGA_MCP_PATH. - Headless server: the Docker image
ghcr.io/sakuga-software/genga(apps/server) runs the admin, a public read API under/api/v1and the media, with a JSON or.mjsconfig file. - Public API v1: collections and their schemas, documents by list, slug and id, media
metadata, and drafts with a preview token. Published content only, ETag and
304, CORS from an allow list, a rate limit per client address. Seedocs/api.mdanddocs/openapi.yaml. - Blocks without a component (
defineBlockwith a schema only). - Previews on another origin:
previewUrlon a collection,previewOriginsandpreviewSecret(GENGA_PREVIEW_ORIGINS,GENGA_SECRET), signed preview tokens valid 10 minutes for one document. genga/previewwithconnectPreviewfor any framework, also ingenga/client.usePreviewDatatakes anadminOriginoption.richTextToHtmlandtoPublicDataingenga.adminPathoption andGENGA_ADMIN_PATH: the admin can live under another path.mediaResourcePolicyoption for theCross-Origin-Resource-Policyof/media/*.siteLinkoption (GENGA_SITE_URLon the server) for the link “Voir le site” of the admin.
Changed
- The peer range of
react-routeraccepts React Router 8 (^7.18.4 || ^8.5.2). React Router 8 needs Node 22.22 or later. The headless server and the example use React Router 8 and Vite 8. - The admin loaders return
adminPath. A document of the admin haspreview(its preview URL and origin, ornull).
[0.1.0]
First public release.
- Collections, fields and blocks defined in code with
defineConfiganddefineBlock. - Postgres storage with expand-only migrations and the
genga-migratecommand. - Admin for React Router v7: dashboard, collections, document editor with live preview, versions, media library, users and invitations.
- Roles
admin,editorandauthor, with overrides per collection. - Published reads with an in-process cache, slug redirects and a sitemap helper.
genga/client:RenderBlocks,RichTextandusePreviewDatafor any React site.- Compiled admin stylesheet (
genga/admin.css): no Tailwind setup in the app.