Admin Dashboard

The Admin Dashboard is a restricted-access area of the platform designed for administrators to manage various aspects of the application, oversee operations, and maintain system health. It provides a centralized interface for critical administrative tasks.

Accessing the Dashboard

Access to the Admin Dashboard is typically restricted to users with administrative roles. This is enforced through authentication and authorization mechanisms (see lib/auth.ts and potentially middleware middleware.ts). The main entry point for the dashboard is usually app/dashboard/page.tsx, which then routes to specific admin sections.

Core Structure and Navigation

The dashboard is built with a consistent layout and navigation system to ensure ease of use.

  • Dashboard Shell (components/dashboard/dashboard-shell.tsx):Provides the main layout structure for all dashboard pages, including sidebars, headers, and content areas.
  • Dashboard Navigation (components/dashboard/dashboard-nav.tsx):The primary navigation menu, usually a sidebar, listing all available admin sections.
  • Mobile Navigation (components/dashboard/mobile-nav.tsx):A responsive version of the navigation for smaller screens.
  • Dashboard Header (components/dashboard/dashboard-header.tsx):Often contains page titles, breadcrumbs, user profile links, or quick actions.

Key Administrative Modules

The Admin Dashboard typically includes several modules for managing different parts of the platform:

  • User Management (e.g., app/dashboard/admin/users/... - path may vary):Tools to view, edit, suspend, or delete user accounts. May include role management.
  • Property Management (app/dashboard/properties/page.tsx, app/dashboard/admin/properties/...):Oversee all property listings, approve new submissions, edit existing ones, and manage property-related data.
  • Article/Content Management (app/dashboard/articles/page.tsx):Manage blog posts, articles, or other content. (See Blog & Articles documentation for details).
  • Inquiry Management (app/dashboard/inquiries/page.tsx):View and manage user inquiries related to properties or other services. (See Inquiry Management documentation).
  • System Statistics & Overview (components/dashboard/dashboard-stats.tsx):Displays key metrics and statistics about platform usage, such as number of users, properties, inquiries, etc. Often found on the main dashboard landing page (app/dashboard/page.tsx).
  • Category Management (e.g., app/dashboard/admin/categories/... - path may vary):If the platform uses categories (for properties, articles, etc.), this section allows admins to manage them. Logic handled by app/actions/category-actions.ts.

Backend Logic for Admin Operations

Specific administrative actions that require backend processing are handled by dedicated server actions.

  • Admin Actions (app/actions/admin-actions.ts):This file contains server-side functions for tasks exclusive to administrators, such as moderating content, managing user roles, or performing system-wide operations.

User Experience (UX) for Administrators

  • Efficiency: Designed for quick access to information and tools.
  • Clarity: Clear labeling and intuitive workflows.
  • Control: Robust tools for managing platform data and users.
  • Security: Strong access controls to protect sensitive operations.