DEV Community

ABDULKAREEM
ABDULKAREEM

Posted on

I Built an Open-Source AI Tool That Turns Any Codebase Into Deep Engineering Documentation (Runs 100% Locally)

KT Studio – Turn Any Codebase into Deep Documentation

Most engineering problems aren’t about writing code.

Understanding code is harder than writing it.

Onboarding a new developer.

Taking over a legacy repository.

Preparing proper knowledge transfer before someone exits.

The code exists.

The knowledge usually doesn’t.

So I built something to fix that.


🚀 Introducing KT Studio

KT Studio is an open-source, local-first web application that scans your repository and generates deep, structured engineering documentation using a local Ollama model.

No cloud.

No code uploads.

No external APIs.

Everything runs entirely on your machine.

GitHub: https://github.com/tpmabdulkareem/KT-Studio


🧠 What It Actually Does

KT Studio analyzes your project and generates a structured documentation site with:

  • ✅ Architecture overview (with Mermaid diagrams)
  • ✅ Quick start guide (real setup commands from your repo)
  • ✅ API reference (parsed from routes)
  • ✅ Database layer explanation
  • ✅ Environment variable breakdown
  • ✅ CI/CD & deployment notes
  • ✅ AI integrations detection (OpenAI, Ollama, LangChain, etc.)
  • ✅ Testing strategy
  • ✅ Troubleshooting guide
  • ✅ Ownership & risk areas

This is not a generic summary.

It reads your project structure and generates repo-aware documentation.


🔒 Why Local-First AI?

Many teams can’t upload proprietary repositories to cloud AI tools.

KT Studio:

  • Uses Node.js filesystem scanning
  • Skips node_modules, dist, and build artifacts
  • Ignores .env, .pem, terraform secrets
  • Redacts potential credentials automatically
  • Runs via Ollama at http://127.0.0.1:11434

Your code never leaves your machine.


🏗 Tech Stack

  • Next.js (App Router) + TypeScript
  • Tailwind CSS + shadcn/ui
  • SQLite via Prisma
  • Ollama (default: qwen3-coder:30b)
  • react-markdown + Mermaid.js
  • Server-Sent Events (SSE) for real-time streaming

⚡ Real Use Cases

Developer Onboarding

Generate a project blueprint before a new developer joins.

Knowledge Transfer

Senior dev leaving? Generate structured KT docs in minutes.

Codebase Audits

Understand inherited repositories faster.

AI-Heavy Projects

Automatically detect:

  • Model usage
  • Prompt templates
  • Embedding pipelines
  • RAG-style integrations

Consulting & Freelancing

Deliver solid documentation with project handoffs.


🛠 How To Run It

Prerequisites

  • Node.js v18+
  • Ollama running locally (http://127.0.0.1:11434)
  • An Ollama model installed (defaults to qwen3-coder:30b)

Install & Start

npm install
npx prisma db push
npx prisma generate
npm run dev
Enter fullscreen mode Exit fullscreen mode

Open: http://localhost:3000

Generate Docs (Local Mode)
1. Ensure Ollama is running
2. Click New Project
3. Choose Local Folder and enter the absolute path
4. Click Start Generation
5. After it finishes, click View Documentation

🌍 What’s Next?

Planned expansions:
• Git repository import mode
• Vector-based semantic indexing
• Incremental regeneration
• Architecture diffing between versions
• Plugin-based documentation sections
• Team collaboration mode

🤝 Looking for Collaborators

If you’re interested in:
• AI-powered developer tools
• Local LLM systems
• Repo intelligence
• Developer productivity
• Open-source infrastructure

I’d love to collaborate.

Repo: https://github.com/tpmabdulkareem/KT-Studio

💡 Bigger Vision

What if every repository could explain itself?

What if onboarding took hours instead of weeks?

What if knowledge transfer wasn’t dependent on memory?

That’s what KT Studio is trying to solve.

Let’s make codebases self-explanatory.

Top comments (0)