API Reference
API Reference/Apps/Amoxtli

Amoxtli “book”

org.poca.amoxtli

Stories, creation myths, and oral traditions: an ePub and audiobook reader whose Codex format scrolls horizontally, the way pre-Columbian codices unfold.

PAC directory: stories/Media3 playbackCompose + M3

PAC surface at a glance

UsesDetail
/apps/amoxtliCard catalog.
/file/{path}Card JSON, page images, audio, ePub and PDF bytes.
/files/{dir}Directory listing (used to find audiobook audio).
app_configNot used.
Deep linkspoca://amoxtli/{codex|story|book|audiobook}/{card_id}

Card types and routing

Routing runs on the type column. A card typed codex is remapped in-app to story; both open the Codex player. book opens the reader. Anything else, including audiobook, opens the audiobook player.

content_collection is a section label for grouping the library, never a routing key. Whatever the directory tree provides (for example codices, books, audiobooks) is displayed as-is.

Catalog row contract

ColumnNotes
card_idreqRow skipped when missing.
typereqcodex | book | audiobook.
title / descriptionoptDefault to empty.
imageoptPAC-relative path (wrapped to a file URI) or an http(s) URL passed through.
card_json_pathoptPAC-relative path to the card’s detail manifest. Needed to actually open codices and books.
content_dir_pathoptPAC-relative media directory; trailing slash normalized.
extensions_jsonoptauthor, duration, language (split on / or , into a language list).

Codex manifest (card.json)

Loaded lazily from card_json_path. Unknown keys are ignored.

{
  "card_id": "codex_first_sunrise",     // required
  "title": "…", "author": "…",         // required
  "narrator": "…",                     // optional
  "coverImage": "cover.png",            // required
  "duration": "12 min",                 // required
  "transitionDuration": 0.6,            // required, seconds (float)
  "language": "Nahuatl / English",      // required
  "description": "…",                  // required
  "audioUrl": "narration.m4a",          // required; bare filename resolves against content_dir_path
  "type": "codex",                      // required
  "orientation": "horizontal_right",    // default; vertical* switches scroll axis
  "pages": [ {
    "id": "page-01",                    // image = {content_dir}/{id}.png
    "layerX": 0, "layerWidth": 2048,     // required
    "audioTimestamp": 0, "duration": 14, // required, seconds
    "transcript": "…"                   // required
  } ]
}

Multi-layer parallax pages add files named {id}-layer-{n}.png; layer 0 is {id}.png itself.

Book manifest (card.json)

Required: id, title, author, coverImage, language, description, path (the ePub or PDF filename inside content_dir_path; format detected by extension). Optional: duration (defaults to “Read”), type (defaults to book).

Authoring notes

Last updated: July 2026
BackAPI overview