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.
| Baustein | Kurz |
|---|---|
| Public API | GET /api/centers/{centerId}/social-feed — CORS *, kein Auth |
| Discovery | data.apiHints.socialFeedGet in public-visitor-surface (und optional signage-surface) |
| Hybrid-Tiers | managed · manual · scrape · off / profile_links |
| Scrape-Cache | Tabelle 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
| Rolle | Auswirkung |
|---|---|
| Redaktion | Später Dashboard-Reiter/Option „Social Feed Modus“; manuelle Posts in Webseiten-/Signage-Optionen (P1) |
| Center-Betrieb | Unmanaged Center: kein automatischer Scrape, keine Outstand-Pipeline im Feed |
| Besucher | Feed auf Website/Kiosk — nur öffentliche Inhalte |
| Entwickler / v0 | Neuer GET-Endpunkt + apiHints.socialFeedGet; Migration weg von iframe-Embed optional |
| Betrieb / IT | Env REFETCHER_API_KEY, Cron CRON_SECRET, Render + GHA Workflow |
Wo (Code & Pfade — Zielbild)
| Bereich | Pfad (geplant) |
|---|---|
| Public Route | apps/dashboard/src/app/api/centers/[centerId]/social-feed/route.ts |
| Resolver / Normalizer | apps/dashboard/src/lib/social-feed/ (neu) |
| Refetcher-Client | apps/dashboard/src/lib/integration/refetcher-client.ts (neu) |
| Cron | apps/dashboard/src/app/api/cron/social-feed-sync/route.ts |
| Surface-Hint | apps/dashboard/src/lib/build-public-visitor-surface.ts → apiHints.socialFeedGet |
| CORS | apps/dashboard/src/lib/public-api-cors.ts (wie hotpicks, contacts/public) |
| Migration | packages/database/migrations/YYYYMMDD_add_center_social_feed_cache_SAFE.sql |
| Prisma | packages/database/schema.prisma — Model CenterSocialFeedCache + optionale Center-Spalten |
| Doku-Vertrag | Ergänzung in public-center-website-api-vertrag.md (nach P0-Lieferung) |
| Cron-Doku | docs/CRON-SETUP.md |
| GHA | .github/workflows/social-feed-sync.yml |
So testen (nach Implementierung)
- Center mit Modus
off:GET …/social-feed→{ mode: "off", posts: [], profileLinks: { … } }aus bestehendemsocialMedia. - Center
manual: Posts intemplateContent.*.socialFeed.manualPostspflegen → API liefert normalisierte Einträge, kein Refetcher-Call zur Laufzeit. - Center
managed: Mindestens einsocial_post_drafts-Eintrag mitstatus=published→ Post erscheint in Feed (Medien-URLs über bestehenderesolveMediaUrl-Logik). - Center
scrape: Nach Cron-Lauf Eintrag incenter_social_feed_cache→ API liefert gecachte Posts; bei leerem Cache aber vorhandenem Stale-Eintrag →stale: true. - Unmanaged (
socialFeedServiceTier=hosting_only): Modusmanaged/scrapein Resolver abgelehnt → 200 mitmodeaus erlaubter Menge oder Fallbackprofile_links. - Discovery:
GET …/public-visitor-surfaceenthältdata.apiHints.socialFeedGetmit korrektemcenterId. - CORS:
fetchvon localhost/Vercel-Origin ohne Auth. - Cron:
POST …/api/cron/social-feed-syncmitAuthorization: Bearer $CRON_SECRET→ JSON-SummarycentersProcessed,errors.
Betrieb
| Env | Pflicht | Beschreibung |
|---|---|---|
REFETCHER_API_KEY | Ja (für Scrape-Tier) | Server-side only; Refetcher-API-Key |
REFETCHER_BASE_URL | Nein | Default aus Client (Prod-URL nach P1-Spike) |
SOCIAL_FEED_SCRAPE_PROVIDER | Nein | Default refetcher; spätere Provider austauschbar |
CRON_SECRET | Ja (Cron) | Bearer für POST /api/cron/social-feed-sync |
COCKPIT_DISABLE_PUBLIC_VISITOR_RATE_LIMIT | Nein | Nur 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)
| Modus | Datenquelle | Outstand/Zernio | Refetcher | Typische Center |
|---|---|---|---|---|
managed | social_post_drafts (status=published) | Ja (Publish-Pipeline) | Nein | Full-Service mit Social Cockpit |
manual | templateContent / Signage-Optionen | Nein | Nein | Kuratierte Highlights, Unmanaged OK |
scrape | center_social_feed_cache | Nein | Ja (Cron) | Full-Service, kein Managed-Feed gewünscht |
off | Keine Posts | — | — | Modul aus |
profile_links | Nur socialMedia-Links | — | — | Fallback / Unmanaged Default |
Service-Tier Center (neu, additiv)
| Wert | Bedeutung |
|---|---|
full (Default, NULL = full) | Alle Feed-Modi erlaubt (subject to socialFeedMode) |
hosting_only | Unmanaged: 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)
| Feld | Ort | Rolle |
|---|---|---|
shopping_centers.socialMedia | JSON | Profil-URLs (instagram, facebook, …) — kein Breaking Change |
signageTemplateOptions.kiosk.socialFeedEmbedCode | JSON | Legacy iframe — bleibt bis v0-Migration |
signageTemplateOptions.kiosk.socialMediaWidget | JSON | Legacy Elfsight — bleibt |
center_social_accounts | Tabelle | Outstand-Mapping — nur Tier managed |
social_post_drafts | Tabelle | Freigabe/Publish — nur Tier managed |
Neu (additiv)
| Feld | Ort | Beschreibung |
|---|---|---|
socialFeedMode | Center-Spalte oder später Webseiten-Reiter | Enum-String (siehe Tier-Tabelle) |
socialFeedServiceTier | Center-Spalte | full | hosting_only |
socialFeedScrapeTargets | Center JSON optional | Ziel-Handles für Refetcher |
socialFeed.manualPosts | templateContent[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:
enableSocialFeed | socialFeedEmbedCode (src extrahiert) | v0-Verhalten |
|---|---|---|
false | — | Modul aus |
true | gültiger src | Legacy iframe (Elfsight/Zernio-Widget) — optional zusätzlich API |
true | leer / ohne src | Pflicht: GET socialFeedGet — UI aus posts[] / profileLinks |
So testen:
- Center mit veröffentlichtem Social-Post (Modus
managed) → Modul an, Embed leer → Kiosk zeigt Post aus API. - Embed mit
src="https://…"gesetzt → iframe sichtbar (Referenz:apps/digital-signage/…/AIPremiumKioskShell.tsx). GET …/signage-surfaceenthältapiHints.socialFeedGetmit passendercenterId.
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_id | externalId |
platform | network |
text / caption | caption |
media[].url | mediaUrl (+ mediaType: image | video) |
permalink / url | permalink |
created_at | publishedAt (ISO 8601) |
author.name | authorName (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.
| Aspekt | Verhalten |
|---|---|
| Pfad | /api/cron/social-feed-sync |
| Methoden | POST (Run), GET (Meta + Auth-Check) |
| Auth | Authorization: Bearer ${CRON_SECRET} — fehlt Secret → 500 |
| Center-Auswahl | social_feed_service_tier != 'hosting_only' UND (social_feed_mode = 'scrape' OR (social_feed_mode IS NULL AND scrape-Heuristik)) UND mindestens ein Scrape-Target |
| Batch | Max N Center pro Lauf (z. B. 20), rotierender Offset wie social-comment-sync |
| Provider | SOCIAL_FEED_SCRAPE_PROVIDER default refetcher; ohne Key → { skipped: true, reason: 'REFETCHER_API_KEY fehlt' } |
| Erfolg | Upsert center_social_feed_cache, fetch_status=ok, fetched_at=now(), expires_at=now()+36h |
| Fehler | fetch_status=error, alte payload behalten, fetch_error kürzen (max 500 Zeichen) |
| Stale | API markiert stale: true, wenn now > expires_at aber payload non-empty |
| Retention | Kein 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
| Auth | Keine |
| CORS | * (GET, OPTIONS) via publicReadCorsHeaders |
| Rate-Limit | P1: leichtes Redis-Limit pro IP (analog öffentliche GETs); P0 optional |
| Query | limit (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,centerIdmatch (Multi-Center: P2) - Medien: erstes Bild/Video aus
containers[].options/ bekannten Social-Media-Item-Strukturen - Netzwerk: aus
publishChannels[]odersocialAccountIds→ Joincenter_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
| Risiko | Maßnahme |
|---|---|
| API-Key-Leak | REFETCHER_API_KEY nur Dashboard-Server; nie in public-visitor-surface, v0, Signage |
| Browser-Scraping | Verboten — Besucher rufen nur Cockpit-GET auf |
| Outstand/Zernio-Tokens | Tier managed nutzt DB-Daten, keine Live-Outstand-Calls im Public GET (P0) |
| IDOR | Nur öffentliche Post-Inhalte (already published / public scrape); keine Drafts |
| Rate-Limit | GET /social-feed pro IP (P1); Cron nur mit CRON_SECRET |
| SSRF | Refetcher-Client: keine user-supplied URLs in P0 ohne Allowlist — Scrape-Targets nur aus DB-Feldern, validiertes Schema |
| CORS | Nur öffentliche Felder — gleiche Whitelist-Disziplin wie hotpicks |
MCP-Parität (bei Dashboard-Feldern, P1+)
Wenn socialFeedMode / socialFeedServiceTier / manualPosts redaktionell pflegbar werden:
| Änderung | Dateien |
|---|---|
| Website-Reiter / Center-Felder | website-config-tabs.ts, Tab-Renderer |
| MCP-Hints | mcp-tab-hints-all-templates.ts, website-config-mcp-schema.ts |
| AgencyOS | GET/PATCH …/agencyos/v1/centers/{centerId}/website-config — additive Felder |
| MCP-Tools | register-cockpit-tools.ts, Export exports/cockpitos-tools.json |
| Public-Docs-Tool | cockpit_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-feedmit Resolver (off,profile_links,manual,managed,scraperead-only) -
apiHints.socialFeedGetinpublic-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 beisrc) — Doku: Signage v0-Fallback
P2 — Feinschliff
- Multi-Center-Drafts im Feed
- Metriken in Posts; Admin-Resync-Button
- Signage
signage-surfaceHint; 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):
| Was | Aktion |
|---|---|
shopping_centers.socialMedia | Bleibt — weiterhin Profil-Links; Feed liest, migriert nicht |
socialFeedEmbedCode, socialMediaWidget | Bleiben — Legacy-Signage unverändert bis v0-Umstellung |
center_social_accounts | Kein DROP, kein Massen-Delete bei hosting_only |
social_post_drafts | Unverändert — Feed ist Read-View auf published |
| Outstand/Zernio-Integration | Unverändert — Unmanaged = Feed-Resolver skippt, kein Deprovisioning |
| Bestehende Cron-Jobs | Unverändert — neuer Job zusätzlich |
| Nullable neue Spalten | Default NULL → Verhalten wie heute (kein Feed / profile_links-Heuristik) |
Explizit nicht geplant:
- Kein
DROP COLUMN/DROP TABLEauf Social-Bestand - Kein Überschreiben von
templateContentohne 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)
- Refetcher: exakte Endpunkte, Rate-Limits, Netzwerk-Matrix — Spike-Ticket
- Liste der ~5–6
hosting_only-Center (Namen/IDs) mit Product Owner abstimmen - Multi-Center-Posts: P0 nur
centerId-Match auf Draft - Medien-URL-Auflösung für Draft-Container: welche
containers[].typein 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: /en/developer-guide/public-social-feed-spec