Files
pagerite/pyproject.toml
T
LeoVasanko ec35bc71e8 contact messages: easypow proof-of-work for sends, pending-upload cleanup
New dependency: easypow (PBKDF2-SHA512 challenges, bundled JS solver).

Sends are PoW-gated: registration/resync and every accepted message
come with a fresh single-use challenge (~5 s solve), held in per-socket
RAM state only — nothing in the database. A message burns one
solution; a missing, stale or spent solution is dropped and answered
with a fresh 'required' challenge. The bundled browser solver is
served at /_contact/easypow.js straight from the installed package, so
client and validator versions always match.

Uploads are deliberately not PoW-gated (the transfer rate is the real
cost). Instead, uploads are tracked as pending per session and a quota
caps pending files at 10 — answered 429, not 403, which could trip
auth flows. A sent message strikes the files it references off the
pending set; when the session's last socket closes, the remaining
pending files are deleted from the store.
2026-09-27 06:13:53 +00:00

63 lines
1.5 KiB
TOML

[build-system]
requires = [
"hatchling>=1.25.0",
"hatch-vcs>=0.4.0",
]
build-backend = "hatchling.build"
[project]
name = "pagerite"
dynamic = ["version"]
description = "A modern website and Content Management System."
authors = [
{ name = "Leo Vasanko" },
]
keywords = ["cms", "blog", "fastapi", "markdown"]
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"blake3>=1.0.9",
"easypow>=0.1.0",
"fastapi-vue~=1.7.2",
"fastapi[standard]>=0.141.1",
"html5tagger>=2.0.0",
"httpx>=0.28.1",
"kanta>=0.9.2",
"markdown-it-py>=4.2.0",
"maxminddb>=3.1.1",
"mdit-py-plugins>=0.6.1",
"mediapreview[standard]>=0.2.6",
"platformdirs>=4.11.5",
"pygments>=2.20.0",
"python-slugify>=8.0.4",
"uarite>=0.2.2",
"zstandard>=0.25.0",
]
[project.scripts]
pagerite = "pagerite.__main__:main"
[project.urls]
Repository = "https://git.zi.fi/LeoVasanko/pagerite"
Issues = "https://github.com/LeoVasanko/pagerite"
[dependency-groups]
dev = []
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = ["pagerite"]
[tool.hatch.build]
# `only-packages` drops directories without an __init__.py, so the theme
# files and seed image assets must be force-included as artifacts (like
# the frontend build).
artifacts = ["pagerite/frontend-build", "pagerite/themes", "pagerite/seed-assets"]
only-packages = true
packages = ["pagerite"]
[tool.hatch.build.targets.sdist.hooks.custom]
path = "scripts/fastapi-vue/buildhook.py"