Skip to main content

Crate tango_core

Crate tango_core 

Source
Expand description

The stable half of tango-rs: the schema, the entities, the migrations, and the search contract.

This is what tango-api and a downstream project depend on. It deliberately does not know how a video is harvested: no yt-dlp process, no HTTP client, no transcript pipeline. Those live in tango-harvest, which depends on this crate rather than the other way around.

The dependency direction is the whole design:

tango-rs  ──> tango-harvest ──> tango-core
    │                              ^
    └──────────────────────────────┘
tango-api ─────────────────────────┘

A project that only serves or queries the corpus depends on tango-core (or tango-api), so it never compiles a harvester it does not run.

Layering, innermost first:

  • entities SeaORM rows, one per table
  • migration the versioned schema, embedded from sql/
  • search the metadata search contract
  • transcript_search the transcript search contract
  • config the shared .env and profile resolution

Everything here is schema-shaped and long-lived. A change to it is a change to what every consumer sees, which is why it is separate from the harvester that happens to fill it.

Modules§

config
Environment and database selection, shared by every crate.
entities
migration
Schema migrations.
search
Search across everything harvested, videos and playlists together.
transcript_search
What was said, and where: the transcript search RPCs.