How sinha004/transcript-editor works
Project type and purpose
• Type: Next.js 13+ web application (React-based App Router) used as a front-end transcript editor.
• Purpose: Display a transcript where each word carries timing metadata, allow sequential playback with real-time highlighting, and enable inline word editing (no deletions).
File structure
• Root configs: next.config.mjs, jsconfig.json, postcss.config.mjs, tailwind.config.js → control Next.js build, module resolution, PostCSS, and Tailwind CSS.
• package.json / lock file → React, Next.js, Tailwind, etc.
• src/app/
– layout.js → global layout wrapper (fonts, global styles).
– page.js → the transcript page component (renders words, Play button, handles state).
– globals.css & fonts/ → global styling and font assets via next/font.
• src/components/ui/ → reusable UI primitives (Button, Input, Popover).
• src/lib/utils.js → playback scheduler and timing helper functions.
• components.json → likely sample transcript data at build or runtime.
Key architectural patterns & principles
• Component-based design (React functional components under src/components).
• Separation of concerns: UI primitives, page composition, and business logic (utils.js).
• Next.js App Router structure: layout.js for shared wrappers, page.js for route.
• Utility-first styling (Tailwind CSS).
• Static vs dynamic data handling (SSG/CSR).
Detail orientation
• Drill into sub-components: layout.js vs page.js vs each UI control.
• Timing engine in utils.js as a separate sub-module.
• Separate CSS pipeline (PostCSS/Tailwind) from component styling.
• Future hooks for audio controls or multi-transcript loading.