Citoid

Citoid is a node.js service which locates citation data given an identifier or search term (such as URL), for use by RefToolbar and VisualEditor.

Installation
In order to have citoid functioning on your wiki in conjunction with VisualEditor, you'll need the following: VisualEditor and Parsoid, VisualEditor's Citation Tool, and a working installation of Zotero's translation server.

It is recommended that you have the following extensions in your extension folder: Extension:VisualEditor, Extension:Scribunto, Extension:Cite, Extension:TemplateData, and Extension:ParserFunctions, and Extension:Citoid.

VisualEditor and Citation Tool

 * 1) Set up MediaWiki: Manual:Installation_guide
 * 2) Set up Parsoid: Parsoid/Setup
 * 3) Set up VisualEditor: Extension:VisualEditor
 * 4) Set up Citation Tool: VisualEditor/Citation tool

Zotero's translation server
See: Translation-server installation instructions

Implementation
The citoid module will be a node.js service. A rough description of how the service would work is as follows:


 * 1) [client js] VisualEditor makes query for reference
 * 2) [node js] citoid considers cache and either responds with the previously stored result or…
 * 3) [third party] Query against DOI/ISBN/ISSN/URL sources and return citation.

Design
ID handlers:


 * ISBN/ISSN: - > WorldCat Search API
 * DOI: -> Send accept header to CrossRef.
 * If 204, resolve URL and send to Zotero.
 * If 404 or 406, fail.
 * URL: -> If DOI, send to DOI: handler. Else, send to Zotero.

There are two ways to get citations, DOI via cross ref and Zotero; which is better? Should URLs with DOI ids be sent to cross ref, or DOIs be resolved into URLs and sent to Zotero?

Related extensions and services

 * Zotero translation server -- xpcshell-based Zotero translation server, and https://github.com/zotero/zotero-node, an abandoned and old nodejs equivalent
 * Zotero field mappings, including vs. some cite templates
 * Wikipedia citation templates
 * VisualEditor/Citation_tool
 * Sample cite-tool definition on Wikipedia Beta
 * Restface (node.js restful api)