Skip to content

Commit 5bdff59

Browse files
feat(admin): dedicated admin shell + nightly AI content review pipeline (#1335)
Admin moved to its own (admin) route group with a full-width AdminShell (URLs unchanged). Adds the AI content pipeline: post_metadata + controlled topic/post_topic vocab (migration 0038, additive), a Bedrock content-analysis lib, and an incremental /api/cron/daily-review (tagging, sentiment, quality, posts+comments moderation re-screen, digest) wired into CDK (already deployed to dev+prod). Verified: tsc, eslint, 7 unit tests, next build, Vercel build all green.
1 parent 0893dcd commit 5bdff59

28 files changed

Lines changed: 8455 additions & 86 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const AdminDashboard = () => {
7777
const { data: reportCounts } = api.report.getCounts.useQuery();
7878

7979
return (
80-
<div className="mx-auto max-w-6xl px-0 py-4 sm:px-4 sm:py-8">
80+
<div className="mx-auto max-w-6xl">
8181
<div className="mb-8">
8282
<p className="eyebrow">
8383
<span className="slash">{"// "}</span>admin
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { getServerAuthSession } from "@/server/auth";
2-
import { redirect } from "next/navigation";
31
import { Suspense } from "react";
42
import ModerationQueue from "./_client";
53

@@ -8,13 +6,8 @@ export const metadata = {
86
description: "Review and manage reported content",
97
};
108

11-
export default async function Page() {
12-
const session = await getServerAuthSession();
13-
14-
if (!session?.user || session.user.role !== "ADMIN") {
15-
redirect("/");
16-
}
17-
9+
// Admin-role gate is enforced in app/(admin)/layout.tsx.
10+
export default function Page() {
1811
return (
1912
<Suspense>
2013
<ModerationQueue />

app/(admin)/admin/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import AdminDashboard from "./_client";
2+
3+
export const metadata = {
4+
title: "Admin Dashboard - Codú",
5+
description: "Admin dashboard for managing Codú platform",
6+
};
7+
8+
// Admin-role gate is enforced in app/(admin)/layout.tsx.
9+
export default function Page() {
10+
return <AdminDashboard />;
11+
}

app/(admin)/admin/sources/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Content from "./_client";
2+
3+
export const metadata = {
4+
title: "Feed Sources - Admin",
5+
description: "Manage RSS feed sources for the content aggregator",
6+
};
7+
8+
// Admin-role gate is enforced in app/(admin)/layout.tsx.
9+
export default function Page() {
10+
return <Content />;
11+
}

app/(admin)/admin/tags/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import TagsAdmin from "./_client";
2+
3+
export const metadata = {
4+
title: "Tag Management - Codú Admin",
5+
description: "Manage tags and topics on the Codú platform",
6+
};
7+
8+
// Admin-role gate is enforced in app/(admin)/layout.tsx.
9+
export default function Page() {
10+
return <TagsAdmin />;
11+
}

app/(admin)/admin/users/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import UserManagement from "./_client";
2+
3+
export const metadata = {
4+
title: "User Management - Codú Admin",
5+
description: "Search and manage users",
6+
};
7+
8+
// Admin-role gate is enforced in app/(admin)/layout.tsx.
9+
export default function Page() {
10+
return <UserManagement />;
11+
}

0 commit comments

Comments
 (0)