Skip to content

tuannm3812/ScriptClean-AI

Repository files navigation

ScriptClean AI 🖋️

ScriptClean AI refines raw YouTube transcripts into structured academic notes while preserving the original spoken flow.

Features

  • 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

Architecture

  • Frontend: React + TypeScript + Vite in src/
  • Backend: lightweight Express API at src/server/index.ts
  • API route: POST /api/refine
  • LLM key is read only in the server process via GEMINI_API_KEY

Folder map

  • src/features/transcript-refiner/api – API transport layer
  • src/features/transcript-refiner/domain – types, validation, state, history
  • src/features/transcript-refiner/services – prompt config and refinement orchestration
  • src/features/transcript-refiner/lib – markdown/clipboard utility functions
  • src/features/transcript-refiner/ui – split UI components
  • src/server – backend endpoint that calls Google Gemini

Setup

npm install

Create .env using .env.example:

cp .env.example .env

Run

npm run dev
npm run dev:api

Open http://localhost:3000 for the UI and keep backend running on port 3001.

API usage

Frontend sends:

POST /api/refine
{ "transcriptText": "..." }

Backend response:

{ "transcriptMd": "# ...", "metadata": { "model": "gemini-3-flash-preview", "latencyMs": 1234 } }

Scripts

  • npm run dev – start Vite
  • npm run dev:api – start backend server
  • npm run test – vitest watch mode
  • npm run test:ci – full test run
  • npm run lint / npm run typecheck – TypeScript checks
  • npm run build – production build

Notes

  • 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.

About

An automated AI pipeline to fetch, clean, and refine raw YouTube transcripts into academic follow-along study notes, complete with glossaries, practice exercises, and Google Drive syncing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors