> ## Documentation Index
> Fetch the complete documentation index at: https://dos.dzaleka.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Service Model

> Complete schema documentation for the Service model in Dzaleka Online Services

## Overview

The Service model represents services and organizations available in the Dzaleka Refugee Camp. Services can include cultural organizations, educational institutions, healthcare facilities, and community services.

## Schema Definition

The Service model is defined using Zod schema validation in `src/content.config.ts:38-76`.

### TypeScript Type

```typescript theme={null}
type Service = {
  title: string;
  description: string;
  category: string;
  featured?: boolean;
  verified?: boolean;
  logo?: string;
  image?: string;
  contact?: {
    email?: string;
    phone?: string;
    whatsapp?: string;
    hours?: string;
  };
  location?: {
    address: string;
    city: string;
    coordinates?: {
      lat: number;
      lng: number;
    };
  };
  socialMedia?: {
    website?: string;
    facebook?: string;
    instagram?: string;
    twitter?: string;
    linkedin?: string;
  };
  tags?: string[];
  businessHours?: Array<{
    day: string;
    open: string;
    close: string;
    closed?: boolean;
  }>;
  lastUpdated?: Date;
  status?: 'active' | 'inactive';
};
```

## Fields

### Core Fields

<ResponseField name="title" type="string" required>
  The name of the service or organization.
</ResponseField>

<ResponseField name="description" type="string" required>
  A detailed description of the service, its mission, and what it offers to the community.
</ResponseField>

<ResponseField name="category" type="string" required>
  The category of service (e.g., "Cultural & Arts", "Education", "Healthcare", "Community Services").
</ResponseField>

<ResponseField name="featured" type="boolean">
  Whether this service should be featured prominently on the platform. Defaults to `false`.
</ResponseField>

<ResponseField name="verified" type="boolean">
  Indicates if the service has been verified by administrators.
</ResponseField>

<ResponseField name="logo" type="string">
  Path to the service's logo image (e.g., "/images/ayap.jpg").
</ResponseField>

<ResponseField name="image" type="string">
  Path to a cover or promotional image for the service.
</ResponseField>

<ResponseField name="status" type="enum">
  Current operational status of the service. Options: `'active'` | `'inactive'`. Defaults to `'active'`.
</ResponseField>

<ResponseField name="lastUpdated" type="Date">
  Timestamp of when the service information was last updated.
</ResponseField>

<ResponseField name="tags" type="string[]">
  Array of tags for categorization and searchability.
</ResponseField>

### Contact Information

<ResponseField name="contact" type="object">
  <Expandable title="properties">
    <ResponseField name="email" type="string">
      Contact email address (e.g., "[lipandamahigwe@gmail.com](mailto:lipandamahigwe@gmail.com)").
    </ResponseField>

    <ResponseField name="phone" type="string">
      Contact phone number with country code (e.g., "+265 986 08 46 55").
    </ResponseField>

    <ResponseField name="whatsapp" type="string">
      WhatsApp number for direct messaging.
    </ResponseField>

    <ResponseField name="hours" type="string">
      General operating hours description.
    </ResponseField>
  </Expandable>
</ResponseField>

### Location Information

<ResponseField name="location" type="object">
  <Expandable title="properties">
    <ResponseField name="address" type="string" required>
      Physical address of the service (e.g., "Dzaleka Refugee Camp").
    </ResponseField>

    <ResponseField name="city" type="string" required>
      City or district (e.g., "Dowa").
    </ResponseField>

    <ResponseField name="coordinates" type="object">
      <Expandable title="properties">
        <ResponseField name="lat" type="number" required>
          Latitude coordinate (e.g., -13.6628274).
        </ResponseField>

        <ResponseField name="lng" type="number" required>
          Longitude coordinate (e.g., 33.8704301).
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Social Media

<ResponseField name="socialMedia" type="object">
  <Expandable title="properties">
    <ResponseField name="website" type="string">
      Official website URL.
    </ResponseField>

    <ResponseField name="facebook" type="string">
      Facebook page or profile URL.
    </ResponseField>

    <ResponseField name="instagram" type="string">
      Instagram profile URL.
    </ResponseField>

    <ResponseField name="twitter" type="string">
      Twitter/X profile URL.
    </ResponseField>

    <ResponseField name="linkedin" type="string">
      LinkedIn page URL.
    </ResponseField>
  </Expandable>
</ResponseField>

### Business Hours

<ResponseField name="businessHours" type="array">
  Array of objects defining operating hours for each day of the week.

  <Expandable title="properties">
    <ResponseField name="day" type="string" required>
      Day of the week (e.g., "Monday", "Tuesday").
    </ResponseField>

    <ResponseField name="open" type="string" required>
      Opening time (e.g., "09:00").
    </ResponseField>

    <ResponseField name="close" type="string" required>
      Closing time (e.g., "17:00").
    </ResponseField>

    <ResponseField name="closed" type="boolean">
      Whether the service is closed on this day.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

Here's a complete example of a Service object from the African Youth Artistic Poetry organization:

```json theme={null}
{
  "title": "African Youth Artistic Poetry - AYAP",
  "category": "Cultural & Arts",
  "description": "A collective empowering young refugees through spoken word poetry, fostering artistic expression and resilience in Dzaleka Refugee Camp.",
  "location": {
    "address": "Dzaleka Refugee Camp",
    "city": "Dowa",
    "coordinates": {
      "lat": -13.6628274,
      "lng": 33.8704301
    }
  },
  "contact": {
    "email": "lipandamahigwe@gmail.com",
    "phone": "+265 986 08 46 55",
    "hours": ""
  },
  "socialMedia": {
    "facebook": "https://www.facebook.com/profile.php?id=100094050495280",
    "twitter": "",
    "instagram": "",
    "linkedin": "",
    "website": ""
  },
  "logo": "/images/ayap.jpg",
  "featured": false,
  "lastUpdated": "2025-08-25T00:00:00.000Z",
  "status": "active"
}
```

## Usage in Content

Services are stored as Markdown files in `src/content/services/` with YAML frontmatter:

```markdown theme={null}
---
title: African Youth Artistic Poetry - AYAP
category: "Cultural & Arts"
description: A collective empowering young refugees through spoken word poetry...
location:
  address: Dzaleka Refugee Camp
  city: Dowa
  coordinates:
    lat: -13.6628274
    lng: 33.8704301
contact:
  email: 'lipandamahigwe@gmail.com'
  phone: '+265 986 08 46 55'
logo: '/images/ayap.jpg'
featured: false
---

## About the Organization

Markdown content here...
```

## Validation Rules

* `title`, `description`, and `category` are required fields
* `status` must be either `'active'` or `'inactive'`
* Coordinates must be valid numbers representing latitude and longitude
* Email addresses in contact information are not validated but should follow standard email format
* URLs in social media fields should be complete URLs including protocol
