Cargo workspace with the entities/core/data/api/cli crate split: - entities: content-addressing (Sha256), ISBN-13, ids, domain types, DTOs - core: dedup upload orchestration, access-decision gating, Argon2id auth, catalog browse, and the data-access port traits - data: sqlx (Postgres, compile-time-checked, offline cache), aws-sdk-s3 (MinIO), epub parsing; implements the core ports - api: Axum /v1 (auth, upload, catalog, gated download, cover) - cli: operator commands (migrate, user, copyright, work, blob, session) Three-layer catalog (blob -> edition -> work) with content-addressed deduplication, copyright gating (public-domain open; in-copyright/unknown gated by ownership), and bookstore-style metadata visibility. Forward-compatible schema for later translation, narration, voice marketplace, and sales phases. Includes deployment assets (systemd, firewalld, nginx, sysusers, config template), Postgres + MinIO bootstrap, and an idempotent deploy.sh. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
53 lines
1.1 KiB
JSON
53 lines
1.1 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT sha256, kind::text AS \"kind!\", byte_size, storage_key, storage_bucket, created_at\n FROM blobs\n WHERE sha256 = $1\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "sha256",
|
|
"type_info": "Bytea"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "kind!",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "byte_size",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "storage_key",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "storage_bucket",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "created_at",
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Bytea"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
null,
|
|
false,
|
|
false,
|
|
false,
|
|
false
|
|
]
|
|
},
|
|
"hash": "be9c103674af1a805d9e6a038eebc75f0591e84bb66b4ece2fb71779cadfbf21"
|
|
}
|