Skip to content

Phase 2: Backend and CLI integration for EZID DOI provider #107

Closed

Description

@neuromechanist

Summary

Integrate EZID as the primary DOI provider in the backend API endpoints, CLI commands, and publication orchestrator. Keep Zenodo as backup archive only.

Deliverables

Database

  • Migration 0007_ezid.sql: Add ezid_identifier, ezid_status, doi_provider columns to datasets
  • Migration: Add orcid column to users table (TEXT, nullable for existing users)

Registration (ORCID)

  • Update nemar auth signup CLI to collect ORCID (validated format: XXXX-XXXX-XXXX-XXXX)
  • Update backend /auth/signup Zod schema to accept orcid field
  • Store ORCID in users table
  • Add orcid to GET /users/me response
  • Auto-populate uploader's ORCID in bidsToDataCite creator enrichment

Backend DOI Integration

  • Update backend/src/types/bindings.ts: Add EZID_USERNAME, EZID_PASSWORD secrets
  • Update DOI endpoints in backend/src/routes/admin.ts to branch on provider (EZID vs Zenodo)
  • Update publication orchestrator step 5 to use EZID for DOI creation
  • Update Zenodo steps to create draft-only depositions (no public DOI)

CLI

  • Update src/lib/api.ts with extended request/response types
  • Update src/commands/admin.ts with --provider option
  • New nemar admin doi update command for metadata updates on existing DOIs

Why ORCID at Signup

Every dataset the user creates will have their ORCID automatically included in the DataCite XML metadata. This ensures:

  • Proper author attribution in DOI records
  • Machine-readable author identification across all their datasets
  • No need to manually enrich the uploader's ORCID per dataset (Phase 3 handles co-author ORCIDs)

ORCID format: XXXX-XXXX-XXXX-XXXX (16 digits with hyphens, last char may be X for checksum)

Dependencies

Requires Phase 1 (EZID service + DataCite XML builder) -- COMPLETED in PR #109

Activity

  1. added
    P1
    feature
    backend
    cli
    on Feb 10, 2026
  2. added 2 commits that reference this issue on Feb 11, 2026
    4a18316
    6143dd3
  3. neuromechanist commented on Feb 11, 2026

    @neuromechanist
    ContributorAuthor

    All Phase 2 deliverables completed in PR #110 (merged):

    Database:

    • Migration 0007_ezid.sql: ezid_identifier, ezid_status, doi_provider on datasets
    • orcid column on users table
    • dataset_versions table for HasVersion relation tracking

    Registration (ORCID):

    • nemar auth signup collects ORCID (validated format)
    • Backend /auth/signup Zod schema accepts orcid
    • Stored in users table, returned in GET /users/me
    • Auto-populated in DataCite creator metadata via buildOrcidEnrichment

    Backend DOI Integration:

    • EZID_USERNAME, EZID_PASSWORD secrets in bindings
    • DOI dispatch layer (doi.ts) routes to EZID or Zenodo per dataset
    • Publication orchestrator uses provider dispatch
    • Webhook handler branches on doi_provider

    CLI:

    • --provider option on nemar admin doi create
    • nemar admin doi update command (make-public, refresh metadata)

    Follow-up: Deterministic DOI naming (#111, PR #112) further improved the EZID integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1backendclifeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions