Campaign Portal Documentation & User Manual

News CMS & System Documentation

Complete guide for site administrators on managing campaign news, uploading images via Cloudinary, and understanding technical platform architecture.

User Manual: Campaign News Management

1. What the News System Does

The News system allows authorized campaign administrators to compose, preview, schedule, and publish official news updates, press releases, rally announcements, and candidate statements. Published articles automatically sync to the public News Page, the candidate Homepage, and dedicated shareable article URLs.

2. How to Access the News Admin CMS

  1. Log in to your administrator account at /login.
  2. From the portal dashboard sidebar, open AdministrationNews (or navigate directly to /portal/admin/news).
  3. You will see the News management console with tabs for All, Drafts, Published, Scheduled, and Archived articles.

3. How to Create an Article & Field Guide

Click the green "New Article" button to open the article editor:

Article Title & Slug

Enter the headline. The system auto-generates a clean URL slug (e.g. /news/candidate-visits-agbani). You can also customize the slug manually.

Category & Author

Specify a category (e.g., Rally, Press Release, Statement, Community Visit) and author byline.

Excerpt & Full Content

Write a 2-sentence summary for card previews, followed by the complete article body in the main text area.

Featured Image

Upload an image file (JPG, PNG, WebP up to 5MB) via Cloudinary or paste a direct external image URL.

4. Image Uploads & Cloudinary Integration

When you select an image file and click Upload, the file is automatically uploaded to the campaign Cloudinary storage under the folder path:

ifeanyi-2027/news/

An immediate image preview appears in the editor. Alternatively, you can paste any public HTTPS image URL into the URL field. Both methods populate the same featured_image field in Firestore.

5. Publishing Statuses

Draft

Saved privately in the admin console. Not visible on the public website.

Published

Live immediately on `/news`, homepage, and public detail page.

Scheduled

Saved with a scheduled future release date and timestamp.

Archived

Retained for internal records but hidden from the public website.

6. How the Homepage Displays Latest News

The candidate homepage queries Firestore for published news and displays only the top 3 latest articles ordered newest to oldest. If there are 3 or more published articles, exactly 3 show; if fewer exist, 1 or 2 show accordingly.

7. Editing Articles & Correcting Mistakes

To edit an existing article, click the icon next to any article in the News CMS table. Modify the content, status, or image, then click Save Changes. You can also quickly toggle an article between Published and Draft using the status action buttons.

8. Troubleshooting: What to Check if News Doesn't Appear

Check Publication Status: Verify the article status is set to Published and not Draft or Archived.

Check Image URL: If a custom image URL was entered, ensure it begins with https:// or http://.

Check Duplicate Slugs: Ensure the article URL slug is unique across all published articles.

Technical Architecture & Implementation Overview

The News feature uses Google Cloud Firestore for persistent storage, Cloudinary for asset hosting, and Next.js App Router for server/client rendering.

Cloudinary Folder Architecture:

  • ifeanyi-2027/news
  • ifeanyi-2027/gallery
  • ifeanyi-2027/candidate
  • ifeanyi-2027/campaign-members

Image Pipeline & Next.js:

next.config.ts configures remotePatterns to allow external hostnames. <Image unoptimized> is applied to render Cloudinary and user-specified external URLs seamlessly.

Firestore Helpers & Security Policy:

getPublishedNews() in src/lib/firebase/firestore.ts fetches published news using equality filters without requiring composite indexes, sorting in memory by created_at. firestore.rules enforces read access for status == "published" or published == true while restricting write access to authenticated administrators.