WIP: DOI auto-fetch — Crossref prefill for the publication and EKKW forms #83

Draft
laoc wants to merge 1 commit from feat/doi-autofetch into dev
Owner

Gap 1 from the EKKW research, started per laoc's go. First slice landed: pure Crossref work-message → PublicationPrefill mapping (title, authors incl. ORCID normalization + organizations, issued date-parts, container-title, volume/issue for Band/Heft, JATS-stripped abstract, language, keywords) plus a best-effort fetch wrapper with injectable fetch — mirrors urlMetadata.js, degrades to {} on any failure, mutation-tested (4/4 biting).

Still to come on this branch: the doi rich field type via the adapter registry (foreign clients degrade it to a text field, so templates stay Formstr-compliant) and sibling prefill wiring in the template form + /create/publication.

Buzz thread: #edufeed-app (EKKW form thread).

🤖 Generated with Claude Code

Gap 1 from the EKKW research, started per laoc's go. First slice landed: pure Crossref work-message → PublicationPrefill mapping (title, authors incl. ORCID normalization + organizations, issued date-parts, container-title, volume/issue for Band/Heft, JATS-stripped abstract, language, keywords) plus a best-effort fetch wrapper with injectable fetch — mirrors urlMetadata.js, degrades to {} on any failure, mutation-tested (4/4 biting). Still to come on this branch: the `doi` rich field type via the adapter registry (foreign clients degrade it to a text field, so templates stay Formstr-compliant) and sibling prefill wiring in the template form + /create/publication. Buzz thread: #edufeed-app (EKKW form thread). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Pure work-message → PublicationPrefill mapping plus a best-effort fetch
wrapper with injectable fetch, mirroring urlMetadata.js exactly: only
found fields are returned, callers fill empty form fields only, any
failure degrades to {} and never blocks the form.

Handles the wire shapes Crossref actually serves: title/container-title
as arrays, issued date-parts (year-only through full date), JATS-tagged
abstracts, ORCID as URI (http normalized to https, matching the app's
canonical form), organization authors (name without family), first
affiliation. volume/issue come along for the EKKW Band/Heft fields.

Crossref serves CORS, so the browser can call it directly — no proxy;
the mailto politeness param is left for when a contact address is
configured.

Next slices: the `doi` rich field type via the adapter registry (foreign
clients degrade it to text) and sibling prefill in the template form.
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/doi-autofetch:feat/doi-autofetch
git switch feat/doi-autofetch

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch dev
git merge --no-ff feat/doi-autofetch
git switch feat/doi-autofetch
git rebase dev
git switch dev
git merge --ff-only feat/doi-autofetch
git switch feat/doi-autofetch
git rebase dev
git switch dev
git merge --no-ff feat/doi-autofetch
git switch dev
git merge --squash feat/doi-autofetch
git switch dev
git merge --ff-only feat/doi-autofetch
git switch dev
git merge feat/doi-autofetch
git push origin dev
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
edufeed/edufeed-app!83
No description provided.