Initial certificate system

This commit is contained in:
nelso
2026-06-06 19:32:24 +08:00
commit ce4ed6213b
105 changed files with 9133 additions and 0 deletions

15
backend/app/core/paths.py Normal file
View File

@@ -0,0 +1,15 @@
from pathlib import Path
from app.core.config import settings
DATA_ROOT = Path(settings.data_root)
def ensure_data_dirs() -> None:
for name in ["uploads", "error-reports", "exports", "pdf-cache"]:
(DATA_ROOT / name).mkdir(parents=True, exist_ok=True)
def data_path(name: str) -> Path:
ensure_data_dirs()
return DATA_ROOT / name