diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index 84254f83..fee799b9 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -57,11 +57,14 @@ knowledgebase/ │ ├── essays/ → 23 essays across 6 groups │ ├── journals/ → Jaladuta Diary, The Beginning │ ├── other-documents/ → 12 miscellaneous documents -│ ├── glossary/ → 2,749 searchable Sanskrit terms +│ ├── glossary/ +│ │ ├── page.tsx → Redirects to /glossary/a +│ │ ├── glossary-client.tsx → Client component (sidebar terms, single entry view, prev/next nav) +│ │ └── [letter]/page.tsx → Dynamic route per letter (A-Z) │ ├── disciples/ → 4,747 initiated disciples directory │ │ ├── page.tsx → Disciples browser (letter nav, suffix filter, search, sort, pagination) │ │ └── disciples-browser.tsx → Client component -│ ├── transcriptions/page.tsx → Coming Soon page (lectures & conversations) +│ ├── transcriptions/page.tsx → Coming Soon page │ └── api/ │ ├── og/route.tsx → Dynamic OG image generator (Noto Sans, Prabhupāda image) │ ├── books/ → Book/verse API routes @@ -662,6 +665,7 @@ SSR and DS have parent chapters with sub-chapters stored as individual `prose_ch - **Copy** appends source reference: title, chapter/verse, highlight URL - All toolbar surfaces use dark contrast treatment (bg-black, border-white/10) - Kautilya lotus icon for the AI companion button +- On iOS Safari mobile, selection is saved/restored when drawers open/close to prevent focus conflicts ### Text Highlight Links - Selected text encoded as compact URL fragment: `?hl=prefix§suffix§length` @@ -670,14 +674,15 @@ SSR and DS have parent chapters with sub-chapters stored as individual `prose_ch - Incoming `?hl=` URLs: text is found in DOM, wrapped in ``, scrolled to, highlighted permanently - `TextHighlighter` component runs on page load via `useSearchParams` - Server-side `extractMatchedText()` searches paragraphs for OG image quote extraction +- Case-insensitive matching for both DOM highlighting and server-side text extraction +- Cross-paragraph matching via position mapping (spaces inserted at element boundaries) ### Dynamic OG Images - `/api/og` route generates 1200×630 PNG images using `next/og` (Satori) - Left panel: Prabhupāda image with quote mark and branding (from PNG) - Right panel: title (bold), detail, quote text, "Read more at prabhupadasays.org" -- Font: Noto Sans (Regular + Bold TTF from `public/fonts/Noto_Sans/static/`) -- Full IAST diacritical support (ā, ī, ū, ṛ, ṣ, ṇ, ṭ, ḍ, ś, ñ, ṅ, ḥ, ṁ) -- Every content page has `generateMetadata` with contextual fallback descriptions +- Font: Noto Sans Regular + Bold loaded from `public/fonts/Noto_Sans/static/` — full IAST diacritical support +- All 104 content pages have `generateMetadata` with contextual fallback descriptions - When `?hl=` is present, the actual selected text is extracted from DB content for the OG quote ### Site Footer @@ -692,7 +697,7 @@ SSR and DS have parent chapters with sub-chapters stored as individual `prose_ch ``` DATABASE_URL=mongodb://user:pass@host:port/spsays?authSource=admin -NEXT_PUBLIC_SITE_URL=https://prabhupadasays.org # used for OG image URLs +NEXT_PUBLIC_SITE_URL=https://prabhupadasays.org ``` --- @@ -710,6 +715,9 @@ npx prisma generate # Regenerate Prisma client after schema cha npx next build # Extraction & seeding scripts are in extractor/ — see extractor/scripts/ + +# BFF API server (from ../spsays-bff/) +make run # Build + start Go API on :8080 ``` --- @@ -793,6 +801,8 @@ npx next build } ``` +Glossary is browsed via `/glossary/{letter}` routes (A-Z). Each letter page shows terms grouped by base letter (diacritical variants mapped: Ā→A, Ś→S, Ṛ→R, etc.). Single entry view with prev/next navigation. + --- ## Known Issues