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
A detailed description of what the event is about, its purpose, and what attendees can expect.
The start date and time of the event in ISO 8601 format.
The end date and time of the event (for multi-day events).
The location where the event takes place (e.g., “Online”, “Dzaleka Community Center”, “Zoom Meeting”).
The type or category of event (e.g., “Zoom Meeting”, “Workshop”, “Conference”, “Community Gathering”).
The name of the individual or organization hosting the event (e.g., “Inua Advocacy”).
Current status of the event. Options: 'upcoming' | 'past'. Defaults to 'past'.
Whether this event should be featured prominently on the platform.
Path or URL to a promotional image for the event.
Array of tags for categorization and searchability (e.g., [“Refugees”, “Malawi”, “Laws”]).
Contact phone number with country code (e.g., “+265 882 717 995”).
WhatsApp number for quick communication.
Whether registration is required to attend the event.
URL where attendees can register for the event.
Registration deadline date and time.
Panelists
Array of speakers, panelists, or presenters for the event. Full name of the panelist.
The panelist’s role or title (e.g., “Keynote Speaker”, “Moderator”).
Brief biography or description of the panelist.
Path or URL to the panelist’s profile photo.
The organization the panelist represents.
Personal or professional website URL.
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.