Skip to content

Wire Blog Moderation Queue with Firestore Data #6

Description

@LRxDarkDevil

Wire Blog Moderation Queue with Firestore Data

Overview

Connect the blog moderation interface to Firestore, enabling admins to review, approve, or reject pending blog post submissions.

Scope

  • Display pending blog posts in a chronological queue
  • Show post metadata: author name, title, submission date, word count, category
  • Preview/read full post content with proper formatting
  • Approve action: update post status to published, make visible in blog directory
  • Reject action: update post status to rejected, notify author with optional feedback
  • Show approval status and history (who approved, when)
  • Bulk actions: approve multiple posts, reject with batch feedback

Acceptance Criteria

  • Pending posts query from Firestore where status == 'draft'
  • Post preview renders formatted content (Markdown or rich text)
  • Approve button updates post status + sets publishedAt timestamp
  • Reject button updates status + creates notification for author with feedback
  • Author receives email notification with feedback message if rejected
  • Approved posts immediately appear in /blog directory
  • Admin-only access verified (403 for non-admins)
  • Audit log entry created for each approval/rejection
  • Attachments or images in blog post preview properly
  • Empty state message when no pending posts

Related Files

  • app/admin/blog/page.tsx — create if missing
  • lib/services/blog.ts — add approval/rejection functions
  • app/blog/page.tsx — filter to show only published posts

Notification Template

Rejection email should include: post title, feedback reason, link to resubmit

Why This Matters

  • Enables content quality control
  • Reduces spam or off-brand content
  • Provides author feedback for improvement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions