Pathfinder Docs

Documentation Preview

Corps Module Architecture

Source: `docs/architecture/CORPS_ARCHITECTURE.md`View on GitHub

Corps Module Architecture

Volunteer Network & Event Management for Pathfinder CRM

Version: 1.0
Date: January 2026
Status: Design Phase

Last verified against code: 2025-02-03. Corps module is registered in lib/modules.ts; full volunteer/recruiter/admin UI may not yet be implemented.


Executive Summary

Corps is a volunteer network and event management module designed for community organizations, shelters, and coordinators. It enables organizations to recruit, manage, and engage volunteers while tracking participation, hours, and impact for reporting and funding purposes.

Core Principles

  1. Human-Centered - Lightweight, welcoming UX that doesn't feel enterprise-heavy
  2. Privacy-First - No sensitive client/participant data collection
  3. Integration-Ready - Seamlessly connects with existing Pathfinder modules
  4. Standalone-Capable - Can operate independently for volunteer-only deployments
  5. Reporting-Focused - Built for funding narratives and grant justification

System Architecture

High-Level Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                           CORPS MODULE                                   │
├─────────────────────────────────────────────────────────────────────────┤
│  Volunteer Portal | Recruiter/Organizer Portal | Admin Dashboard         │
├─────────────────────────────────────────────────────────────────────────┤
│  CORPS API LAYER: /api/corps/volunteers, opportunities, hours, etc.      │
├─────────────────────────────────────────────────────────────────────────┤
│  DATA LAYER (Supabase): volunteer_profiles, volunteer_opportunities,    │
│  volunteer_signups, volunteer_hours, corps_notifications, etc.            │
└─────────────────────────────────────────────────────────────────────────┘

Integration Points

  • Organizations — Volunteer affiliations, event hosting
  • Users/Profiles — Authentication, volunteer identity
  • Module system — Corps is a CRM module with route /corps and tier-based access (standard, premium, enterprise)

Technical Implementation

Module Registration

Corps is registered in lib/modules.ts:

  • ModuleName: includes 'corps'
  • href: /corps
  • requiredTiers: ['standard', 'premium', 'enterprise']
  • ROUTE_MODULE_MAP: /corps'corps'

Middleware

CRM routes (including module-gated routes) are protected in middleware.ts; org-scoped users are checked for module access via hasModuleAccess and getRequiredModuleForRoute.


Security & Privacy

  • No Client Data — Corps does not collect or link to participant/client data
  • RLS — All Corps tables should implement RLS by role (volunteer, recruiter, corps_admin, admin)
  • Audit — Modifications can be logged to activities table

References


Use links in each imported doc to open its source.