version: "1.0"

project:
  id: "urban-bird-watch-2026"
  name: "Urban Bird Watch"
  description: "Citizen-science survey of bird abundance and diversity in urban habitats."
  organization: "Community Ecology Network"
  contact_email: "surveys@example.org"
  license: "CC-BY-4.0"

survey:
  season:
    start_date: "2026-04-01"
    end_date: "2026-06-30"
  protocol:
    method: "stationary_point_count"
    duration_minutes: 10
    observation_radius_meters: 100
    visits_per_site: 3
    minimum_days_between_visits: 7
    allowed_start_time: "05:30"
    allowed_end_time: "10:30"
  conditions:
    maximum_wind_beaufort: 3
    precipitation_allowed: false
    minimum_visibility_meters: 500

sites:
  source: "config/survey-sites.geojson"
  coordinate_reference_system: "EPSG:4326"
  require_landowner_permission: true
  habitat_categories:
    - urban_park
    - residential
    - wetland
    - woodland
    - agricultural_edge

observations:
  required_fields:
    - survey_id
    - observer_id
    - site_id
    - observed_at
    - species_code
    - count
    - detection_method
  optional_fields:
    - distance_band
    - breeding_evidence
    - age
    - sex
    - notes
    - media_urls
  validation:
    minimum_count: 1
    maximum_count_without_review: 100
    accepted_detection_methods:
      - seen
      - heard
      - seen_and_heard
    accepted_distance_bands_meters:
      - "0-25"
      - "26-50"
      - "51-100"
      - ">100"
    allow_unknown_species: true
    require_photo_for_rare_species: true
    rare_species_list: "config/regional-rare-species.csv"

participants:
  minimum_age: 13
  guardian_consent_required_under_age: 16
  training:
    required: true
    course_url: "https://example.org/training/urban-bird-watch"
    passing_score_percent: 80
  privacy:
    publish_observer_names: false
    obscure_sensitive_species_locations: true
    sensitive_location_precision_km: 10

quality_control:
  automated_checks:
    - schema_validation
    - coordinate_bounds
    - duplicate_submission
    - date_and_time_range
    - species_seasonality
    - unusually_high_count
  expert_review:
    enabled: true
    queue: "regional-reviewers"
    response_target_days: 7
  duplicate_window:
    time_minutes: 15
    distance_meters: 50

storage:
  database:
    engine: "postgresql"
    host: "${DB_HOST}"
    port: 5432
    name: "bird_survey"
    ssl_mode: "require"
  media:
    provider: "s3"
    bucket: "${MEDIA_BUCKET}"
    region: "ca-central-1"
    allowed_types:
      - "image/jpeg"
      - "image/png"
      - "audio/mpeg"
      - "audio/wav"
    maximum_file_size_mb: 25
  backups:
    enabled: true
    schedule: "0 3 * * *"
    retention_days: 90

api:
  base_path: "/api/v1"
  rate_limit_per_minute: 120
  authentication:
    method: "oauth2"
    issuer: "${OAUTH_ISSUER}"
  cors:
    allowed_origins:
      - "https://survey.example.org"

exports:
  public_dataset:
    enabled: true
    format:
      - csv
      - geojson
      - darwin_core_archive
    schedule: "0 5 * * 1"
    exclude_fields:
      - observer_id
      - observer_email
      - exact_sensitive_coordinates
  research_archive:
    enabled: true
    embargo_days: 30

notifications:
  submission_receipt: true
  review_decision: true
  seasonal_reminders: true
  email_from: "Urban Bird Watch <noreply@example.org>"

monitoring:
  health_endpoint: "/health"
  metrics_endpoint: "/metrics"
  logging:
    level: "info"
    redact_personal_data: true
  alerts:
    failed_export_threshold: 2
    review_backlog_threshold: 500