clover sitegen framework and typescript library

this repository contains clover's "sitegen" framework, which is a set of tools that assist building websites. additionally, this is the home of her typescript library lib, containing many high quality standalone sub-projects. all these tools power https://paperclover.net.

none of these tools are complex or revolutionary. rather, this project is the sum of many years of experience on managing content heavy websites, and an example on how other over-complicate other frameworks.

Included is src, which contains paperclover.net's source code. Highlights:

Development

minimum system requirements:

  • a cpu with at least 1 core.
  • some random access memory.
  • any operating system with node.js v26
  • the internet.

my primary development machine is a Dell Inspiron 7348 (Core i7) with Windows 7

# setup and run the site locally, watching for changes.
node run

for unix systems, the provided flake.nix can be used with nix develop to open a shell with all needed system dependencies.

Deployment

there are two primary server components to be deployed: the web server and the sourth of truth server. The latter is a singleton that runs on Clover's NAS, which holds the full contents of the file storage. The web server pulls data from the source of truth and renders web pages, and can be duplicated to multiple cloud hosts without issue.

deployment of the source of truth can be done with Docker Compose:

services:
  backend:
    container_name: backend
    build:
      # this uses loopback to hit the self-hosted git server,
      # docker will cache the image to not re-fetch on reboot.
      context: http://127.0.0.1:3000/clo/sitegen.git
      dockerfile: src/source-of-truth.dockerfile
    environment:
      # configuration
      - PORT=43200
      - CLOVER_DB=/data
      - CLOVER_FILE_RAW=/published
      - CLOVER_FILE_DERIVED=/data/derived
      - CLOVER_SOT_KEY=... # guards private/unreleased content
    ports:
      - '43200:43200'
    restart: unless-stopped
    volumes:
      - /mnt/storage1/clover/Documents/Config/paperclover:/data
      - /mnt/storage1/clover/Published:/published

due to caching, images may need to be purged via docker image rm {image} -f when an update is desired. some docker GUIs support force pulls, some are buggy.

Contributions

No contributions to src accepted, only lib and framework.