How next-token-tv/next-token-tv-website works
Next Token is a bilingual static website for an AI-focused video podcast, with episode and transcript publishing, an entity wiki, search, and a read-only wiki API. The main content workflow loads and validates catalog data, which supports published episode/transcript views and entity pages; separate routes build search indexes and API responses. The README also documents partner, SEO, and language-switching capabilities. The supplied tree omits most page templates and content files, so their internal wiring is not shown; documented relationships are cited to the README.
Main entry points: catalog.ts Content catalog · pages Site pages · search-index.ts Search index builder · wiki-api.ts Wiki API builder
Components 27
Catalog and content
- Content catalog
src/data/catalog.ts - Catalog primitives
src/data/catalog-core.ts - Catalog validation
src/data/catalog-validation.ts - Catalog relations
src/data/catalog-relations.ts - Content schemas
src/content.config.ts - Site copy
src/data/site.ts - Partner data
src/data/partners.ts - Episode articles
src/data/episode-articles.ts - Article Markdown
src/data/article-markdown.ts - Transcript Markdown
src/data/transcript-markdown.ts - Transcript anchors
src/data/transcript-paragraph-anchors.ts - Entity labels
src/data/entity-kind-labels.ts - Platform labels
src/data/platforms.mjs
Site experience
- Site pages
src/pages - Transcript Markdown route
src/pages/weekly/[number]/transcript.md.ts - Article Markdown route
src/pages/weekly/[number]/article.md.ts
Discovery and API
- Search index route
src/pages/search/[locale].json.ts - Search index builder
src/data/search-index.ts - Search engine
src/data/search-engine.ts - Wiki API builder
src/data/wiki-api.ts - Wiki API routes
src/pages/api/v1/wiki.json.ts - LLMs text route
src/pages/llms.txt.ts
Request delivery
- URL rules
src/data/internal-url.ts - Response middleware
src/middleware.ts - Static asset worker
worker/index.js - Static hosting
Other components
- Site visitor
Connections 28
- Site visitor → Site pages: browses
- Content catalog → Catalog primitives: uses
src/data/catalog.ts - Content catalog → Catalog validation: validates with
src/data/catalog.ts - Content catalog → Catalog relations: loads relations
src/data/catalog.ts - Content catalog → Content schemas: loads collections
src/content.config.ts - Site pages → Content catalog: uses catalog
src/pages/llms.txt.ts - Site pages → Site copy: uses copy
- Site pages → Partner data: uses partner data
- Site pages → Episode articles: uses article data
src/pages/weekly/[number]/article.md.ts - Article Markdown route → Episode articles: loads article
src/pages/weekly/[number]/article.md.ts - Article Markdown route → Article Markdown: renders Markdown
src/pages/weekly/[number]/article.md.ts - Transcript Markdown route → Content catalog: loads transcript
src/pages/weekly/[number]/transcript.md.ts - Transcript Markdown route → Transcript Markdown: renders Markdown
src/pages/weekly/[number]/transcript.md.ts - Transcript Markdown → URL rules: normalizes links
src/data/transcript-markdown.ts - Search index route → Search index builder: builds index
src/pages/search/[locale].json.ts - Search index builder → Content catalog: reads catalog
src/data/search-index.ts - Search index builder → Transcript anchors: creates anchors
src/data/search-index.ts - Search index builder → Search engine: uses document type
src/data/search-index.ts - Wiki API routes → Wiki API builder: builds responses
src/pages/api/v1/wiki.json.ts - Wiki API builder → Content catalog: reads catalog
src/data/wiki-api.ts - Wiki API builder → Catalog relations: uses relations
src/data/wiki-api.ts - Wiki API builder → URL rules: builds URLs
src/data/wiki-api.ts - LLMs text route → Content catalog: loads episodes
src/pages/llms.txt.ts - LLMs text route → URL rules: builds URLs
src/pages/llms.txt.ts - Response middleware → URL rules: normalizes responses
src/middleware.ts - Content schemas → Platform labels: uses labels
src/content.config.ts - Content schemas → Entity labels: uses labels
src/content.config.ts - Static asset worker → Static hosting: serves assets