Skip to main content

Overview

The Event model represents community events, workshops, meetings, and gatherings in and around Dzaleka Refugee Camp. Events can be in-person or online, and may include registration requirements and panelist information.

Schema Definition

The Event model is defined using Zod schema validation in src/content.config.ts:97-132.

TypeScript Type

type Event = {
  title: string;
  description: string;
  date: Date;
  endDate?: Date;
  location: string;
  category: string;
  featured?: boolean;
  image?: string;
  organizer: string;
  status: 'upcoming' | 'past';
  contact?: {
    email?: string;
    phone?: string;
    whatsapp?: string;
  };
  registration?: {
    required: boolean;
    url?: string;
    deadline?: Date;
  };
  panelists?: Array<{
    name: string;
    role?: string;
    bio?: string;
    image?: string;
    organization?: string;
    socialMedia?: {
      twitter?: string;
      instagram?: string;
      linkedin?: string;
      website?: string;
    };
  }>;
  tags?: string[];
};

Fields

Core Fields

title
string
required
The name of the event.
description
string
required
A detailed description of what the event is about, its purpose, and what attendees can expect.
date
Date
required
The start date and time of the event in ISO 8601 format.
endDate
Date
The end date and time of the event (for multi-day events).
location
string
required
The location where the event takes place (e.g., “Online”, “Dzaleka Community Center”, “Zoom Meeting”).
category
string
required
The type or category of event (e.g., “Zoom Meeting”, “Workshop”, “Conference”, “Community Gathering”).
organizer
string
required
The name of the individual or organization hosting the event (e.g., “Inua Advocacy”).
status
enum
required
Current status of the event. Options: 'upcoming' | 'past'. Defaults to 'past'.
Whether this event should be featured prominently on the platform.
image
string
Path or URL to a promotional image for the event.
tags
string[]
Array of tags for categorization and searchability (e.g., [“Refugees”, “Malawi”, “Laws”]).

Contact Information

contact
object

Registration Information

registration
object

Panelists

panelists
array
Array of speakers, panelists, or presenters for the event.

Example

Here’s a complete example of an Event object for a community discussion:
{
  "title": "Breaking Myths About Refugees: Truths That Change Perceptions",
  "description": "Refugees and migrants face misconceptions worldwide, but in this session, we focus on Malawi and the broader sub-Saharan Africa region.",
  "date": "2025-04-24T13:00:00.000Z",
  "endDate": "2025-04-24T14:30:00.000Z",
  "location": "Online",
  "category": "Zoom Meeting",
  "image": "https://alumni.creighton.edu/sites/default/files/externals/7fe45be3aa4b9a7e7698f971033cbcc6.jpg",
  "featured": true,
  "organizer": "Inua Advocacy",
  "status": "past",
  "contact": {
    "email": "info@inuaadvocacy.org",
    "phone": "+265 882 717 995",
    "whatsapp": "+265 882 717 995"
  },
  "registration": {
    "required": true,
    "url": "https://us06web.zoom.us/meeting/register/4PrLQ4aMSK6gzSDff2shWw",
    "deadline": "2025-04-24T13:00:00.000Z"
  },
  "tags": ["Refugees", "Malawi", "Laws", "Inua Advocacy"]
}

Usage in Content

Events are stored as Markdown files in src/content/events/ with YAML frontmatter:
---
title: "Breaking Myths About Refugees: Truths That Change Perceptions"
description: "Refugees and migrants face misconceptions worldwide..."
date: 2025-04-24T13:00:00Z
endDate: 2025-04-24
location: "Online"
category: "Zoom Meeting"
image: "https://alumni.creighton.edu/sites/default/files/externals/7fe45be3aa4b9a7e7698f971033cbcc6.jpg"
featured: true
organizer: "Inua Advocacy"
status: "past"
contact:
  email: "info@inuaadvocacy.org"
  phone: "+265 882 717 995"
  whatsapp: "+265 882 717 995"
registration:
  required: true
  url: "https://us06web.zoom.us/meeting/register/4PrLQ4aMSK6gzSDff2shWw"
  deadline: 2025-04-24
tags: ["Refugees", "Malawi", "Laws", "Inua Advocacy"]
---

## Event Overview

Markdown content describing the event in detail...

Validation Rules

  • title, description, date, location, category, and organizer are required fields
  • status must be either 'upcoming' or 'past' (defaults to 'past')
  • date and endDate must be valid Date objects or ISO 8601 strings
  • If registration.required is true, it’s recommended to provide a registration.url
  • Panelist names are required if the panelists array is provided

Status Management

The status field helps distinguish between:
  • upcoming: Events that haven’t occurred yet
  • past: Events that have already taken place
This allows the platform to filter and display events appropriately in calendars and event listings.