import { AdminShell } from "@/components/admin-shell"; import { readdirSync } from "fs"; import { join } from "path"; import { BackendClient } from "./client"; export const dynamic = "force-dynamic"; export default async function BackendPage() { // Auto-discover platform files from lib/followers/ const dir = join(process.cwd(), "lib", "followers"); const platforms = readdirSync(dir) .filter((f) => f.endsWith(".ts") && f !== "index.ts") .map((f) => f.replace(".ts", "")); // Read current cached counts from Redis let counts: Record = {}; try { const { getRedisClient } = await import("@/lib/redis"); const redis = await getRedisClient(); const cached = await redis.get("erika:follower_counts"); if (cached) { counts = JSON.parse(cached); } } catch { // Redis unavailable } const platformData = platforms.map((p) => ({ name: p, cachedCount: counts[p] ?? null, })); return (

Backend

Follower API connections and cache management

); }