Skip to main content

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

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

title
string
required
The name of the service or organization.
description
string
required
A detailed description of the service, its mission, and what it offers to the community.
category
string
required
The category of service (e.g., “Cultural & Arts”, “Education”, “Healthcare”, “Community Services”).
Whether this service should be featured prominently on the platform. Defaults to false.
verified
boolean
Indicates if the service has been verified by administrators.
Path to the service’s logo image (e.g., “/images/ayap.jpg”).
image
string
Path to a cover or promotional image for the service.
status
enum
Current operational status of the service. Options: 'active' | 'inactive'. Defaults to 'active'.
lastUpdated
Date
Timestamp of when the service information was last updated.
tags
string[]
Array of tags for categorization and searchability.

Contact Information

contact
object

Location Information

location
object

Social Media

socialMedia
object

Business Hours

businessHours
array
Array of objects defining operating hours for each day of the week.

Example

Here’s a complete example of a Service object from the African Youth Artistic Poetry organization:
{
  "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:
---
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