feat: add transcriptions collection

This commit is contained in:
gosangam
2026-05-06 12:21:07 +05:30
parent e6529ef62e
commit 9730ab0170
4 changed files with 179 additions and 0 deletions
+30
View File
@@ -19,6 +19,7 @@ import {
Newspaper,
Mail,
Users,
Mic,
} from "lucide-react";
const allowRtf = process.env.ALLOW_RTF === "true";
@@ -141,6 +142,35 @@ export default function Home() {
</Card>
</Link>
{/* Transcriptions */}
<Link href="/transcriptions" className="block group h-full">
<Card className="h-full transition-all group-hover:shadow-md group-hover:ring-foreground/20">
<CardHeader>
<div className="flex items-center gap-3">
<div className="flex items-center justify-center size-10 rounded-lg bg-primary/10 text-primary">
<Mic className="size-5" />
</div>
<div className="flex-1 min-w-0">
<CardTitle className="text-xl font-bold">
Transcriptions
</CardTitle>
<CardDescription>
Lectures &amp; conversations
</CardDescription>
</div>
<Badge variant="secondary">Coming Soon</Badge>
</div>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
Transcriptions of Śrīla Prabhupāda&apos;s lectures, morning
walks, room conversations, and dialogues — the living voice of
the Founder-Ācārya preserved in text.
</p>
</CardContent>
</Card>
</Link>
{/* Disciples */}
<Link href="/disciples" className="block group h-full">
<Card className="h-full transition-all group-hover:shadow-md group-hover:ring-foreground/20">
+58
View File
@@ -0,0 +1,58 @@
import type { Metadata } from "next";
import Link from "next/link";
import { PageHeader } from "@/components/page-header";
import { buildOgMeta } from "@/lib/og";
import { Mic, Clock } from "lucide-react";
export function generateMetadata(): Metadata {
return buildOgMeta({
title: "Transcriptions",
detail: "Lectures & conversations",
quote:
"Transcriptions of Śrīla Prabhupāda's lectures, morning walks, room conversations, and dialogues — the living voice of the Founder-Ācārya preserved in text.",
});
}
export default function TranscriptionsPage() {
return (
<div className="min-h-screen bg-background">
<PageHeader>
<Link
href="/"
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
>
&larr; Home
</Link>
<h1 className="mt-3 text-3xl font-bold text-foreground">
Transcriptions
</h1>
<p className="mt-1 text-muted-foreground">
Lectures &amp; conversations of Śrīla Prabhupāda
</p>
</PageHeader>
<main className="max-w-5xl mx-auto px-6 py-8">
<div className="flex flex-col items-center justify-center py-24 text-center">
<div className="flex items-center justify-center size-20 rounded-2xl bg-primary/10 text-primary mb-6">
<Mic className="size-10" />
</div>
<h2 className="text-2xl font-bold text-foreground mb-2">
Coming Soon
</h2>
<p className="text-muted-foreground max-w-md mb-8">
We are working on indexing thousands of transcriptions of Śrīla
Prabhupāda&apos;s lectures, morning walks, room conversations, and
dialogues into our database. This section will be available shortly.
</p>
<div className="flex items-center gap-2 text-sm text-muted-foreground/60">
<Clock className="size-4" />
<span>Under active development</span>
</div>
</div>
</main>
</div>
);
}
+20
View File
@@ -84,6 +84,8 @@ const CONTENT_TYPE_DESCRIPTIONS: Record<string, string> = {
"Back to Godhead — the magazine founded by Śrīla Prabhupāda in 1944 to present the timeless science of Kṛṣṇa consciousness.",
"other-documents":
"Writings and analyses by His Divine Grace A.C. Bhaktivedanta Swami Prabhupāda.",
transcriptions:
"Transcriptions of Śrīla Prabhupāda's lectures, morning walks, room conversations, and dialogues — the living voice of the Founder-Ācārya preserved in text.",
};
function getFallbackQuote(title: string, code?: string): string {
@@ -263,6 +265,24 @@ export function ogForOtherDocument(docTitle: string, chapterTitle?: string) {
});
}
/** OG metadata for a transcription. */
export function ogForTranscription(name: string, meta?: string) {
return buildOgMeta({
title: name,
detail: meta || undefined,
quote: CONTENT_TYPE_DESCRIPTIONS.transcriptions,
});
}
/** OG metadata for the transcriptions index. */
export function ogForTranscriptions() {
return buildOgMeta({
title: "Transcriptions",
detail: "Lectures & conversations",
quote: CONTENT_TYPE_DESCRIPTIONS.transcriptions,
});
}
/** OG metadata for the disciples directory. */
export function ogForDisciples() {
return buildOgMeta({
+71
View File
@@ -324,3 +324,74 @@ model Disciple {
@@index([tags])
@@map("disciples")
}
// ---------------------------------------------------------------------------
// ContentBlock — embedded document for rich text content within transcriptions
//
// text: the actual text content (may contain inline HTML for bold/italic)
// format: formatting hint — "paragraph" | "heading" | "quote" | "verse" | "note"
// alignment: text alignment — "left" | "center" | "right" (default: left)
// speaker: who is speaking this block (for dialogues — e.g., "Prabhupāda", "Devotee")
// ---------------------------------------------------------------------------
type ContentBlock {
text String
format String @default("paragraph")
alignment String @default("left")
speaker String?
}
// ---------------------------------------------------------------------------
// Transcription — lectures and conversations of Śrīla Prabhupāda
//
// slug: URL-friendly unique identifier (e.g., "720911-lecture-los-angeles")
// name: display title (e.g., "Lecture on Bhagavad-gītā 2.13")
// type: "lecture" | "conversation"
// date: date of the transcription
// year: extracted year for filtering/grouping
// month: extracted month (1-12) for filtering
// day: extracted day for filtering
// place: location where it was delivered (e.g., "Los Angeles", "Vṛndāvana")
// context: additional context (e.g., "Morning Walk", "Room Conversation", "Arrival Address")
// reference: scripture reference if applicable (e.g., "BG 2.13", "SB 1.2.6")
// summary: brief description of the content (for OG images, search results)
// content: array of ContentBlock embedded documents (the actual transcription)
// tags: array of tags for categorization (e.g., ["science", "reincarnation", "guru"])
// participants: array of named participants (e.g., ["Prabhupāda", "Bob Cohen", "Śyāmasundara"])
// language: primary language of the transcription (default: "en")
// source: origin of the transcription (e.g., "Vedabase", "BBT Archives")
// durationMinutes: approximate duration in minutes (if known)
// isPublished: whether the transcription is ready for public display
// notes: internal editorial notes (not shown in UI)
// ---------------------------------------------------------------------------
model Transcription {
id String @id @default(auto()) @map("_id") @db.ObjectId
slug String @unique
name String
type String // "lecture" | "conversation"
date String? // date as written (e.g., "September 11, 1972")
year Int?
month Int?
day Int?
place String?
context String?
reference String?
summary String?
content ContentBlock[]
tags String[]
participants String[]
language String @default("en")
source String?
durationMinutes Int?
isPublished Boolean @default(false)
notes String?
@@index([type])
@@index([year])
@@index([year, month])
@@index([place])
@@index([tags])
@@index([reference])
@@index([participants])
@@index([isPublished])
@@map("transcriptions")
}