Library
@translation-helps/door43
Catalog client, ZIP resource fetcher, and parsers for Door43 / DCS Bible translation resources. Used by the REST API worker; MCP tools reach that API via ApiClient.
For AI assistants, see the MCP tools. Use this package to embed Door43 access in your own Worker or Node service.
Status: internal workspace package (
private: true). Not on npm yet — import from the monorepo. Publishing later is private: false + build + publish.Install (workspace)
package.json
{
"dependencies": {
"@translation-helps/door43": "*"
}
}Quickstart
example.ts
import {
catalogSearch,
getResourceZipUrl,
ZipResourceFetcher2,
parseTranslationNotesTsv,
} from "@translation-helps/door43";
const entries = await catalogSearch({
lang: "en",
subject: "Aligned Bible",
});
const resolved = await getResourceZipUrl("en", "Translation Notes");
if (!resolved) throw new Error("TN not found");
const fetcher = new ZipResourceFetcher2({
// Optional Cloudflare bindings:
// R2: env.ZIP_FILES,
// KV: env.TRANSLATION_HELPS_CACHE,
// waitUntil: (p) => ctx.waitUntil(p),
});
const zip = await fetcher.getOrDownloadZip(resolved.zipUrl);
const tsv = await fetcher.extractFileFromZip(zip, "tn_TIT.tsv");
const notes = parseTranslationNotesTsv(tsv ?? "", {
book: "TIT",
chapter: 2,
verse: 12,
});Platform injection
No Cloudflare types are required. Bindings are duck-typed structural interfaces:
| Need | Interface | Typical CF source |
|---|---|---|
| Catalog / TOC cache | KvLike | env.TRANSLATION_HELPS_CACHE |
| ZIP persistence | BucketLike | env.ZIP_FILES |
| Background R2 writes | waitUntil | (p) => ctx.waitUntil(p) |
Modules
- Catalog — catalogSearch, listLanguages, getResourceZipUrl
- ZIP — ZipResourceFetcher2 (memory → R2 → network, single-flight)
- Parsers — USFM, TSV (TN/TWL/TQ), TA/TW catalog, OBS
- Alignment — QuoteMatcher, USFM tokenizer
- Contracts — Shared TypeScript shapes for API + MCP
Source: packages/door43/ · Next: REST API →