T-HUB/apps/api/src/feeds/feed-registry.ts
glass beadian aa5e262f3a Tactical Media Broadcast Hub — initial release
Self-hosted multi-platform broadcast newsroom for activist collectives:
publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style
column wall with hostile-content-safe rendering, live control room with Auto
Director, bridged chat governance with polls and quorum, distributed sandboxed
transcode workers, encrypted content-addressed archive, monthly analytics.

MIT licensed. See README.md and docs/.
2026-10-10 11:56:42 +00:00

18 lines
1 KiB
TypeScript

import type { CredentialAccessor } from "@tactical-media-broadcast-hub/connector-sdk";
import { connectionRegistry } from "../connections/connector-registry.js";
import { oauthFetch } from "../connections/oauth-fetch.js";
import { createMockSocialConnector, createMockSocialState } from "../../../../packages/connector-mock-social/src/index.js";
/** Composition boundary: the demo connector uses deterministic public data, no OAuth. */
export function feedRegistry(credentials: CredentialAccessor) {
const registry = connectionRegistry(credentials, oauthFetch);
const state = createMockSocialState();
const now = Date.now();
state.feed = Array.from({ length: 12 }, (_, index) => ({
id: `demo-feed-${index}`, remoteId: `demo-feed-${index}`, provider: "mock-social",
authorHandle: "mock@social", text: `Mock Social feed item ${index + 1}: ready for Streams.`,
mediaUrls: [], createdAt: new Date(now - index * 60_000), metrics: { likes: index },
}));
registry.register(createMockSocialConnector(state));
return registry;
}