tango_core/lib.rs
1//! The stable half of tango-rs: the schema, the entities, the migrations, and
2//! the search contract.
3//!
4//! This is what `tango-api` and a downstream project depend on. It deliberately
5//! does not know how a video is harvested: no yt-dlp process, no HTTP client, no
6//! transcript pipeline. Those live in `tango-harvest`, which depends on this
7//! crate rather than the other way around.
8//!
9//! The dependency direction is the whole design:
10//!
11//! ```text
12//! tango-rs ──> tango-harvest ──> tango-core
13//! │ ^
14//! └──────────────────────────────┘
15//! tango-api ─────────────────────────┘
16//! ```
17//!
18//! A project that only serves or queries the corpus depends on `tango-core` (or
19//! `tango-api`), so it never compiles a harvester it does not run.
20//!
21//! Layering, innermost first:
22//!
23//! - `entities` SeaORM rows, one per table
24//! - `migration` the versioned schema, embedded from `sql/`
25//! - `search` the metadata search contract
26//! - `transcript_search` the transcript search contract
27//! - `config` the shared `.env` and profile resolution
28//!
29//! Everything here is schema-shaped and long-lived. A change to it is a change
30//! to what every consumer sees, which is why it is separate from the harvester
31//! that happens to fill it.
32
33pub mod config;
34pub mod entities;
35pub mod migration;
36pub mod search;
37pub mod transcript_search;