Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
a5bad40
Initialize OpenCite MVP scaffold with CFF and Zenodo generation
beanbean9339 May 29, 2026
10f6e25
Fix CITATION.cff author structure and update package.json and _metada…
beanbean9339 May 29, 2026
b415f12
Add .gitignore for Vite React project to exclude build artifacts and …
beanbean9339 May 29, 2026
8122590
fix: stop tracking node_modules and clean gitignore
beanbean9339 May 29, 2026
563db9a
chore: remove build artifacts and vite cache from tracking
beanbean9339 May 29, 2026
40f638a
fix: update .gitignore to include .vite and reorder entries
beanbean9339 May 29, 2026
901b56a
refactor: unify metadata normalization for CITATION.cff and Zenodo ou…
beanbean9339 May 29, 2026
3cc3a2d
feat: add structured author metadata and affiliations
beanbean9339 May 30, 2026
a3e678d
feat: add references support for Zenodo metadata
beanbean9339 May 30, 2026
842d755
feat: expand metadata form and align CITATION.cff/zenodo exports with…
beanbean9339 May 30, 2026
2a8336b
feat: replace license input with SPDX dropdown
beanbean9339 May 30, 2026
8ca1e8d
feat: expand controlled work type options
beanbean9339 May 30, 2026
0545bea
fix: set default type of work to software
beanbean9339 Jun 1, 2026
8bea305
Merge branch 'main' into feature/add-metadata-fields
beanbean9339 Jun 1, 2026
65f5ab9
feat: standardize metadata input/export pipeline and align citation/z…
beanbean9339 Jun 3, 2026
5d09a4f
feat: restore structured authors and align zenodo/cff metadata export…
beanbean9339 Jun 3, 2026
863cee6
Merge branch 'main' into feature/add-metadata-fields
beanbean9339 Jun 3, 2026
06e8fe5
refactor(app): remove duplicate helpers and dead code in App.jsx
beanbean9339 Jun 3, 2026
fd84c68
refactor(app): unify metadata normalization pipeline around normalize…
beanbean9339 Jun 3, 2026
19fbb75
chore(app): remove unused indentBlock helper and dead code
beanbean9339 Jun 3, 2026
f6ec1a0
refactor(app): centralize keyword deduplication in normalizeKeywords
beanbean9339 Jun 3, 2026
bcf313b
refactor(app): unify metadata pipeline for preview, validation, and e…
beanbean9339 Jun 3, 2026
5b955c5
chore(app): align typeOfWork options with PR spec
beanbean9339 Jun 3, 2026
11e9dcc
fix(cff): export dynamic type from selected work type
beanbean9339 Jun 3, 2026
1f0ee07
feat(zenodo): add upload_type mapping from selected work type in export
beanbean9339 Jun 3, 2026
ed09253
fix(orcid): strip www.orcid.org URLs in Zenodo ORCID normalization
beanbean9339 Jun 3, 2026
73fd27e
fix(cff): replace placeholder commit tree and remove angle-bracket fa…
beanbean9339 Jun 3, 2026
170d17c
feat(cff): output abstract as YAML block scalar with preserved multil…
beanbean9339 Jun 3, 2026
42a6f9c
refactor(cff/zenodo): standardize metadata exports and normalization …
beanbean9339 Jun 3, 2026
c313063
chore(app): reorder typeOfWork options to article,dataset,software,other
beanbean9339 Jun 3, 2026
05b4b54
Update src/App.jsx
beanbean9339 Jun 7, 2026
0f30691
Update src/App.jsx
beanbean9339 Jun 7, 2026
7707122
Update src/App.jsx
beanbean9339 Jun 7, 2026
eb2bcc2
docs: add helper text for References field
beanbean9339 Jun 7, 2026
2a497d1
style: make title full-width and clarify references format
beanbean9339 Jun 7, 2026
cd32f5d
refactor(app): remove redundant metadata cleanup code
beanbean9339 Jun 7, 2026
8433814
style(preview): add spacing below toggle buttons
beanbean9339 Jun 7, 2026
883edcd
docs(ui): remove "without a backend" from hero text
beanbean9339 Jun 7, 2026
e92e780
feat(app): improve metadata form guidance, refactor services, and ref…
beanbean9339 Jun 8, 2026
1df6590
Refactor metadata pipeline into focused modules and extract MetadataF…
beanbean9339 Jun 10, 2026
dde032a
Merge branch 'main' into feature/refactor-metadata-pipeline
beanbean9339 Jun 11, 2026
f2886c5
feat(metadata): add shared project metadata model
beanbean9339 Jun 13, 2026
d40278f
feat(import): add GitHub fetch-and-enrich metadata importer
beanbean9339 Jun 13, 2026
13f3f26
refactor(services): route github service exports to importer
beanbean9339 Jun 13, 2026
f529b79
docs(examples): add GitHub importer usage examples
beanbean9339 Jun 13, 2026
d1acb44
feat(ui): add GitHub metadata import flow to form
beanbean9339 Jun 13, 2026
835bc26
style(ui): add GitHub import panel and feedback styles
beanbean9339 Jun 13, 2026
f122b33
feat(import): add token-authenticated GitHub API requests to avoid ra…
beanbean9339 Jun 13, 2026
5fa5f81
feat(authors): add arrow-button reordering for author order in exports
beanbean9339 Jun 13, 2026
01e1a95
feat(export): add one-click ZIP download for CITATION.cff and .zenodo…
beanbean9339 Jun 13, 2026
3299181
fix(export): restore canonical .zenodo.json filename in UI labels and…
beanbean9339 Jun 13, 2026
c817e20
docs(ui): clarify that exported Zenodo metadata filename is .zenodo.j…
beanbean9339 Jun 13, 2026
0546476
Improve GitHub author import by parsing concatenated names into first…
beanbean9339 Jun 15, 2026
e560233
feat(app): warn before export when citation references are missing
beanbean9339 Jun 24, 2026
168b1cb
Merge branch 'main' into feature/github-metadata-import
beanbean9339 Jun 30, 2026
2eec189
Rebase GitHub contributor fallback on main; keep limit/filter/warning…
beanbean9339 Jun 30, 2026
042664b
feat: enhance metadata validation and error handling in forms
beanbean9339 Jul 1, 2026
c77705c
Add preview copy-to-clipboard with transient button feedback and spam…
beanbean9339 Jul 1, 2026
c54cd70
Add required field stars and helper note, and enforce Version as requ…
beanbean9339 Jul 1, 2026
d26f5aa
Align CITATION identifiers with GitHub release tags by adding release…
beanbean9339 Jul 1, 2026
eaedd41
Strengthen metadata UX with required-field guidance, smart GitHub def…
beanbean9339 Jul 1, 2026
aed022c
feat: implement ORCID candidate search and suggestion functionality i…
beanbean9339 Jul 4, 2026
ed0ff7a
feat: enhance version input guidance with placeholder and helper note
beanbean9339 Jul 4, 2026
9381db0
feat: enhance warning handling and messaging in GitHub importer
beanbean9339 Jul 4, 2026
d5ee61d
feat: enhance ORCID validation with checksum verification and update …
beanbean9339 Jul 4, 2026
855709c
feat: implement GitHub metadata import functionality
beanbean9339 Jul 4, 2026
45e714a
feat: improve handling of ORCID suggestions by removing deleted entries
beanbean9339 Jul 4, 2026
1611649
feat: improve author reordering logic and update ORCID suggestions ha…
beanbean9339 Jul 4, 2026
9fea969
feat: add validation summary and loading indicators for download buttons
beanbean9339 Jul 8, 2026
d3506b1
docs+ui: expand contributor/agent guidance, add release/citation reso…
beanbean9339 Jul 12, 2026
ff57bd4
docs+meta+ci: add public-release readiness docs/policies, semver+rele…
beanbean9339 Jul 12, 2026
4ff48ee
feat(metadata+docs+ci): harden citation/zenodo provenance with dual-f…
beanbean9339 Jul 13, 2026
7d7d49d
feat: enhance metadata handling with comprehensive validation and com…
beanbean9339 Jul 14, 2026
5fd5ff6
fix(orcid): normalize only valid ORCID IDs and accept bare orcid.org …
beanbean9339 Jul 20, 2026
82b9cc9
fix(citation): accept quoted and unquoted CFF scalar fields in validator
beanbean9339 Jul 20, 2026
7b0781e
fix(form): add safe defaults for MetadataForm errors/orcid/grant sugg…
beanbean9339 Jul 20, 2026
c5f6416
chore(ui): remove Copy .zenodo.json action and related unused state/h…
beanbean9339 Jul 20, 2026
08d1ce8
fix(validation): require publication date before ISO date format checks
beanbean9339 Jul 20, 2026
26cce82
fix(citation): omit empty reference author fields while preserving OR…
beanbean9339 Jul 20, 2026
37a9d9c
fix(importer): make repository file inspection explicit opt-in to red…
beanbean9339 Jul 20, 2026
23c2d53
fix(citation): remove grants processing from citation CFF generation
beanbean9339 Jul 24, 2026
8fc4e74
fix(importer): add contributor fallback limit to GitHub metadata import
beanbean9339 Jul 24, 2026
7c322b3
Align Code of Conduct with Imageomics principles, AI use policy, valu…
beanbean9339 Jul 29, 2026
50c0e45
Refine CONTRIBUTING guide with Imageomics-aligned PR checklist, colla…
beanbean9339 Jul 29, 2026
5264300
Align CONTRIBUTING with Imageomics collaboration values and clearer P…
beanbean9339 Jul 29, 2026
8559a69
docs: enhance README with detailed usage, validation behavior, and kn…
beanbean9339 Jul 29, 2026
8e9d623
docs: update AGENTS.md for clarity and alignment with Imageomics coll…
beanbean9339 Jul 29, 2026
469b8fd
feat: enhance importGithubMetadata to decode UTF-8 citation content a…
beanbean9339 Jul 29, 2026
7a33ebe
feat: enhance citation health checks with version, license normalizat…
beanbean9339 Jul 29, 2026
ed7c536
feat: implement request ID tracking for GitHub metadata import to pre…
beanbean9339 Jul 30, 2026
2375cc0
feat: add validation for duplicate authors in metadata and correspond…
beanbean9339 Jul 30, 2026
3f2018a
feat: enhance author management in MetadataForm with expandable rows …
beanbean9339 Jul 30, 2026
44fc32d
feat: update documentation for GitHub import and downstream verificat…
beanbean9339 Jul 30, 2026
6a313c5
feat: integrate Zenodraft for .zenodo.json validation and update depe…
beanbean9339 Aug 3, 2026
b0eeab7
Fix GitHub author import/dedup and adopt pinned zenodraft validation
beanbean9339 Aug 3, 2026
58d860c
ci: update GitHub Actions workflows to use Node.js 22 LTS instead of …
beanbean9339 Aug 4, 2026
f7ceffb
chore: update LICENSE copyright holder to Imageomics Institute
beanbean9339 Aug 4, 2026
33d8cae
docs: align Code of Conduct with Imageomics guidance and repository c…
beanbean9339 Aug 4, 2026
7195e70
docs: clarify GitHub metadata import uses default branch and not bran…
beanbean9339 Aug 4, 2026
2e7475d
Move provenance metadata files to seprate PR
beanbean9339 Aug 4, 2026
48137d2
docs: add guidelines for AI-assisted contributions in the Code of Con…
beanbean9339 Aug 4, 2026
fa40145
Remove CI workflow moved to provenance PR
beanbean9339 Aug 4, 2026
ce5dd81
docs: enhance Code of Conduct with detailed contributor expectations …
beanbean9339 Aug 4, 2026
5d37390
fix: standardize version format by removing 'v' prefix in metadata ac…
beanbean9339 Aug 6, 2026
1dc7e6f
refactor: update citation file handling to prefer canonical CITATION.…
beanbean9339 Aug 6, 2026
87af45f
refactor: remove grant ID validation and related tests from citation …
beanbean9339 Aug 6, 2026
7e0bbcd
test: clarify test description for ignoring lowercase citation.cff files
beanbean9339 Aug 6, 2026
3a6e8d5
refactor: Update CITATION message to reference associated references …
beanbean9339 Aug 6, 2026
5a35c62
test: add test for preferring CITATION.cff version over latest releas…
beanbean9339 Aug 6, 2026
5e0d8e8
feat: implement GitHub API integration for metadata import and refact…
beanbean9339 Aug 6, 2026
e677fec
refactor: move test files into a separate root tests folder and updat…
beanbean9339 Aug 8, 2026
dac98f5
feat: add authors validation to citation metadata and update tests
beanbean9339 Aug 8, 2026
c0e4e92
feat: enhance importGithubMetadata to preserve fallback metadata when…
beanbean9339 Aug 8, 2026
2dce611
feat: update citation file check to reflect missing CITATION.cff with…
beanbean9339 Aug 8, 2026
33b882f
feat: update zenodo file check warning message for clarity and add co…
beanbean9339 Aug 8, 2026
d686dda
feat: add semantic versioning checks and update related tests
beanbean9339 Aug 8, 2026
f4f6d39
feat: update version and release date checks to improve validation lo…
beanbean9339 Aug 8, 2026
3b81666
feat: update DOI check logic and tests to improve clarity and handlin…
beanbean9339 Aug 8, 2026
bd2d2b2
feat: add tests for citation health scan to improve validation coverage
beanbean9339 Aug 8, 2026
9ab97af
feat: update GitHub token handling to improve clarity in authenticati…
beanbean9339 Aug 14, 2026
6214a73
feat: refine semantic versioning handling in metadata form and valida…
beanbean9339 Aug 28, 2026
1c32c55
Revert "feat: refine semantic versioning handling in metadata form an…
beanbean9339 Aug 28, 2026
ac40028
feat: update README with local run instructions, funding acknowledgem…
beanbean9339 Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# AGENTS.md

Guidance for contributors and coding agents working in this repository.

## Quick Start

1. Confirm the request scope and avoid unrelated changes.
2. Read `README.md` and the relevant files in `src/` before editing.
3. Make the smallest viable change; do not restructure folders or rename files unless requested.
4. Run only the checks needed for the change (`npm run test` and/or `npm run build`).
5. Summarize what changed, why it changed, and any follow-up work.

> When in doubt: prefer existing project patterns over introducing new abstractions.

## Project Overview

OpenCite is a Vite + React single-page app that helps users generate two metadata files from one form:
- `CITATION.cff`
- `.zenodo.json`

OpenCite is browser-based and deployed through GitHub Pages
(`https://imageomics.github.io/OpenCite/`).

Primary goals:
- Keep metadata exports valid and stable.
- Keep the form workflow predictable and easy to edit.
- Preserve browser-first behavior (no Node-only runtime assumptions in app code).
- Maintain metadata quality through import, validation, comparison, and health
feedback workflows.

## Tech Stack

- React 18
- Vite 5
- Plain JavaScript (ES modules)
- Node test runner (`node --test`) for utility-level tests

## Commands

Run from repo root:

```bash
npm install
npm run dev
npm run build
npm run test
npm run validate:metadata
npm run preview
```

## Imageomics Collaboration Expectations

Contributions should align with Imageomics principles of:

- Transparency
- Accountability
- Collaboration
- Safety

Expected behavior:

- Communicate clearly and respectfully.
- Keep changes focused and explain assumptions and tradeoffs.
- Provide enough context for others to reproduce and review results.

## Key File Map

- `README.md`
- Contributor-facing run instructions plus release/citation metadata workflow guidance.
- `CONTRIBUTING.md`
- Project contribution workflow, branch/PR conventions, and review expectations.
- `src/App.jsx`
- Main app orchestration: form state, previews, export flow, import flow.
- `src/components/MetadataForm.jsx`
- Form UI rendering and field-level interactions.
- `src/validation/validation.js`
- Input normalization and validation checks.
- `src/metadata/normalizeMetadata.js`
- Canonical metadata shaping before export.
- `src/services/citation.js`
- `CITATION.cff` serialization.
- `src/services/zenodo.js`
- `.zenodo.json` serialization.
- `src/services/githubImporter.js`
- GitHub import pipeline; returns `{ metadata, warnings, errors, review, healthScan, comparisons }`.
- `src/services/github.js`
- Legacy re-export surface for GitHub import API compatibility.
- `src/services/orcidSearch.js`
- ORCID candidate lookup and scoring helpers.
- `src/utils/*.js`
- Parsing/normalization helpers for authors, grants, keywords, references, ORCID.

## Repository Conventions

1. Use explicit `.js` and `.jsx` import specifiers in source files.
2. Canonical Zenodo export filename is `.zenodo.json` (with leading dot).
- App export uses a direct browser download path for `.zenodo.json`; verify
filename behavior in your browser environment when validating releases.
3. For browser/Vite runtime configuration, prefer `import.meta.env` over `process.env`.
4. Preserve `CITATION.cff` export behavior, including identifiers for release URL and tag tree/commit URL when applicable.
5. Keep changes focused and minimal; avoid unrelated refactors.
6. Do not restructure folders, rename files, or alter public service APIs unless explicitly requested.

## Workflow Expectations

1. Read relevant files before editing.
2. Make the smallest viable change that satisfies the request.
3. If the request is documentation-only, update existing docs first (`README.md`, `CONTRIBUTING.md`, `AGENTS.md`) before creating new docs.
4. Run targeted checks:
- `npm run test` for logic changes.
- `npm run build` for UI/export pipeline changes.
5. If behavior changes user output, verify both generated files still render and download correctly.
6. Summarize exactly what changed and why.

## Scope Boundaries

- Do not perform broad formatting passes or cleanup-only changes outside the requested area.
- Do not replace existing workflows with new patterns when a localized fix is sufficient.
- Prefer updating existing documentation sections over creating new docs files.

## Validation and Data Rules

- Required metadata fields are validated before export.
- ORCID values must pass format/checksum validation when provided.
- Grant IDs use: `<funder-code>::<grant-number>`.
- Publication date should be a real `YYYY-MM-DD` date.
- References may be plain-text lines or structured blocks; do not silently drop entries.

## UI and Interaction Expectations

- Keep export notices actionable and specific.
- Do not remove confirmation safeguards that prevent accidental low-quality exports.
- Preserve author ordering tools and ORCID suggestion flow.

## Backward Compatibility

- Do not break public function names used across `src/services/*`.
- Keep `src/services/github.js` compatibility exports intact unless migration is requested.
- Avoid changing file names used in download/export without explicit request.

## Definition of Done for Agent Changes

- Code compiles (`npm run build`).
- Tests pass (`npm run test`) or test impact is clearly documented.
- No unintended changes to export filenames or core metadata shape.
- Any new assumptions are documented in README or inline code comments where needed.
148 changes: 148 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# OpenCite Code of Conduct

OpenCite aligns with the Imageomics community Code of Conduct. All community
members and contributors are expected to engage respectfully, responsibly, and
constructively in project spaces.

## Scope

This Code of Conduct applies to all OpenCite project spaces, including:

- GitHub issues, discussions, pull requests, and code reviews.
- Documentation, examples, and repository contributions.
- Project-related communication channels and community interactions.

All contributors, maintainers, reviewers, and users participating in these
spaces are expected to follow these guidelines.

## Principles of Engagement

- Listen to understand.
- Speak to be understood, and recognize that everyone is learning.
- Embrace "Yes and..." by focusing on possibilities and being inclusive of ideas.
- Take space and make space to encourage balanced participation.
- Beware of blind spots and recognize differences in experience and perspective.
- Respect time and boundaries during discussions.
- Care for each other as members of the community.

## Repository Contributor Expectations

In repository spaces, contributors are expected to:

- Demonstrate empathy and respect in discussions, reviews, and decisions.
- Give and receive constructive feedback focused on ideas, code, and outcomes.
- Take responsibility for mistakes, address impacts, and help resolve issues.
- Use welcoming and inclusive language.
- Avoid harassment, personal attacks, discriminatory language, and disruptive
behavior.

## Pull Request and Review Guidelines

Contributors should:

- Provide clear context about changes, design decisions, and known limitations.
- Keep pull requests focused and manageable when possible.
- Respond to review feedback thoughtfully and respectfully.
- Distinguish technical disagreement from personal disagreement.
- Review contributions based on technical merit, project goals, and community
standards.
- Recognize that feedback is intended to improve the project rather than
criticize individuals.

## Issues and Discussions

Contributors should:

- Provide sufficient context when creating issues or discussions.
- Share reproducible examples when reporting bugs.
- Avoid dismissive, hostile, or unconstructive responses.
- Help maintain discussions that are respectful, focused, and useful for
improving the project.

## AI-Assisted Contributions

AI tools may be used during development, but contributors are responsible for
reviewing and understanding all submitted changes.

Contributors remain responsible for ensuring correctness, licensing compliance,
and appropriate handling of confidential, private, or restricted information.

When using AI-assisted tools:

- Verify generated code before submitting a pull request.
- Ensure contributions follow project licensing and attribution requirements.
- Do not include confidential, private, or restricted information in AI tools.
- Treat AI-generated suggestions as reviewable input rather than automatically
trusted output.

Contributors should disclose substantial AI-assisted contributions when they
meaningfully influence the design, implementation, documentation, or review
process of a change.

## Learning and Collaboration

OpenCite welcomes contributors with different levels of experience.
Contributors are encouraged to:

- Ask questions when clarification is needed.
- Share knowledge and provide constructive guidance.
- Recognize that mistakes are part of the development process.

## Community Values

### Transparency

Be clear about assumptions, uncertainty, and limits. Share information and
processes openly whenever possible.

### Accountability

Take responsibility for outcomes and ensure methods align with intended use.

### Collaboration

Build welcoming environments, value diverse perspectives, and work together
creatively. Respect the goals of open science, reproducibility, and responsible
software development.

### Safety

Practice ethical and responsible approaches, address issues, and promote good
governance.

## Maintainer Responsibilities

Project maintainers are responsible for:

- Helping maintain a welcoming and respectful environment.
- Reviewing contributions fairly and consistently.
- Addressing concerns and reports appropriately.
- Communicating decisions and expectations clearly.
- Focusing discussions on technical decisions, tradeoffs, and project goals
rather than individuals.
- Approaching discussions with good intent while remaining open to correcting
misunderstandings.

## Enforcement and Reporting

Misconduct is prohibited in all project spaces and interactions.

Violations may result in removal from the project and further action as
appropriate.

If you experience or witness concerning behavior, report it by contacting
project maintainers through the repository support channels. Security concerns
should be reported according to the process described in SECURITY.md.

Reports will be reviewed promptly, and privacy will be protected as much as
possible.

## Attribution

This Code of Conduct is adapted from the Imageomics Guide / Collaborative
Distributed Science Guide developed by the Imageomics Institute and ABC Global
Center. The original community principles were adapted to address repository
contributions, code review, and software development practices.

Source:
https://imageomics.github.io/Imageomics-guide/CODE_OF_CONDUCT/
Loading