survos / folio-bundle
Portable SQLite folios for normalized museum dataset rows.
Fund package maintenance!
Requires
- php: ^8.5
- ext-pdo_sqlite: *
- ext-sqlite3: *
- doctrine/dbal: ^4.4
- doctrine/doctrine-bundle: ^2.14|^3.0
- doctrine/orm: ^3.7
- league/commonmark: ^2.4
- survos/babel-bundle: ^2.10
- survos/data-contracts: ^2.5
- survos/dataset-bundle: ^2.5
- survos/field-bundle: ^2.5
- survos/jsonl-bundle: ^2.5
- survos/search-bundle: ^2.5
- symfony/ai-agent: ^0.13
- symfony/config: ^8.1
- symfony/console: ^8.1
- symfony/dependency-injection: ^8.1
- symfony/framework-bundle: ^8.1
- symfony/http-client: ^8.1
- symfony/http-kernel: ^8.1
- symfony/intl: ^8.1
- symfony/routing: ^8.1
- tacman/gcf-php: ^1.0
- twig/twig: ^3.24|^4.0
- voku/stop-words: ^2.0
- zenstruck/bytes: ^1.1
Requires (Dev)
- api-platform/core: ^4.3
- phpstan/phpstan: ^2.1
- survos/fetch-bundle: ^2.5
- survos/iiif-bundle: ^2.5
- survos/imgproxy-bundle: ^2.5
- survos/tabler-bundle: ^2.5
- symfony/ux-chartjs: ^3.0
Suggests
- api-platform/core: Required for the PhotoGrid Twig component's data source (Row's #[ApiResource]).
- presta/sitemap-bundle: For folio:sitemap — static per-folio XML sitemaps of item pages.
- survos/fetch-bundle: Provides ChunkDownloader for HTTP folio:pull downloads.
- survos/import-bundle: Produces normalized JSONL files before ingesting them into folios.
- survos/schema-org-bundle: Publishes JSON-LD on the row detail page (RowSchemaOrgBuilder), reading the #[SchemaOrg] attributes survos/data-contracts already puts on the item DTOs. Without it the row page has no structured data.
- survos/settings-bundle: Lets RowMenu gate OCR/Handwriting behind a per-user beta_features setting instead of only the dev environment.
- symfony/ux-twig-component: Required for the PhotoGrid Twig component.
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.30.10
- 2.30.9
- 2.30.7
- 2.30.5
- 2.30.3
- 2.30.1
- 2.30.0
- 2.29.2
- 2.29.0
- 2.28.7
- 2.28.5
- 2.28.4
- 2.28.3
- 2.27.1
- 2.26.9
- 2.24.38
- 2.24.37
- 2.24.33
- 2.24.32
- 2.24.31
- 2.24.30
- 2.24.24
- 2.24.22
- 2.24.19
- 2.24.18
- 2.24.17
- 2.24.10
- 2.24.0
- 2.23.1
- 2.23.0
- 2.22.0
- 2.21.0
- 2.19.5
- 2.19.4
- 2.19.3
- 2.19.2
- 2.18.19
- 2.18.18
- 2.18.17
- 2.18.14
- 2.18.13
- 2.18.12
- 2.18.11
- 2.18.10
- 2.18.9
- 2.18.7
- 2.18.5
- 2.18.3
- 2.18.2
- 2.18.1
- 2.18.0
- 2.17.6
- 2.17.5
- 2.17.0
- 2.16.2
- 2.16.0
- 2.15.22
- 2.15.21
- 2.15.20
- 2.15.19
- 2.15.18
- 2.15.17
- 2.15.16
- 2.15.15
- 2.15.14
- 2.15.13
- 2.15.12
- 2.15.10
- 2.15.9
- 2.15.8
- 2.15.7
- 2.15.6
- 2.15.5
- 2.15.4
- 2.15.2
- 2.15.1
- 2.14.3
- 2.14.1
- 2.13.0
- 2.12.12
- 2.12.11
- 2.12.9
- 2.12.8
- 2.12.7
- 2.12.6
- 2.12.5
- 2.12.4
- 2.12.3
- 2.12.1
- 2.12.0
- 2.11.8
- 2.11.7
- 2.11.6
- 2.11.4
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.31
- 2.10.30
- 2.10.29
- 2.10.28
- 2.10.27
- 2.10.26
- 2.10.25
- 2.10.24
- 2.10.22
- 2.10.21
- 2.10.20
- 2.10.19
- 2.10.18
- 2.10.17
- 2.10.16
- 2.10.15
- 2.10.14
- 2.10.13
- 2.10.12
- 2.10.11
- 2.10.10
- 2.10.9
- 2.10.8
- 2.10.7
- 2.10.6
- 2.10.5
- 2.10.4
- 2.10.3
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.4
- 2.9.3
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.4
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.23
- 2.7.22
- 2.7.21
- 2.7.20
- 2.7.19
- 2.7.18
- 2.7.17
- 2.7.16
- 2.7.15
- 2.7.14
- 2.7.13
- 2.7.12
- 2.7.11
- 2.7.10
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.8
- 2.5.7
- 2.5.6
- 2.5.5
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.0
This package is auto-updated.
Last update: 2026-09-17 13:33:18 UTC
README
Folio stores normalized/enriched dataset JSONL as portable SQLite archive files. It is the database, archive, and browsing layer for data that has already been normalized by dataset/import tooling.
harvest and md produce normalized JSONL. folio:ingest turns that JSONL into a standalone folio SQLite file. Consumers such as zm can use the Symfony/DataContracts stack when present, while Python/R/SQLite users can query the archive directly.
Required: survos/field-bundle, survos/data-contracts.
Suggested for ingest/write workflows: survos/jsonl-bundle, survos/import-bundle.
See docs/configuration.md for the required multi-connection Doctrine setup.
See docs/archive-metadata.md for the standalone archive metadata contract.
See docs/presentation-layer.md for the proposal to use folios as narrative institutional presentation packages.
Archive Contract
A folio file stores canonical rows in item and self-describing metadata alongside them:
schema_tableandschema_propertydescribe observed DTO types and fields in this archive.schema_property.statsstores field profile output fromsurvos/jsonl-bundle's profiler.docsstores generated JSON/Markdown documentation for humans, report writers, and AI agents.- generated
dto_*SQLite views project JSON fields into query-friendly columns. term_setandtermstore standalone controlled vocabularies and facets.
The metadata snapshot describes actual observed data, not the entire DTO contract universe. DTO classes from survos/data-contracts annotate observed fields with labels/descriptions when available, but consumers do not need PHP code to understand an archived folio.
Search and Publication Notes
folio:ingestloads rows, snapshots observed schema/docs/views, and rebuilds the SQLite FTS5 tableitem_fts.- Existing folios can rebuild search with
bin/console folio:fts:rebuild <provider/dataset> --query="search terms". folio:archiverefreshes archive metadata before packaging.- FTS tables are derived data. Published archive files may drop
item_fts,VACUUM, compress, ship, then rebuild FTS on the consuming side. - SQLite views and docs are also derived from persisted metadata, but they are intentionally lightweight and useful for standalone consumers.
- Vector search is intentionally deferred. When added, start with a hybrid SQLite design: FTS5/BM25 for exact keyword strength, sqlite-vec for semantic retrieval, and Reciprocal Rank Fusion to merge ranks without normalizing incompatible score scales. Reference: https://ceaksan.com/en/hybrid-search-fts5-vector-rrf
Direct SQLite Examples
select * from schema_table where kind = 'dto'; select * from schema_property where table_id = ? order by position; select local_id, label, dto_type, dto_data, extras from item limit 20; select * from dto_document limit 20; select id, type, audience, body from docs order by position;
TODO
- Add fieldSet support to the api-grid spreadsheet view to avoid displaying every DTO field at once.
- Rebuild views/docs on restore, not only FTS, if the archive was packaged without them.