feat(community): community feed — browse, publish, fork, mDNS discovery #78

Open
pyr0ball wants to merge 7 commits from feature/community into feature/meal-planner
2 changed files with 17 additions and 0 deletions
Showing only changes of commit 22f0bfff9c - Show all commits

View file

@ -53,6 +53,17 @@ class Settings:
# Feature flags # Feature flags
ENABLE_OCR: bool = os.environ.get("ENABLE_OCR", "false").lower() in ("1", "true", "yes") 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 # Runtime
DEBUG: bool = os.environ.get("DEBUG", "false").lower() in ("1", "true", "yes") 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") CLOUD_MODE: bool = os.environ.get("CLOUD_MODE", "false").lower() in ("1", "true", "yes")

View file

@ -18,6 +18,7 @@ KIWI_BYOK_UNLOCKABLE: frozenset[str] = frozenset({
"style_classifier", "style_classifier",
"meal_plan_llm", "meal_plan_llm",
"meal_plan_llm_timing", "meal_plan_llm_timing",
"community_fork_adapt", # Fork a community plan with LLM pantry adaptation
}) })
# Feature → minimum tier required # Feature → minimum tier required
@ -44,6 +45,11 @@ KIWI_FEATURES: dict[str, str] = {
"recipe_collections": "paid", "recipe_collections": "paid",
"style_classifier": "paid", # LLM auto-tag for saved recipe style tags; BYOK-unlockable "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 # Premium tier
"multi_household": "premium", "multi_household": "premium",
"background_monitoring": "premium", "background_monitoring": "premium",