Zum Hauptinhalt springen

Public Social Feed — Technische Spezifikation

Status: P0 Read-Pfad geliefert (0.1.614); P1 Scrape-Cron + Cache geliefert (0.1.615). Offen: Dashboard-Modus-UI, MCP/AgencyOS, Rate-Limit GET, v0-Migration weg von iframe.
Verwandt: Public Center-Website API — Vertrag · Cockpit steuert Frontends · Social Capability Registry


Was​

Ein öffentlicher, normalisierter Social-Feed pro Center für v0-Websites, Signage/Kiosk und Embeds — ohne Browser-Scraping, ohne Outstand-/Zernio-Secrets im Frontend.

BausteinKurz
Public APIGET /api/centers/{centerId}/social-feed — CORS *, kein Auth
Discoverydata.apiHints.socialFeedGet in public-visitor-surface (und optional signage-surface)
Hybrid-Tiersmanaged · manual · scrape · off / profile_links
Scrape-CacheTabelle center_social_feed_cache, täglicher Cron via Refetcher
Unmanaged Center~5–6 Hosting-only-Center: kein Outstand/Zernio, kein Refetcher-Cron — nur manual / off / profile_links

Bestehende Felder socialMedia (Profil-URLs auf Center-Ebene) und socialFeedEmbedCode / socialMediaWidget (Signage-Elfsight/iframe) bleiben unverändert; der neue Feed ersetzt sie schrittweise in v0/Signage, löscht sie aber nicht.


Warum​

  • Signage (AI-Premium): Monorepo-React nutzt oft socialFeedEmbedCode (Elfsight/iframe). v0 soll bei aktivem Modul und leerem Embed auf diese Public API weichen — siehe Signage / AI-Premium (v0-Fallback).
  • v0: Braucht strukturierte Posts (Bild, Text, Link, Netzwerk) aus Cockpit — analog zu hotpicks, aktuelles-bundle, public-visitor-surface.
  • Managed Center: Bereits social_post_drafts (published) + center_social_accounts (Outstand) — sinnvolle Primärquelle für „offizielle“ Posts.
  • Rest: Center ohne Social-Cockpit-Vertrag sollen ohne Outstand/Zernio-Kosten einen Feed aus manuellen Einträgen oder Profil-Links anbieten können; Scrape nur für Full-Service-Center mit explizitem Modus.

Wer ist betroffen​

RolleAuswirkung
RedaktionSpäter Dashboard-Reiter/Option „Social Feed Modus“; manuelle Posts in Webseiten-/Signage-Optionen (P1)
Center-BetriebUnmanaged Center: kein automatischer Scrape, keine Outstand-Pipeline im Feed
BesucherFeed auf Website/Kiosk — nur öffentliche Inhalte
Entwickler / v0Neuer GET-Endpunkt + apiHints.socialFeedGet; Migration weg von iframe-Embed optional
Betrieb / ITEnv REFETCHER_API_KEY, Cron CRON_SECRET, Render + GHA Workflow

Wo (Code & Pfade — Zielbild)​

BereichPfad (geplant)
Public Routeapps/dashboard/src/app/api/centers/[centerId]/social-feed/route.ts
Resolver / Normalizerapps/dashboard/src/lib/social-feed/ (neu)
Refetcher-Clientapps/dashboard/src/lib/integration/refetcher-client.ts (neu)
Cronapps/dashboard/src/app/api/cron/social-feed-sync/route.ts
Surface-Hintapps/dashboard/src/lib/build-public-visitor-surface.ts → apiHints.socialFeedGet
CORSapps/dashboard/src/lib/public-api-cors.ts (wie hotpicks, contacts/public)
Migrationpackages/database/migrations/YYYYMMDD_add_center_social_feed_cache_SAFE.sql
Prismapackages/database/schema.prisma — Model CenterSocialFeedCache + optionale Center-Spalten
Doku-VertragErgänzung in public-center-website-api-vertrag.md (nach P0-Lieferung)
Cron-Dokudocs/CRON-SETUP.md
GHA.github/workflows/social-feed-sync.yml

So testen (nach Implementierung)​

  1. Center mit Modus off: GET …/social-feed → { mode: "off", posts: [], profileLinks: { … } } aus bestehendem socialMedia.
  2. Center manual: Posts in templateContent.*.socialFeed.manualPosts pflegen → API liefert normalisierte Einträge, kein Refetcher-Call zur Laufzeit.
  3. Center managed: Mindestens ein social_post_drafts-Eintrag mit status=published → Post erscheint in Feed (Medien-URLs über bestehende resolveMediaUrl-Logik).
  4. Center scrape: Nach Cron-Lauf Eintrag in center_social_feed_cache → API liefert gecachte Posts; bei leerem Cache aber vorhandenem Stale-Eintrag → stale: true.
  5. Unmanaged (socialFeedServiceTier=hosting_only): Modus managed/scrape in Resolver abgelehnt → 200 mit mode aus erlaubter Menge oder Fallback profile_links.
  6. Discovery: GET …/public-visitor-surface enthält data.apiHints.socialFeedGet mit korrektem centerId.
  7. CORS: fetch von localhost/Vercel-Origin ohne Auth.
  8. Cron: POST …/api/cron/social-feed-sync mit Authorization: Bearer $CRON_SECRET → JSON-Summary centersProcessed, errors.

Betrieb​

EnvPflichtBeschreibung
REFETCHER_API_KEYJa (für Scrape-Tier)Server-side only; Refetcher-API-Key
REFETCHER_BASE_URLNeinDefault aus Client (Prod-URL nach P1-Spike)
SOCIAL_FEED_SCRAPE_PROVIDERNeinDefault refetcher; spätere Provider austauschbar
CRON_SECRETJa (Cron)Bearer für POST /api/cron/social-feed-sync
COCKPIT_DISABLE_PUBLIC_VISITOR_RATE_LIMITNeinNur Dev: Rate-Limit aus (bestehendes Muster)

Cron-Empfehlung: täglich 04:00 UTC (05:00 MEZ) — nach Outstand-Metrik-Sync, vor Redaktions-Digest. Workflow analog outstand-sync.yml / social-comment-sync.yml.

Render: Keys nur in Dashboard-Service-Env — nie in v0/Vercel-Projekten der Center.


Architektur-Überblick​


Tier-Modell (Hybrid)​

ModusDatenquelleOutstand/ZernioRefetcherTypische Center
managedsocial_post_drafts (status=published)Ja (Publish-Pipeline)NeinFull-Service mit Social Cockpit
manualtemplateContent / Signage-OptionenNeinNeinKuratierte Highlights, Unmanaged OK
scrapecenter_social_feed_cacheNeinJa (Cron)Full-Service, kein Managed-Feed gewünscht
offKeine Posts——Modul aus
profile_linksNur socialMedia-Links——Fallback / Unmanaged Default

Service-Tier Center (neu, additiv)​

WertBedeutung
full (Default, NULL = full)Alle Feed-Modi erlaubt (subject to socialFeedMode)
hosting_onlyUnmanaged: nur Website/Signage-Hosting — kein managed, kein scrape/Refetcher, kein Outstand/Zernio im Feed-Pfad

Identifikation der ~5–6 Center: manuell in Dashboard (Super Admin) oder Migration-Seed-Liste — kein automatisches Löschen bestehender center_social_accounts.


Tier-Auflösung (Resolver)​

Explizite Konfiguration schlägt Heuristik. Pseudocode:

type SocialFeedMode =
| 'managed'
| 'manual'
| 'scrape'
| 'off'
| 'profile_links';

type SocialFeedServiceTier = 'full' | 'hosting_only';

function resolveSocialFeedMode(ctx: {
center: {
id: string;
socialFeedMode: SocialFeedMode | null;
socialFeedServiceTier: SocialFeedServiceTier | null;
socialMedia: Record<string, unknown> | null;
};
hasPublishedDrafts: boolean;
hasManualPosts: boolean;
hasScrapeCache: boolean;
hasActiveSocialAccounts: boolean;
}): SocialFeedMode {
const serviceTier = ctx.center.socialFeedServiceTier ?? 'full';
const explicit = ctx.center.socialFeedMode;

// 1) Expliziter Modus (Dashboard / MCP / AgencyOS)
if (explicit) {
if (serviceTier === 'hosting_only' && (explicit === 'managed' || explicit === 'scrape')) {
// Unmanaged: verbotene Modi herunterstufen
return ctx.hasManualPosts ? 'manual' : hasProfileLinks(ctx) ? 'profile_links' : 'off';
}
return explicit;
}

// 2) Heuristik nur für full-service
if (serviceTier === 'hosting_only') {
if (ctx.hasManualPosts) return 'manual';
if (hasProfileLinks(ctx)) return 'profile_links';
return 'off';
}

if (ctx.hasPublishedDrafts && ctx.hasActiveSocialAccounts) return 'managed';
if (ctx.hasManualPosts) return 'manual';
if (hasScrapeHandles(ctx) && ctx.hasScrapeCache) return 'scrape';
if (hasProfileLinks(ctx)) return 'profile_links';
return 'off';
}

function hasProfileLinks(ctx): boolean {
const sm = ctx.center.socialMedia ?? {};
return Boolean(sm.instagram || sm.facebook || sm.linkedin || sm.youtube || sm.tiktok);
}

function hasScrapeHandles(ctx): boolean {
// Handles/URLs aus socialMedia oder socialFeedScrapeTargets (neu, optional JSON)
return hasProfileLinks(ctx);
}

Priorität bei API-Antwort: Ein Modus pro Request — kein Mischen aus managed + scrape in P0 (P2: optional sources[] für Debug/Preview).


Datenbank (additiv)​

Neue Tabelle: center_social_feed_cache​

Ein Cache-Zeile pro Center × Netzwerk (oder aggregiert pro Center — P0: eine Zeile pro Center mit JSON-Array aller Netzwerke).

-- packages/database/migrations/20261007120000_add_center_social_feed_cache_SAFE.sql
-- Additiv: Kein DROP, kein Datenverlust

CREATE TABLE IF NOT EXISTS "center_social_feed_cache" (
"id" TEXT PRIMARY KEY DEFAULT gen_random_uuid()::text,
"center_id" TEXT NOT NULL,
"provider" TEXT NOT NULL DEFAULT 'refetcher',
"network" TEXT, -- NULL = aggregiert (alle Netzwerke in payload)
"handle" TEXT, -- @username oder Page-Slug zum Zeitpunkt des Fetch
"payload" JSONB NOT NULL DEFAULT '[]'::jsonb,
"fetched_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
"expires_at" TIMESTAMPTZ,
"fetch_status" TEXT NOT NULL DEFAULT 'ok', -- ok | error | stale
"fetch_error" TEXT,
"created_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS "center_social_feed_cache_center_id_idx"
ON "center_social_feed_cache" ("center_id");

CREATE UNIQUE INDEX IF NOT EXISTS "center_social_feed_cache_center_provider_network_uq"
ON "center_social_feed_cache" ("center_id", "provider", COALESCE("network", ''));

COMMENT ON TABLE "center_social_feed_cache" IS
'Öffentlicher Social-Feed: gescrapete/normalisierte Posts (Refetcher), Cron-gepflegt';

-- FK additiv (nur wenn shopping_centers existiert — expand-contract)
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_constraint WHERE conname = 'center_social_feed_cache_center_id_fkey'
) THEN
ALTER TABLE "center_social_feed_cache"
ADD CONSTRAINT "center_social_feed_cache_center_id_fkey"
FOREIGN KEY ("center_id") REFERENCES "shopping_centers"("id")
ON DELETE CASCADE ON UPDATE CASCADE;
END IF;
END $$;

Optionale Center-Spalten (additiv)​

ALTER TABLE "shopping_centers"
ADD COLUMN IF NOT EXISTS "social_feed_mode" TEXT,
ADD COLUMN IF NOT EXISTS "social_feed_service_tier" TEXT,
ADD COLUMN IF NOT EXISTS "social_feed_scrape_targets" JSONB;

COMMENT ON COLUMN "shopping_centers"."social_feed_mode" IS
'managed | manual | scrape | off | profile_links — NULL = Resolver-Heuristik';
COMMENT ON COLUMN "shopping_centers"."social_feed_service_tier" IS
'full (default) | hosting_only — unmanaged ohne Outstand/Refetcher';
COMMENT ON COLUMN "shopping_centers"."social_feed_scrape_targets" IS
'Optional: [{ network, handle, profileUrl }] — Override zu socialMedia';

Prisma (Skizze):

model CenterSocialFeedCache {
id String @id @default(cuid())
centerId String @map("center_id")
provider String @default("refetcher")
network String?
handle String?
payload Json @default("[]")
fetchedAt DateTime @default(now()) @map("fetched_at")
expiresAt DateTime? @map("expires_at")
fetchStatus String @default("ok") @map("fetch_status")
fetchError String? @map("fetch_error")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
center ShoppingCenter @relation(fields: [centerId], references: [id], onDelete: Cascade)

@@unique([centerId, provider, network])
@@index([centerId])
@@map("center_social_feed_cache")
}

Nach Migration: db_structure.md ergänzen (bei Implementierung).


Center- & Template-Felder​

Bestehend (unverändert)​

FeldOrtRolle
shopping_centers.socialMediaJSONProfil-URLs (instagram, facebook, …) — kein Breaking Change
signageTemplateOptions.kiosk.socialFeedEmbedCodeJSONLegacy iframe — bleibt bis v0-Migration
signageTemplateOptions.kiosk.socialMediaWidgetJSONLegacy Elfsight — bleibt
center_social_accountsTabelleOutstand-Mapping — nur Tier managed
social_post_draftsTabelleFreigabe/Publish — nur Tier managed

Neu (additiv)​

FeldOrtBeschreibung
socialFeedModeCenter-Spalte oder später Webseiten-ReiterEnum-String (siehe Tier-Tabelle)
socialFeedServiceTierCenter-Spaltefull | hosting_only
socialFeedScrapeTargetsCenter JSON optionalZiel-Handles für Refetcher
socialFeed.manualPoststemplateContent[rootKey]Tier manual — Redaktion kuratiert

Manuelle Posts (templateContent) — Zielschema:

{
"socialFeed": {
"manualPosts": [
{
"id": "mp_01",
"network": "instagram",
"caption": "Sommerfest im Center — 12. Juli",
"mediaUrl": "https://cdn…/hero.jpg",
"mediaType": "image",
"permalink": "https://instagram.com/p/…",
"publishedAt": "2026-07-01T10:00:00.000Z",
"sortOrder": 0
}
],
"maxPosts": 12
}
}

Signage kann dieselben Posts über Public API lesen — keine Duplikation in signageTemplateOptions nötig (P1: optionaler Dashboard-Spiegel im Reiter Digital Experience).


Signage / AI-Premium (v0-Fallback)​

Was: Wenn am Kiosk enableSocialFeed aktiv ist und socialFeedEmbedCode keinen iframe-src enthält, rendert v0 Posts aus GET /api/centers/{centerId}/social-feed (Discovery: data.apiHints.socialFeedGet in public-visitor-surface und signage-surface).

Warum: Gleiche Datenquelle wie die Center-Website; keine Zernio- oder Outstand-Secrets im Browser. Tier managed liefert veröffentlichte Posts aus der Cockpit-DB (Outstand-Publish-Pipeline) — nicht ein direkter Zernio-Inbox-Call in der Stele.

Wer: v0-Signage, Redaktion (Social-Feed-Modus + optionales Legacy-Embed), Besucher.

Wo: signageTemplateOptions.kiosk.enableSocialFeed, socialFeedEmbedCode; API-Hint in apps/dashboard/src/app/api/centers/[centerId]/signage-surface/route.ts.

Entscheidungsregel:

enableSocialFeedsocialFeedEmbedCode (src extrahiert)v0-Verhalten
false—Modul aus
truegültiger srcLegacy iframe (Elfsight/Zernio-Widget) — optional zusätzlich API
trueleer / ohne srcPflicht: GET socialFeedGet — UI aus posts[] / profileLinks

So testen:

  1. Center mit veröffentlichtem Social-Post (Modus managed) → Modul an, Embed leer → Kiosk zeigt Post aus API.
  2. Embed mit src="https://…" gesetzt → iframe sichtbar (Referenz: apps/digital-signage/…/AIPremiumKioskShell.tsx).
  3. GET …/signage-surface enthält apiHints.socialFeedGet mit passender centerId.

Querverweise: AI Premium v0-Parität — Social-Feed · Copy-Paste packages/mcp-cockpit-os/V0_SIGNAGE_SOCIAL_FEED.md


Refetcher-Integration​

Hinweis: Refetcher ist im Repo noch nicht angebunden. P1 beginnt mit API-Spike gegen Refetcher-Doku; diese Spec definiert den Cockpit-internen Normalisierungsvertrag.

Client​

  • Datei: refetcher-client.ts
  • Auth: Header Authorization: Bearer ${REFETCHER_API_KEY} (exakter Header-Name im Spike verifizieren)
  • Nur serverseitig — Cron und optional manueller Admin-Resync (Super Admin, P2)

Request (pro Scrape-Ziel)​

// Pseudocode — Pfade an Refetcher-Doku anpassen
type RefetcherFetchInput = {
network: 'instagram' | 'facebook' | 'linkedin' | 'tiktok' | 'youtube';
handle?: string; // ohne @
profileUrl?: string; // Alternative zu handle
limit?: number; // Default 12
};

await refetcherClient.fetchProfilePosts(input);

Response → normalisiertes Post-Schema​

Refetcher (Beispiel)Cockpit NormalizedSocialPost
id / post_idexternalId
platformnetwork
text / captioncaption
media[].urlmediaUrl (+ mediaType: image | video)
permalink / urlpermalink
created_atpublishedAt (ISO 8601)
author.nameauthorName (optional)
like_count etc.metrics (optional, P2)
type NormalizedSocialPost = {
id: string; // Cockpit-stable: hash(centerId+network+externalId) oder externalId
source: 'managed' | 'manual' | 'scrape';
network: string;
caption: string;
mediaUrl: string | null;
mediaType: 'image' | 'video' | 'carousel' | 'text';
permalink: string | null;
publishedAt: string; // ISO
authorName?: string | null;
externalId?: string;
};

Fehler pro Ziel: fetch_status=error, fetch_error gesetzt — vorherige payload bleibt (Stale-Retention).


Cron: POST /api/cron/social-feed-sync​

Analog social-comment-sync und docs/CRON-SETUP.md.

AspektVerhalten
Pfad/api/cron/social-feed-sync
MethodenPOST (Run), GET (Meta + Auth-Check)
AuthAuthorization: Bearer ${CRON_SECRET} — fehlt Secret → 500
Center-Auswahlsocial_feed_service_tier != 'hosting_only' UND (social_feed_mode = 'scrape' OR (social_feed_mode IS NULL AND scrape-Heuristik)) UND mindestens ein Scrape-Target
BatchMax N Center pro Lauf (z. B. 20), rotierender Offset wie social-comment-sync
ProviderSOCIAL_FEED_SCRAPE_PROVIDER default refetcher; ohne Key → { skipped: true, reason: 'REFETCHER_API_KEY fehlt' }
ErfolgUpsert center_social_feed_cache, fetch_status=ok, fetched_at=now(), expires_at=now()+36h
Fehlerfetch_status=error, alte payload behalten, fetch_error kürzen (max 500 Zeichen)
StaleAPI markiert stale: true, wenn now > expires_at aber payload non-empty
RetentionKein DELETE auf Cache — nur UPDATE; optional P2: Zeilen älter 90 Tage ohne payload archivieren

Response-Beispiel:

{
"success": true,
"provider": "refetcher",
"centersTotal": 42,
"centersProcessed": 20,
"batchIndex": 3,
"batchCount": 3,
"synced": 18,
"skipped": 1,
"errors": [{ "centerId": "…", "message": "Refetcher 429" }],
"timestamp": "2026-10-07T04:00:00.000Z"
}

Public API: GET /api/centers/{centerId}/social-feed​

Vertrag​

AuthKeine
CORS* (GET, OPTIONS) via publicReadCorsHeaders
Rate-LimitP1: leichtes Redis-Limit pro IP (analog öffentliche GETs); P0 optional
Querylimit (default 12, max 24), network (optional Filter)

Response (Beispiel)​

{
"success": true,
"centerId": "34eca9c3-1ea7-4c5a-b83a-d2b6bfb0c9f2",
"mode": "managed",
"serviceTier": "full",
"stale": false,
"fetchedAt": "2026-10-07T03:15:00.000Z",
"count": 2,
"posts": [
{
"id": "draft_clxyz123",
"source": "managed",
"network": "instagram",
"caption": "Neue Shops im EG — jetzt entdecken",
"mediaUrl": "https://cdn.cockpit-os.de/…/post.jpg",
"mediaType": "image",
"permalink": "https://instagram.com/p/AbCdEf/",
"publishedAt": "2026-10-05T14:30:00.000Z",
"authorName": "Forum Hanau"
},
{
"id": "draft_clxyz124",
"source": "managed",
"network": "facebook",
"caption": "Parken am Sonntag kostenlos",
"mediaUrl": null,
"mediaType": "text",
"permalink": "https://facebook.com/…/posts/…",
"publishedAt": "2026-10-01T09:00:00.000Z",
"authorName": "Forum Hanau"
}
],
"profileLinks": {
"instagram": "https://instagram.com/forumhanau",
"facebook": "https://facebook.com/forumhanau"
}
}

Modus profile_links / leer:

{
"success": true,
"centerId": "…",
"mode": "profile_links",
"serviceTier": "hosting_only",
"stale": false,
"count": 0,
"posts": [],
"profileLinks": {
"instagram": "https://instagram.com/example"
}
}

Managed-Tier: Mapping aus social_post_drafts​

  • Filter: status = 'published', publishedAt IS NOT NULL, centerId match (Multi-Center: P2)
  • Medien: erstes Bild/Video aus containers[].options / bekannten Social-Media-Item-Strukturen
  • Netzwerk: aus publishChannels[] oder socialAccountIds → Join center_social_accounts.network
  • Permalink: aus publishChannels[].platformPostId + Netzwerk-URL-Builder (bestehende Outstand-Helfer wiederverwenden)

public-visitor-surface Erweiterung​

// build-public-visitor-surface.ts — additiv
apiHints: {
// … bestehend …
socialFeedGet: `/api/centers/${cid}/social-feed`,
}

Optional P1: data.socialFeedPreview: { mode, count } — keine vollen Posts in Surface (Payload-Größe).


Sicherheit​

RisikoMaßnahme
API-Key-LeakREFETCHER_API_KEY nur Dashboard-Server; nie in public-visitor-surface, v0, Signage
Browser-ScrapingVerboten — Besucher rufen nur Cockpit-GET auf
Outstand/Zernio-TokensTier managed nutzt DB-Daten, keine Live-Outstand-Calls im Public GET (P0)
IDORNur öffentliche Post-Inhalte (already published / public scrape); keine Drafts
Rate-LimitGET /social-feed pro IP (P1); Cron nur mit CRON_SECRET
SSRFRefetcher-Client: keine user-supplied URLs in P0 ohne Allowlist — Scrape-Targets nur aus DB-Feldern, validiertes Schema
CORSNur öffentliche Felder — gleiche Whitelist-Disziplin wie hotpicks

MCP-Parität (bei Dashboard-Feldern, P1+)​

Wenn socialFeedMode / socialFeedServiceTier / manualPosts redaktionell pflegbar werden:

ÄnderungDateien
Website-Reiter / Center-Felderwebsite-config-tabs.ts, Tab-Renderer
MCP-Hintsmcp-tab-hints-all-templates.ts, website-config-mcp-schema.ts
AgencyOSGET/PATCH …/agencyos/v1/centers/{centerId}/website-config — additive Felder
MCP-Toolsregister-cockpit-tools.ts, Export exports/cockpitos-tools.json
Public-Docs-Toolcockpit_public_integration_docs — Zeile apiHints.socialFeedGet

Bis P0: nur Public Route + apiHint — keine MCP-Pflicht.


Rollout-Phasen​

P0 — Read-Pfad (Minimal)​

  • GET /api/centers/{centerId}/social-feed mit Resolver (off, profile_links, manual, managed, scrape read-only)
  • apiHints.socialFeedGet in public-visitor-surface (+ signage-surface)
  • Unit-Tests Resolver + Manual-Config (hosting_only, Heuristik)
  • Migration center_social_feed_cache + Center-Spalten (nullable, 0.1.615)
  • Kurz-Eintrag in public-center-website-api-vertrag.md — P2 (0.1.616)

P1 — Scrape + Redaktion​

  • refetcher-client.ts + Cron + GHA Workflow (0.1.615)
  • db_structure.md + CRON-SETUP.md (0.1.615)
  • Unit-Tests Refetcher-Mapping (mock fetch)
  • Dashboard: Modus-Auswahl + manuelle Posts (Webseiten-Reiter Social Feed, 0.1.616)
  • MCP/AgencyOS-Parität (social-feed-settings, Hints, 0.1.616)
  • Rate-Limit GET
  • v0/Signage: Fallback-Regel umsetzen (enableSocialFeed + leeres Embed → socialFeedGet; iframe nur bei src) — Doku: Signage v0-Fallback

P2 — Feinschliff​

  • Multi-Center-Drafts im Feed
  • Metriken in Posts; Admin-Resync-Button
  • Signage signage-surface Hint; Deprecation-Hinweis für Elfsight-Felder in Doku
  • Optional zweiter Scrape-Provider hinter SOCIAL_FEED_SCRAPE_PROVIDER

Kein Datenverlust​

Diese Initiative ist strikt additiv (expand-contract):

WasAktion
shopping_centers.socialMediaBleibt — weiterhin Profil-Links; Feed liest, migriert nicht
socialFeedEmbedCode, socialMediaWidgetBleiben — Legacy-Signage unverändert bis v0-Umstellung
center_social_accountsKein DROP, kein Massen-Delete bei hosting_only
social_post_draftsUnverändert — Feed ist Read-View auf published
Outstand/Zernio-IntegrationUnverändert — Unmanaged = Feed-Resolver skippt, kein Deprovisioning
Bestehende Cron-JobsUnverändert — neuer Job zusätzlich
Nullable neue SpaltenDefault NULL → Verhalten wie heute (kein Feed / profile_links-Heuristik)

Explizit nicht geplant:

  • Kein DROP COLUMN / DROP TABLE auf Social-Bestand
  • Kein Überschreiben von templateContent ohne Redaktions-Aktion
  • Kein automatisches Entfernen von iframe-Embeds
  • Kein Löschen von Cache-Zeilen bei Refetcher-Fehler (nur Status-Update + Stale-Serving)

Offene Punkte (vor P1)​

  1. Refetcher: exakte Endpunkte, Rate-Limits, Netzwerk-Matrix — Spike-Ticket
  2. Liste der ~5–6 hosting_only-Center (Namen/IDs) mit Product Owner abstimmen
  3. Multi-Center-Posts: P0 nur centerId-Match auf Draft
  4. Medien-URL-Auflösung für Draft-Container: welche containers[].type in P0 unterstützt werden

Letzte Aktualisierung Spec: 2026-10-07 — P0 (0.1.614) + P1 Scrape-Cron/Cache (0.1.615).

Nutzungsstatistik: Seitenaufrufe werden anonymisiert erfasst. Im Umami-Dashboard nach diesem Pfad filtern: /developer-guide/public-social-feed-spec