The landing page, the legal pages and these docs all come from one CMS, chosen with NEXT_PUBLIC_CMS.
| CMS | Content lives in | Editable from the admin panel | Best for |
|---|---|---|---|
constant | TypeScript constants and MDX files in packages/database/src | No | Content that changes with code reviews |
postgres | Tables in cms_schema, seeded from the constants | Landing page and docs | Most products: edit in the browser, no extra service |
A download keeps only the CMS you chose. The open-source repository keeps both; with NEXT_PUBLIC_CMS unset it uses Postgres.
The seed data
packages/database/src/constants/ holds the default content:
| File | Section |
|---|---|
navbar.ts | Name, logos, GitHub link, donate link |
hero.ts | Tagline, description, appointment link, code snippet, video, images |
features.ts, testimonials.ts, pricing.ts, faq.ts | Section headings and items |
footer.ts | Creator and footer links |
legal.ts | Terms, privacy, refund and contact details |
docs.ts | The documentation index: title, slug, category, order and MDX file of each page |
The documentation pages themselves are the .mdx files in packages/database/src/docs/.
pnpm seed writes all of it to Postgres under a landing page named after NEXT_PUBLIC_SAAS_NAME. Section items (hero images, features, testimonials, plans, FAQs, footer links) are replaced on every seed, and docs are upserted by slug, so do not re-seed a production database whose content you have edited in the admin panel unless you mean to overwrite it.
Editing in the admin panel
Admin → CMS (/admin/cms) edits the landing page with tabs for Navbar, Hero, Features, Testimonials, Pricing, FAQ and Legal. Images are uploaded through /api/cms/upload to your file storage. It works with the Postgres CMS; with constant the content is read-only.
Admin → Docs (/admin/doc) creates, edits, reorders and deletes documentation pages. Each page has a title, a unique slug, a category (type), an order number and Markdown content. It works with the Postgres CMS only.
Writes require the admin role on the server. The read-only demo guest can open both editors but cannot save.
How docs are rendered
Pages are rendered with react-markdown and remark-gfm, so you can use GitHub-flavored Markdown: headings, lists, tables, task lists, fenced code blocks and links. JSX components are not supported despite the .mdx extension. The sidebar groups pages by category, ordered by the lowest order in each category, and /landing/doc redirects to the first page. Every page is listed in the sitemap.
Link between pages with /landing/doc/<slug>.
Caching
With Upstash configured, the landing content and the docs index (titles, slugs, categories) are cached in Redis for an hour. Admin edits clear the cache, so changes appear immediately. If you change content directly in the database, it appears within an hour, or immediately after deleting the keys <name>-landing-page:cms:v1 and <name>-documentation:v1, where <name> is NEXT_PUBLIC_SAAS_NAME in lowercase.
Replacing these docs with your own
These SaaS Forge docs are seeded into every new project. To publish your own product docs:
- Postgres CMS, in the browser: delete or rewrite the pages in Admin → Docs.
- Postgres CMS, in code: replace the files in
packages/database/src/docs/, updatepackages/database/src/constants/docs.ts, and runpnpm seed. Seeding does not delete pages whose slugs you removed; delete those in the admin panel. - Constant CMS: replace the MDX files and
docs.ts; they are read at request time.
Some features link to specific doc slugs (the setup wizard links to overview, authentication-overview, postgres, storage and others in packages/ui/src/lib/constants/module.ts). Keep those slugs or update the links.
