prelo
Docs

Configuration & schema

One small file defines the whole CMS: cms.config.js.

cms.config.js

module.exports = {
siteName: "Noodleverse",
port: 3300,
site: "./web/site.js", // one-port mode — delete this line to go headless
types: { … }, // content model — see below
globals: { … }, // nav, footer — singletons
webhooks: { onPublish: "https://…/api/revalidate" },
};

One file, checked into the repo. Everything is optional; the defaults run a client site out of the box. Change it, restart, and the API and studio update — prelo check validates it and fails loudly with the exact fix.

Content types

types: {
// post + page are built in
menuItem: {
label: "Menu items",
fields: {
price: { type: "number" },
photo: { type: "image" },
heat: { type: "select", options: ["mild", "wild"] },
description: { type: "richtext" },
},
},
},

Each type gets a studio panel and API endpoints automatically — adding one is a config edit, never a code change. Field kinds: text, richtext, number, image, slug, select, list.

Globals and roles

Globals (nav, footer, contact details) are singleton types declared the same way. Roles are fixed and simple on purpose: admin manages users and settings, editor publishes, author drafts, viewer reads private types. API keys carry a role like any user — see Content API.