ToshokannHome of Knowledge
TWiN Home

VOLUME 01 / ARCHITECTURE

How Toshokann fits together.

Toshokann provides the tools to organize, find, and use knowledge. Your derivative supplies the collection, its identity, and the rules for using it.

Build your library
01

Shared tools. Your decisions.

The core supplies reusable mechanics. Your Library or Archive decides what they serve.

Toshokann core owns

  • Search and document handling
  • Storage, import, backup, and restore
  • Shared chat and bounded context

A derivative owns

  • The collection, identity, and vocabulary
  • Access, permissions, and governance
  • Provider choices and domain workflows
View all technical responsibilities

Core responsibilities

  • Strict extension validation and BOSS-compatible manifest normalization
  • Deterministic metadata search and filtering
  • Raw Markdown hydration from packaged or browser-local documents
  • Managed first-run import, inspection, refresh, and user-upload preservation
  • Bounded context construction and untrusted-data framing
  • Application-scoped DBOPFS/OPFS text import, backup, and restore
  • Theme, accessibility, packaging, and composition seams

Derivative responsibilities

  • Name, purpose, description, and support language
  • Approved records, revision policy, and taxonomy
  • Categories, record types, topics, and navigation
  • Appearance accents and product terminology
  • Identity, access, permissions, and governance
  • Optional assistant policy and injected provider
  • Domain workflows, escalation, retention, and release authority
02

How the parts connect

Your derivative uses the shared core through a validated extension.

  1. Your Library or Archive
  2. Validated extension
  3. Toshokann core

The dependency runs one way. Core modules never import product code. Catalog records and Markdown remain untrusted data.

View dependency and composition details
  1. 01Derivative product or institution

    Composes the experience and owns its policy.

  2. 02Validated extension

    Describes identity, catalog, facets, navigation, appearance, and optional adapters.

  3. 03Toshokann core contracts

    Provide reusable normalization, search, storage, import, chat, and context mechanics.

  4. 04Catalog and Markdown holdings

    Remain untrusted data supplied and governed by the derivative.

03

Three public contracts

Versioned contracts keep configuration, records, and packaging predictable. Open a record for its technical details.

Extension / v1: Configure the derivative

defineExtension(config)

Validates identity, catalog location, empty state, facets, navigation, constrained appearance tokens, assistant policy, and an optional setup function. Unknown keys fail closed.

Catalog / v1: Read compatible records

Compatible records and raw Markdown

The adapter normalizes established catalog aliases, safe relative document paths, metadata, access labels, and product-owned vocabulary without forcing existing holdings through a destructive schema rewrite.

Package / v1: Control what is published

Positive publication allowlist

Only declared files enter dist. The build stages, hashes, inventories, and atomically publishes one deterministic static tree.

04

Access stays your responsibility

Your derivative decides who may see the collection, who approves changes, and which services may receive data.

View the full trust boundary
Core enforcement
  • Validated extension values and safe relative document paths.
  • Managed seed namespaces and application-scoped DBOPFS paths.
  • Bounded ranked context, escaped retrieval framing, and scoped refresh behavior.
Derivative authority
  • Who approves content and who may see it.
  • How revisions are released and what is retained.
  • Which services may receive data.
Intentionally absent
  • Organization identity, seeded records, credentials, or a provider.
  • Model alias, encryption, or a user access-control system.
  • Audit system, support address, or implicit network authority.
05

What gets published

This website
Publishes Toshokann's documentation.
Your Library or Archive
Packages the complete application, one extension, and the collection approved for release.
View packaging details

This project site: Toshokann publishes these documentation pages.

A derivative package: Keeps the complete neutral application surfaces, selects one extension, and creates a separate positive package allowlist for the full runtime closure and approved public collection.