> ## 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.

# Community Job Board

> Complete guide to the job board feature - connecting job seekers with employment opportunities in and around Dzaleka Refugee Camp

## Overview

The Community Job Board addresses the critical need for employment opportunities in Dzaleka Refugee Camp. It provides a centralized platform where organizations can post job openings and community members can discover meaningful work, internships, and volunteer positions.

<Warning>
  **Important Context**: Refugees in Malawi face legal restrictions on employment outside the camp. This job board primarily focuses on opportunities within the camp, remote work, and positions with organizations supporting the refugee community.
</Warning>

## User Experience

### Job Discovery

<Steps>
  <Step title="Browse Active Jobs">
    View all open positions at `/jobs` with real-time status updates based on deadlines.
  </Step>

  <Step title="Filter & Sort">
    Sort by "Most Recent" or "Deadline" to prioritize urgent applications.
  </Step>

  <Step title="View Featured Opportunities">
    Highlighted featured jobs appear at the top of listings.
  </Step>

  <Step title="Check Job Details">
    Click any job card to view full description, requirements, and application instructions.
  </Step>
</Steps>

### Job Detail Page

Each job posting (`/jobs/[slug]`) includes:

* **Job title & organization**
* **Employment type**: Full-time, part-time, contract, volunteer, internship
* **Job category**: Business, technology, education, healthcare, etc.
* **Skills required**: Specific competencies needed
* **Application deadline**: Countdown timer for urgent deadlines
* **Contact information**: Email, phone, website
* **Full job description**: Responsibilities, requirements, how to apply
* **Status indicator**: Open, closed, or expired

<CardGroup cols={2}>
  <Card title="Automatic Expiration" icon="clock">
    Jobs automatically marked as expired after deadline passes
  </Card>

  <Card title="Skills-Based Matching" icon="star">
    Skills tags help job seekers find relevant opportunities
  </Card>

  <Card title="Mobile-Friendly" icon="mobile">
    Optimized for mobile job searching on the go
  </Card>

  <Card title="Zero Cost" icon="gift">
    Completely free for both employers and job seekers
  </Card>
</CardGroup>

## Content Schema

Jobs are stored in `src/content/jobs/` as Markdown files:

```yaml theme={null}
title: "Job Title"                           # Required
organization: "Company/Organization Name"     # Required (renamed from 'company')
location: "Remote / Dzaleka / City"          # Required
type: "full-time"                            # Required: full-time | part-time | contract | volunteer | internship
category: "technology"                       # Required: business | technology | education | healthcare | etc.
posted: 2025-03-12                           # Required - Date posted (YYYY-MM-DD)
deadline: 2025-05-12                         # Required - Application deadline
status: "open"                               # open | closed | filled
featured: true                               # Boolean - highlight on top
skills:                                      # Array of required skills
  - Content creation
  - Editing & proofreading
  - Digital storytelling
contact:
  email: "jobs@organization.com"             # Required
  website: "https://apply-here.com"          # Optional
  phone: "+265 XXX XXX XXX"                  # Optional
description: "Brief job summary"             # Required - shown in listings
```

### Real Example from Source

From `Content-Curator-and-Editor.md`:

```yaml theme={null}
title: "Content Curator & Editor"
organization: Dzaleka Digital Heritage
location: "Remote / Dzaleka"
type: "part-time"
category: business
posted: 2025-03-12
deadline: 2025-05-12
status: open
featured: true
skills:
  - Content creation
  - Editing & proofreading
  - Digital storytelling
  - Multimedia curation
  - Content management systems (CMS)
  - Photography & video editing
  - Collaborative Teamwork
contact:
  email: "dzalekaconnect@gmail.com"
  website: "https://services.dzaleka.com"
  phone: ""
description: "Join Dzaleka Digital Heritage as a Content Curator & Editor to help shape and refine the digital narratives that showcase the stories of Dzaleka's community."
```

With markdown content:

```markdown theme={null}
## About the Role
Dzaleka Digital Heritage is seeking a creative and detail-oriented Content 
Curator & Editor to oversee the development and refinement of stories, 
interviews, and multimedia content.

## Key Responsibilities
- Review and edit written content for clarity, accuracy, and consistency.
- Curate and organize multimedia content (photos, videos, audio).
- Collaborate with contributors to refine their stories.

## Requirements
- Strong writing, editing, and proofreading skills.
- Experience in content creation, journalism, or digital storytelling.
- Familiarity with content management systems (CMS).

## How to Apply
Submit your application via email to dzalekaconnect@gmail.com, including:
- Updated CV
- Portfolio of previous work
- Cover letter
- References
```

## How to Post a Job

<Steps>
  <Step title="Create Job File">
    Create a Markdown file in `src/content/jobs/` with a descriptive filename:

    ```bash theme={null}
    touch src/content/jobs/web-developer-tech-hub.md
    ```
  </Step>

  <Step title="Add Job Metadata">
    Fill in the frontmatter with complete job details:

    ```yaml theme={null}
    ---
    title: "Web Developer"
    organization: "Tech Hub Dzaleka"
    location: "Remote / Dzaleka"
    type: "full-time"
    category: "technology"
    posted: 2025-03-09
    deadline: 2025-04-09
    status: "open"
    featured: false
    skills:
      - HTML/CSS
      - JavaScript
      - React
      - Git
    contact:
      email: "hiring@techhub.com"
      website: "https://techhub.com/careers"
    description: "Build responsive websites for refugee community organizations"
    ---
    ```
  </Step>

  <Step title="Write Job Description">
    Add detailed markdown content:

    ```markdown theme={null}
    ## About Tech Hub Dzaleka

    We empower refugees through technology education and employment.

    ## Role Overview

    We're seeking a talented web developer to join our team...

    ## Responsibilities

    - Build and maintain websites for partner organizations
    - Implement responsive designs using modern frameworks
    - Collaborate with design team on UX improvements

    ## Requirements

    - 2+ years of web development experience
    - Portfolio of live projects
    - Strong problem-solving skills

    ## What We Offer

    - Competitive salary
    - Flexible remote work
    - Professional development opportunities
    - Meaningful impact on refugee communities

    ## How to Apply

    Email your CV and portfolio to hiring@techhub.com with subject line 
    "Web Developer Application - [Your Name]"
    ```
  </Step>

  <Step title="Test & Preview">
    Start dev server and check your listing:

    ```bash theme={null}
    npm run dev
    # Visit: http://localhost:4321/jobs
    ```
  </Step>
</Steps>

## Job Submission Flow

Employers can submit jobs via `/jobs/post`:

1. **Fill Form**: Enter job details through web interface
2. **Submit**: Form data sent to admin email
3. **Review**: Admin verifies and creates job listing file
4. **Publication**: Job appears on the board within 24 hours
5. **Confirmation**: Employer receives notification at `/jobs/submitted`
6. **Applications**: Job seekers apply directly via provided contact info

## Technical Implementation

### Deadline & Expiration Logic

Jobs automatically detect expiration:

```typescript title="src/utils/dateHelpers.ts" theme={null}
export function isJobExpired(deadline: Date): boolean {
  const today = new Date();
  today.setHours(0, 0, 0, 0);
  
  const deadlineDate = new Date(deadline);
  deadlineDate.setHours(0, 0, 0, 0);
  
  return deadlineDate < today;
}
```

Used in job listings:

```typescript title="Filtering Active Jobs" theme={null}
const allJobs = await getCollection('jobs');

// Filter active jobs (not expired and status is open)
const activeJobs = allJobs.filter(job =>
  job.data.status === 'open' && !isJobExpired(job.data.deadline)
);
```

### Sorting Options

Users can sort by:

```typescript title="Job Sorting" theme={null}
let sortedJobs = [...allJobs];

if (currentSort === 'recent') {
  // Sort by posting date (newest first)
  sortedJobs.sort((a, b) => 
    new Date(b.data.posted).getTime() - new Date(a.data.posted).getTime()
  );
} else if (currentSort === 'deadline') {
  // Sort by deadline (soonest first)
  sortedJobs.sort((a, b) => 
    new Date(a.data.deadline).getTime() - new Date(b.data.deadline).getTime()
  );
}
```

### JobCard Component

Displays job summary with status:

```astro title="src/components/jobs/JobCard.astro" theme={null}
---
interface Props {
  job: any;
  featured?: boolean;
  isExpired: boolean;
}

const { job, featured = false, isExpired } = Astro.props;
---

<a href={`/jobs/${job.id}`} class="job-card">
  {featured && <span class="badge-featured">Featured</span>}
  {isExpired && <span class="badge-expired">Expired</span>}
  
  <h3>{job.data.title}</h3>
  <p class="organization">{job.data.organization}</p>
  <p class="meta">
    {job.data.type} • {job.data.location}
  </p>
  <p class="description">{job.data.description}</p>
  
  <div class="skills">
    {job.data.skills?.map(skill => (
      <span class="skill-tag">{skill}</span>
    ))}
  </div>
  
  <div class="footer">
    <span class="deadline">
      Deadline: {formatDate(job.data.deadline)}
    </span>
  </div>
</a>
```

### Pagination

Jobs paginated at 6 per page:

```astro title="Pagination Logic" theme={null}
const jobsPerPage = 6;
const currentPage = Number(Astro.params.page) || 1;
const start = (currentPage - 1) * jobsPerPage;
const end = start + jobsPerPage;
const paginatedJobs = sortedJobs.slice(start, end);
const totalPages = Math.ceil(sortedJobs.length / jobsPerPage);
```

## SEO & Structured Data

Jobs include Schema.org JobPosting markup:

```json title="Job Structured Data" theme={null}
{
  "@context": "https://schema.org",
  "@type": "JobPosting",
  "title": "Content Curator & Editor",
  "description": "Join Dzaleka Digital Heritage as a Content Curator...",
  "datePosted": "2025-03-12",
  "validThrough": "2025-05-12",
  "employmentType": "PART_TIME",
  "hiringOrganization": {
    "@type": "Organization",
    "name": "Dzaleka Digital Heritage"
  },
  "jobLocation": {
    "@type": "Place",
    "address": {
      "@type": "PostalAddress",
      "addressLocality": "Dzaleka",
      "addressRegion": "Dowa",
      "addressCountry": "Malawi"
    }
  },
  "baseSalary": {
    "@type": "MonetaryAmount",
    "currency": "MWK",
    "value": {
      "@type": "QuantitativeValue",
      "value": 50000,
      "unitText": "MONTH"
    }
  }
}
```

This enables Google Jobs integration and rich search results.

## Job Categories

Supported categories:

* **business** - Administration, management, operations
* **technology** - Software, IT, digital roles
* **education** - Teaching, tutoring, training
* **healthcare** - Medical, nursing, counseling
* **creative** - Design, photography, writing
* **community** - Social work, advocacy, outreach
* **other** - Miscellaneous opportunities

## Employment Types

* **full-time** - 40+ hours per week, long-term
* **part-time** - Less than 40 hours per week
* **contract** - Fixed-term project-based work
* **volunteer** - Unpaid community service
* **internship** - Training and learning opportunity

## Best Practices

<CardGroup cols={2}>
  <Card title="Realistic Deadlines" icon="calendar">
    Give applicants at least 2 weeks to prepare quality applications.
  </Card>

  <Card title="Clear Requirements" icon="list">
    Specify must-have vs. nice-to-have skills to avoid discouraging qualified candidates.
  </Card>

  <Card title="Transparent Compensation" icon="dollar-sign">
    Include salary range or stipend amount when possible to save everyone's time.
  </Card>

  <Card title="Detailed Application Instructions" icon="file-text">
    Clearly state what documents to send and how to submit them.
  </Card>
</CardGroup>

## Common Issues

<Accordion title="Job showing as expired but deadline hasn't passed">
  Check the date format in frontmatter. Must be YYYY-MM-DD:

  ```yaml theme={null}
  deadline: 2025-05-12  # Correct
  deadline: 12-05-2025  # Wrong - will cause parsing errors
  ```
</Accordion>

<Accordion title="Skills tags not displaying">
  Skills must be a YAML array with proper indentation:

  ```yaml theme={null}
  skills:  # Colon after 'skills'
    - Skill one  # Dash, space, then skill name
    - Skill two
    - Skill three
  ```
</Accordion>

<Accordion title="Job not appearing in active listings">
  Verify:

  1. `status: "open"` is set
  2. `deadline` is in the future
  3. File is saved in `src/content/jobs/` directory
  4. Frontmatter YAML is valid (check indentation)
</Accordion>

## Statistics Dashboard

View job board analytics at `/jobs/stats` (admin only):

* Total active jobs
* Jobs by category breakdown
* Average time to fill positions
* Most in-demand skills
* Application trends over time

## Related Resources

<Card title="Jobs About Page" href="/jobs/about" icon="info">
  Learn about the job board mission, policies, and tips for job seekers.
</Card>

<CardGroup cols={2}>
  <Card title="Services" href="/features/services" icon="building">
    Organizations offering employment
  </Card>

  <Card title="E-Learning" href="/features/e-learning" icon="graduation-cap">
    Courses to build job skills
  </Card>
</CardGroup>
