From 1a9a8579a286f40598ab9d194aa4cd90296136ea Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 13 Apr 2026 09:02:44 -0700 Subject: [PATCH] feat(community): add COMMUNITY_DB_URL config + community features to tiers --- app/core/config.py | 10 ++++++++++ app/tiers.py | 3 +++ 2 files changed, 13 insertions(+) diff --git a/app/core/config.py b/app/core/config.py index 091b574..fa55bc1 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -35,6 +35,16 @@ class Settings: # Database DB_PATH: Path = Path(os.environ.get("DB_PATH", str(DATA_DIR / "kiwi.db"))) + # Community feature settings + COMMUNITY_DB_URL: str | None = os.environ.get("COMMUNITY_DB_URL") or None + COMMUNITY_PSEUDONYM_SALT: str = os.environ.get( + "COMMUNITY_PSEUDONYM_SALT", "kiwi-default-salt-change-in-prod" + ) + COMMUNITY_CLOUD_FEED_URL: str = os.environ.get( + "COMMUNITY_CLOUD_FEED_URL", + "https://menagerie.circuitforge.tech/kiwi/api/v1/community/posts", + ) + # Processing MAX_CONCURRENT_JOBS: int = int(os.environ.get("MAX_CONCURRENT_JOBS", "4")) USE_GPU: bool = os.environ.get("USE_GPU", "true").lower() in ("1", "true", "yes") diff --git a/app/tiers.py b/app/tiers.py index 652544f..293e3aa 100644 --- a/app/tiers.py +++ b/app/tiers.py @@ -16,6 +16,7 @@ KIWI_BYOK_UNLOCKABLE: frozenset[str] = frozenset({ "expiry_llm_matching", "receipt_ocr", "style_classifier", + "community_fork_adapt", }) # Feature → minimum tier required @@ -38,6 +39,8 @@ KIWI_FEATURES: dict[str, str] = { "style_picker": "paid", "recipe_collections": "paid", "style_classifier": "paid", # LLM auto-tag for saved recipe style tags; BYOK-unlockable + "community_publish": "paid", # Publish plans/outcomes to community feed + "community_fork_adapt": "paid", # Fork with LLM pantry adaptation (BYOK-unlockable) # Premium tier "multi_household": "premium",