Kenya's Leading Real Estate Marketplace

Blog & Articles Management

The platform includes a comprehensive system for managing blog posts and articles. This allows administrators or content creators to publish engaging content, share news, and provide valuable information to users.

Accessing and Viewing Articles

Published articles are typically accessible to all users through a dedicated blog section.

  • Article Listing Page (app/blog/page.tsx):Displays a list or grid of published articles, often with summaries, thumbnails, and publication dates. Users can browse and select articles to read.
  • Individual Article Page (app/blog/[slug]/page.tsx):Shows the full content of a selected article. The URL typically includes a user-friendly slug derived from the article's title.

Managing Articles (Admin Dashboard)

Article management is handled through the admin dashboard, providing tools for creating, editing, and deleting articles.

  • Articles Dashboard (app/dashboard/articles/page.tsx):This page in the admin dashboard lists all articles, showing their status (e.g., published, draft) and providing options to manage them.
  • Article Creation/Editing Form (components/dashboard/article-form.tsx):A form used to create new articles or modify existing ones. It typically includes fields for the title, content (often with a rich text editor), author, category, tags, and SEO metadata.
  • Image Uploads (components/dashboard/article-image-upload.tsx):This component facilitates uploading and managing images associated with articles, such as featured images or images embedded within the content. The underlying storage mechanism for these images is defined in part by migrations like supabase/migrations/20250514092500_setup_article_images_storage.sql, which sets up the necessary storage buckets (e.g., in Supabase).

Core Functionality and Logic

The backend operations for articles (creating, reading, updating, deleting - CRUD) are managed by server actions.

  • Article Actions (app/actions/article-actions.ts):This file contains the server-side logic for handling all article-related operations. This includes validating input, interacting with the database to store and retrieve article data, and managing image associations.

Key Features

  • Rich Text Editing: Allows for formatted content creation.
  • Image Management: Support for featured images and embedded media.
  • Categorization and Tagging: Helps organize articles and improve discoverability.
  • SEO Optimization: Fields for meta titles, descriptions, and slugs.
  • Drafts and Publishing: Control over when articles go live.
  • Author Attribution: Assigning articles to specific authors.

User Experience Considerations

  • Clear navigation to the blog section.
  • Readable and well-formatted article layouts.
  • Fast loading times, especially for pages with images.
  • Search and filtering capabilities within the blog.
  • Social sharing options for articles.