Skip to content

feat(admin): add secure moderation dashboard with analytics and moderation actions#281

Merged
knoxiboy merged 2 commits into
knoxiboy:mainfrom
Harshit-Maurya838:feature/admin-moderation-dashboard
May 25, 2026
Merged

feat(admin): add secure moderation dashboard with analytics and moderation actions#281
knoxiboy merged 2 commits into
knoxiboy:mainfrom
Harshit-Maurya838:feature/admin-moderation-dashboard

Conversation

@Harshit-Maurya838
Copy link
Copy Markdown
Contributor

Description

Implemented a secure admin moderation dashboard for reviewing flagged content, monitoring moderation trends, and managing user violations.

This feature introduces a dedicated /admin/moderation page with role-based protection, moderation analytics, and actionable moderation controls for administrators.

Key Features

  • Added secure admin-only route protection using requireAdmin()
  • Implemented moderation analytics charts using Recharts
  • Added moderation logs table with status badges and moderation actions
  • Added support for:
    • Dismiss Flag
    • Warn User
    • Block User
  • Added moderation status tracking (pending, dismissed, warned, blocked)
  • Improved dashboard UI consistency with responsive chart cards and dark mode support
  • Added backend APIs for moderation analytics and moderation actions
  • Added proper empty states and pagination handling

Related Issue

Closes #188

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update (README, guides, comments)
  • Style / UI change (no logic change)
  • Code refactor (no behavior change)
  • Test addition or update
  • Breaking change (fix or feature that would cause existing functionality to change)

Screenshots (if UI change)

Before After
Previous moderation system had no admin dashboard or analytics view Added full moderation dashboard with charts, moderation table, and admin actions
image image image

How Has This Been Tested?

  • Tested locally with npm run dev
  • Verified on mobile viewport (375px)
  • Verified on desktop viewport (1440px)

Checklist

  • I have tested my changes locally (npm run dev)
  • My code follows the existing code style (TypeScript, Tailwind, no any types)
  • I have not introduced unrelated changes (each PR should address one issue)
  • I have added comments where necessary
  • My branch is up to date with main
  • I have linked the related issue above
  • Screenshots are included (if this is a UI change)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@Harshit-Maurya838 is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot requested a review from knoxiboy May 24, 2026 14:20
@github-actions github-actions Bot added size/xl gssoc'26 GSSoC program issue level:intermediate Intermediate level task type:feature New feature labels May 24, 2026
@Harshit-Maurya838
Copy link
Copy Markdown
Contributor Author

@knoxiboy Please review this PR and I Starred this Repo also

Copy link
Copy Markdown
Owner

@knoxiboy knoxiboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: Thank you for starring the repository! The PR is approved.

@knoxiboy knoxiboy merged commit abd1ce0 into knoxiboy:main May 25, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GSSoC program issue level:intermediate Intermediate level task size/xl type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add admin moderation dashboard to review flagged content

2 participants