Books & Chapters

Navigate the Bible structure — books with naming conventions, chapters with rich component trees.

Books

Each Bible translation contains a complete list of books in canonical order. Every book includes:

PropertyDescriptionExample
USFM CodeStandard three-letter book identifier used across all translationsGEN, PSA, JHN, REV
Short NameAbbreviated book name in the translation's languageGen, Ps, John, Rev
Long NameFull book name in the translation's languageGenesis, Psalms, The Gospel of John, Revelation
AbbreviationCompact reference abbreviationGe, Ps, Jn, Re
USFM (Unified Standard Format Markers) codes are consistent across all translations. The code GEN always means Genesis whether the translation is in English, French, or Swahili. This makes it possible to link references across translations.

Chapters

Each book contains its chapters in order. A chapter holds the actual Scripture text as a structured component tree — not plain text. This tree preserves all the formatting and structure of the original translation.

The Component Tree

Rather than storing Bible text as a flat string, Bosca stores each chapter as a tree of components. This preserves the rich structure of Scripture:

ComponentPurpose
TextActual Scripture text content with associated styling
VerseStartMarks where a verse begins, with its verse number
VerseEndMarks where a verse ends
ContainerGroups components together — paragraphs, poetry stanzas, list items, sections
BreakLine breaks and section separators

This structure means that a reading application can render the exact same formatting as the original translation — poetry with proper indentation, paragraph breaks in the right places, and section headings where the translators placed them.

Verse References

Each chapter provides a list of all its verse references. Each reference includes both a human-readable form (e.g., "Genesis 1:1") and a USFM form (e.g., "GEN.1.1"). This makes it easy to link to specific verses, build verse pickers, and integrate with the reference parsing system.

The typical navigation flow is:

  1. List available translations
  2. Select a translation to see its books
  3. Select a book to see its chapters
  4. Select a chapter to read the full component tree with verse-level detail

Alternatively, use a human-readable reference like "John 3:16" to jump directly to a specific passage.