Getting started
Introduction
What Polaris CMS is, what it adds to an Astro or Next.js site, where it runs today and which code these docs describe.
Polaris CMS is an agentic CMS: a blog CMS built so that AI agents can do the publishing work through its API while a person stays in charge in the admin. It lives inside your site, not next to it, and adds three things to an Astro or Next.js project:
- an editor at
/studio, signed in with one admin account; - a JSON API at
/api/cms/*that the admin and your scripts or AI agents share; - a handful of tables in PostgreSQL: posts, their backups, uploaded images and API keys.
Your own pages read the published posts from the same database and render them with your own templates. There is no separate CMS server, no storage bucket and no external service to sign up for.
What you get#
- An editor with a live SEO score. Markdown with write, split and preview modes, and a panel that runs 11 on-page checks as you type.
- Markdown that stays safe. GitHub-flavoured Markdown with tables and footnotes. Raw HTML is dropped, so text written by an agent can't inject markup. The newest version adds code highlighting, figures with captions and chart blocks.
- Scheduling without a cron job. A scheduled post is public from its publish time, because every public query checks the time itself.
- Two languages per site in the newest version: posts carry a language and can be paired with their translation.
- A media library in Postgres. Uploads are converted to WebP and served from
/media/…with a one-year immutable cache header. - Link tools. Internal-link suggestions while you write, a link manager, a pillar and cluster graph, and an orphan and broken-link audit.
- SEO plumbing. RSS, a live sitemap, share images, JSON-LD, IndexNow pings on publish and Google Search Console checks from the admin.
- Backups. A snapshot of the previous version on every save and delete, a daily full backup and restore from the admin.
- An API for agents. Bearer API keys created in the admin and stored hashed. Seven post actions and an upload endpoint cover the whole publishing job.
Where it runs#
Polaris started as the CMS inside PolishPal, where it got its name. It was later ported to Astro and Next.js and now runs six sites: PolishPal, PlantAlong, Olfaria, Grzybolog, Yolkday and scentro.pl itself. The admin URL stayed /studio everywhere.
Status#
Polaris CMS is not an installable package yet. It is open source under the MIT license; the public GitHub repository and the npm packages are in preparation (see the roadmap). Today the code exists inside those six sites and as the Polaris CMS kit, which is available on request.
Which code these docs describe#
There are three versions of the code today. These docs follow the newest Astro version (the one running scentro.pl), and say so whenever the kit versions differ.
| Newest Astro | Astro kit | Next.js kit | |
|---|---|---|---|
| Framework | Astro 7.4 with @astrojs/node |
Astro 7.4 with @astrojs/node |
Next.js 15.5, App Router |
| Languages and translation pairs | Yes | No (one language) | No (one language) |
| Markdown renderer | unified + lowlight: code highlighting, figures with captions, chart blocks | react-markdown + GFM | react-markdown + GFM |
| SVG uploads | Rasterised to lossless WebP | Not accepted | Not accepted |
Due posts flipped to published and daily backup |
On its own, no cron | Via GET /api/cron/daily |
Via GET /api/cron/daily |
| Admin under a strict CSP | Yes, no unsafe-inline |
No, the shipped CSP allows inline | No, the shipped CSP allows inline |
| Comments with moderation, ad slots | No | Yes | Yes |
| Extra API | none | none | set-highlight action, contact inbox |
| API key prefix | sc_ |
cms_ |
cms_ |
| Session secret variable | STUDIO_SESSION_SECRET |
none | SESSION_SECRET |
| Migrations | migrations/*.sql |
migrations/*.sql |
drizzle/*.sql |
In every version a scheduled post becomes public at its publish time; the differences above are only about housekeeping. The v1 packages will start from the newest version.
Stack#
Astro or Next.js for the site, React 19 for the admin UI, Drizzle ORM over postgres.js, PostgreSQL 16 or newer, sharp for images. Migrations run when the app starts, and the whole thing fits in one Docker image. Node APIs (node:crypto, sharp, postgres.js) mean it needs a Node runtime, not an edge runtime.
Open source under MIT. Public release on GitHub and npm in preparation. Roadmap.