Skip to main content

Sardine CMS admin panel: FastAPI API + server-rendered UI

Project description

sardine-cms-admin

The Sardine CMS admin panel: an authenticated FastAPI application serving both the admin API and the server-rendered UI (ADR-0013). It drives cms-core, cms-validation and cms-build through their public APIs — storage comes from create_storage(url), so every supported engine works unchanged.

pip install sardine-cms-admin
SARDINE_STORAGE_URL="sqlite:///content.db" uvicorn --factory cms_admin.app:create_app

The panel itself is multilingual (ADR-0022): each editor picks their language in the user menu (PT-PT, ES, FR and DE ship alongside English), with the browser's language as the fallback.

There are no default credentials — create the first account with the CLI, then sign in at /login:

cms admin create-user editor-in-chief -p my-project --role admin

The UI is built on AdminLTE 4 (MIT, vendored verbatim with its license — ADR-0017) and implemented exactly as its reference pages do: Source Sans 3 (OFL), Bootstrap Icons (MIT) and the theme's own behavior scripts (AdminLTE, Bootstrap bundle, OverlayScrollbars — ADR-0020) all ship as local files; the admin serves everything itself, no CDN, no inline scripts. The dashboard shows content by workflow status, the translation coverage matrix and a live validation report. Articles and pages are edited in the browser: EN source plus a side-by-side editor per translation, with state indicators from the checksum model and a preview rendered by the builder's own Markdown renderer (raw HTML disabled). The media library uploads with server-side validation (MIME sniffed from bytes, size limit, parsed image dimensions), manages mandatory EN + translatable alt text, and refuses to delete assets that articles or sections still reference. The workflow moves content through draft → review → published → archived with each transition owned by a rung of the role ladder; publishing runs the validation gate. The Publishing panel previews into /preview/ and builds/exports the project output with target extras, with every run recorded on the dashboard.

Configuration is environment-only (no config files with secrets):

Variable Meaning Default
SARDINE_STORAGE_URL Storage URL for create_storage sqlite:///content.db
SARDINE_ADMIN_SESSION_HOURS Session lifetime in hours 12
SARDINE_ADMIN_COOKIE_SECURE Set 0 only for plain-http local dev 1
SARDINE_MEDIA_DIR Media upload directory (the project's) media
SARDINE_ADMIN_UPLOAD_MAX_MB Upload size limit in MB 10
SARDINE_PROJECT_DIR Project directory (sardine.toml) .
SARDINE_ADMIN_PUBLISH_GATE Set 0 to publish despite validation errors 1

The full admin guide — configuration, roles, workflow, publishing, security model — is docs/ADMIN_GUIDE.md (anti-drift-checked). Milestone 3 status and the phased plan live in docs/PLAN.md.

Sardine CMS

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sardine_cms_admin-0.2.0.tar.gz (699.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sardine_cms_admin-0.2.0-py3-none-any.whl (743.3 kB view details)

Uploaded Python 3

File details

Details for the file sardine_cms_admin-0.2.0.tar.gz.

File metadata

  • Download URL: sardine_cms_admin-0.2.0.tar.gz
  • Upload date:
  • Size: 699.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for sardine_cms_admin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 499071996e6b8136fb1571b518806ee27c854eb33f936c69b84679abbd87d09c
MD5 0addd66246592928d2afa964e0a085e1
BLAKE2b-256 cba38cb77f848d3e2cb22f77c2596027fea5d2ef50b487547373d9e54d459875

See more details on using hashes here.

File details

Details for the file sardine_cms_admin-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sardine_cms_admin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d59068c6b3f3927f0a7a515f356958206690436744018437229d8449fad5b408
MD5 8258b4351da2e291d174f7b1254157d9
BLAKE2b-256 eb35bb959aeadee65a3c231e6ffa1c9dbd0048db590ffba5a3f475fe0a327a5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page