From d30d6cd4a6826931cb425eb22e20dc9b7b88656f Mon Sep 17 00:00:00 2001
From: 8tp <79799382+8tp@users.noreply.github.com>
Date: Sun, 2 Aug 2026 18:41:54 -0500
Subject: [PATCH] feat: add fail-closed UE4SS item grants
---
README.md | 15 +-
backend/cmd/item-catalog-import/main.go | 507 ++++++++++++++++
backend/cmd/item-catalog-import/main_test.go | 104 ++++
backend/internal/config/config.go | 21 +
backend/internal/config/config_test.go | 41 ++
backend/internal/itemgrant/catalog.go | 163 ++++++
backend/internal/itemgrant/catalog_test.go | 75 +++
backend/internal/itemgrant/spool.go | 185 ++++++
backend/internal/server/item_grants.go | 223 +++++++
backend/internal/server/item_grants_test.go | 70 +++
backend/internal/server/openapi.json | 11 +
backend/internal/server/server.go | 23 +-
backend/internal/store/item_grants.go | 112 ++++
backend/internal/store/item_grants_test.go | 39 ++
.../store/migrations/013_item_grants.sql | 19 +
.../store/store_migration_audit_test.go | 20 +-
backend/internal/store/store_test.go | 16 +-
.../docs/architecture/data-channels.md | 55 +-
.../docs/architecture/security-model.md | 22 +-
.../docs/getting-started/what-is-palhelm.md | 4 +-
.../src/content/docs/panel/item-grants.md | 61 ++
docs-site/src/content/docs/panel/players.md | 26 +-
docs/API.md | 6 +
docs/SERVER-MOD-INTEGRATIONS-PLAN.md | 542 ++++++++++++++++++
docs/item-catalog-manifest.example.json | 26 +
frontend/src/api/client.ts | 21 +
frontend/src/api/mock.ts | 54 ++
frontend/src/api/types.ts | 47 ++
frontend/src/routes/players/Players.css | 55 ++
frontend/src/routes/players/Players.tsx | 196 ++++++-
frontend/tests/item-grants.test.mjs | 30 +
mods/palhelm-item-bridge/README.md | 97 ++++
mods/palhelm-item-bridge/Scripts/main.lua | 278 +++++++++
mods/palhelm-item-bridge/config.example.lua | 20 +
mods/palhelm-item-bridge/enabled.txt | 1 +
website/src/pages/index.astro | 13 +-
website/src/pages/panel.astro | 9 +-
37 files changed, 3154 insertions(+), 53 deletions(-)
create mode 100644 backend/cmd/item-catalog-import/main.go
create mode 100644 backend/cmd/item-catalog-import/main_test.go
create mode 100644 backend/internal/itemgrant/catalog.go
create mode 100644 backend/internal/itemgrant/catalog_test.go
create mode 100644 backend/internal/itemgrant/spool.go
create mode 100644 backend/internal/server/item_grants.go
create mode 100644 backend/internal/server/item_grants_test.go
create mode 100644 backend/internal/store/item_grants.go
create mode 100644 backend/internal/store/item_grants_test.go
create mode 100644 backend/internal/store/migrations/013_item_grants.sql
create mode 100644 docs-site/src/content/docs/panel/item-grants.md
create mode 100644 docs/SERVER-MOD-INTEGRATIONS-PLAN.md
create mode 100644 docs/item-catalog-manifest.example.json
create mode 100644 frontend/tests/item-grants.test.mjs
create mode 100644 mods/palhelm-item-bridge/README.md
create mode 100644 mods/palhelm-item-bridge/Scripts/main.lua
create mode 100644 mods/palhelm-item-bridge/config.example.lua
create mode 100644 mods/palhelm-item-bridge/enabled.txt
diff --git a/README.md b/README.md
index 8cf6881..292c54e 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
Palhelm is a control panel and Discord companion for your Palworld - server. You host it yourself, in one container. It reads your world and - never writes to it. + server. You host it yourself, in one container. Save parsing is read-only; + optional item grants use a separate, audited server bridge.
Online players come from the live server, everyone else from the save file. See each player's level, playtime, guild and pal party, - with their Steam avatar. Kick, ban or whitelist from the same - screen. + with their Steam avatar. Kick, ban, or—when the disabled-by-default + UE4SS bridge has passed its exact-build checks—queue an allowlisted + item grant from the same screen.
Shown with demo data; pal art appears once icons are fetched. @@ -360,7 +361,9 @@ const DOCS_URL = "https://docs.palhelm.com/";
Under the hood: one program for the panel, one web UI, shipped as a single Docker image. Your data stays in one folder on the host. No - separate database to install or run. Full details are in + separate database to install or run. The optional item-grant bridge is + installed separately on the game server and is not required for the + ordinary read-only panel. Full details are in the docs.