ScriptClean AI refines raw YouTube transcripts into structured academic notes while preserving the original spoken flow.
- High-fidelity transcript formatting with markdown output
- Speaker lines, topic headers, and glossary generation
- Copy as Markdown or formatted rich text for Word/Docs
- Local draft persistence (optional)
- Backend API boundary for secure Gemini key usage
- Frontend:
React+TypeScript+Viteinsrc/ - Backend: lightweight
ExpressAPI atsrc/server/index.ts - API route:
POST /api/refine - LLM key is read only in the server process via
GEMINI_API_KEY
src/features/transcript-refiner/api– API transport layersrc/features/transcript-refiner/domain– types, validation, state, historysrc/features/transcript-refiner/services– prompt config and refinement orchestrationsrc/features/transcript-refiner/lib– markdown/clipboard utility functionssrc/features/transcript-refiner/ui– split UI componentssrc/server– backend endpoint that calls Google Gemini
npm installCreate .env using .env.example:
cp .env.example .envnpm run dev
npm run dev:apiOpen http://localhost:3000 for the UI and keep backend running on port 3001.
Frontend sends:
POST /api/refine
{ "transcriptText": "..." }Backend response:
{ "transcriptMd": "# ...", "metadata": { "model": "gemini-3-flash-preview", "latencyMs": 1234 } }npm run dev– start Vitenpm run dev:api– start backend servernpm run test– vitest watch modenpm run test:ci– full test runnpm run lint/npm run typecheck– TypeScript checksnpm run build– production build
- Paste sensitive transcripts only if localDraft is disabled or on a trusted machine.
- Browser clipboard behavior can differ; rich-text copy falls back to plain text automatically.