diff --git a/app/core/config.py b/app/core/config.py index 091b574..f4bb75a 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -53,6 +53,17 @@ class Settings: # Feature flags ENABLE_OCR: bool = os.environ.get("ENABLE_OCR", "false").lower() in ("1", "true", "yes") + # Community feature + # COMMUNITY_DB_URL: unset = community writes disabled (local/offline mode, fail soft) + 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", + ) + # Runtime DEBUG: bool = os.environ.get("DEBUG", "false").lower() in ("1", "true", "yes") CLOUD_MODE: bool = os.environ.get("CLOUD_MODE", "false").lower() in ("1", "true", "yes") diff --git a/app/tiers.py b/app/tiers.py index c3257ce..05193b2 100644 --- a/app/tiers.py +++ b/app/tiers.py @@ -18,6 +18,7 @@ KIWI_BYOK_UNLOCKABLE: frozenset[str] = frozenset({ "style_classifier", "meal_plan_llm", "meal_plan_llm_timing", + "community_fork_adapt", # Fork a community plan with LLM pantry adaptation }) # Feature → minimum tier required @@ -44,6 +45,11 @@ KIWI_FEATURES: dict[str, str] = { "recipe_collections": "paid", "style_classifier": "paid", # LLM auto-tag for saved recipe style tags; BYOK-unlockable + # Community (free to browse, paid to publish/fork) + "community_browse": "free", # Read-only feed access + "community_publish": "paid", # Publish plans/outcomes to community feed + "community_fork_adapt": "paid", # Fork a plan with LLM pantry adaptation; BYOK-unlockable + # Premium tier "multi_household": "premium", "background_monitoring": "premium",