Skip to content

Snackbox (by Cozy Badger)

Snackbox

Pipeline Coverage Issues Release License

Motivation

Most CMS solutions are either too heavy, too opinionated, or tied to a specific frontend framework. Snackbox is a minimal, self-hosted headless CMS that exposes a clean REST API so you can build any frontend you like on top of it.

Exactly what we need for Cozy Badger, so we can deploy, publish and operate hundreds of instances with minimal operational effort.

Getting Started

No clone required - just Docker:

docker run -d \
  -p 8080:8080 \
  -e JWT_SECRET=change-me-min-32-characters-long \
  -e ADMIN_EMAIL=admin@example.com \
  -e ADMIN_PASSWORD=change-me \
  registry.gitlab.com/cozybadgerde/applications/snackbox:latest

curl http://localhost:8080/health

Description

Snackbox manages pages, posts, tags, users, media files, and navigation menus via a JSON REST API. It uses SQLite for storage and JWT for authentication, making it easy to run with zero external dependencies.

The full API is described in the OpenAPI specification on GitLab.

Features

  • Manage pages, posts, tags, users, media files, site settings, social accounts, and navigation menus via a JSON REST API
  • JWT bearer authentication with configurable token expiry
  • SQLite storage - zero external dependencies, single file to back up
  • Role-based access control (admin, editor, author, member)
  • Scheduled publishing - set a future publish_at timestamp to release content automatically
  • CLI subcommands for operational tasks: migrate, create-admin, seed-fixtures, publish-due, backup
  • Paginated list endpoints
  • CORS support, per-IP rate limiting on login, configurable max upload size
  • Prometheus metrics endpoint (/metrics) for HTTP traffic, auth failures, and media upload volume
  • Runs as a fully static binary - no runtime dependencies
  • Ships with a systemd service file and a Docker Compose setup for easy deployment

Documentation

I want to… Manual
Deploy and operate Snackbox Administrator Manual
Build a frontend on top of the API User Manual
Contribute to the code Developer Manual

Issues

License

Except otherwise noted, all work is licensed under a BSD-3-Clause License.

Contact