跳到正文
DEV Community· Jesus Chetia·· 2 小時前AI 評分51

THE FORGOTTEN 為棄置程式碼庫打造本機 AI 數碼墓園

THE FORGOTTEN - a digital graveyard where dead code comes back as a ghost

AI 導讀

THE FORGOTTEN 是一款本機運行的 AI 工具,可匯入 GitHub 程式碼庫或 ZIP,分析 Git 歷史與原始碼,建立可對話的項目「幽靈」及復活路線圖。

正文

Jesus Chetia

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

THE FORGOTTEN: import an abandoned repo (GitHub URL or ZIP export) and it gets exhumed, measured, and remembered, real git-history analysis, source indexing, a ghost that speaks as the project itself, and a resurrection roadmap. The theme landed literally: every dead repository gets a ghost you can hold a conversation with, grounded strictly in its own commits and source. No fabrication when the local model is down, the ghost says so and answers from raw evidence only, clearly labeled.

Demo

Local-first: pnpm install && pnpm dev → http://localhost:5173

  1. Submit a repo URL or drop a ZIP export
  2. Watch the real 10-stage pipeline (VALIDATING → … → COMPLETED)
  3. Talk to the ghost at /archive/:id/ghost — streamed, with cited sources
  4. Read the resurrection report

Code

THE FORGOTTEN

An AI-powered digital graveyard for abandoned software.

Import a repository — from GitHub or a ZIP export — and it is exhumed, measured, and remembered: real git history, a real source analysis, a searchable index, a local-AI archive entry, a ghost you can talk to, and a resurrection roadmap. Everything runs on your machine. Nothing is fabricated: when the local model is unavailable, the app says so and falls back to evidence-only output, clearly labeled.


Table of contents


Quick start

Requirements: Node ≥ 20, pnpm 10+, git (CLI is used to read repositories).

pnpm install          # installs server + web workspaces
cp .env.example .env  # optional — every value has a working default
pnpm dev              # starts API (127.0.0.1:8787) and web (127.0.0.1:5173)

Open http://localhost:5173, go to…

How I Built It

  • Open-weight AI, fully local: gemma3:4b + nomic-embed-text via Ollama
  • Backend: Fastify + TypeScript, Drizzle ORM on SQLite (WAL + FTS5)
  • Hybrid retrieval: FTS5 always, embeddings when available every ghost answer cites files, commits, and timeline events, and labels which retrieval mode was used
  • Honest generation: Zod-validated structured output with repair pass, then a deterministic evidence-only fallback (labeled fallback) when the model is unreachable
  • Frontend: React 19 + Vite + Tailwind v4; SSE streaming for ghost chat and job progress

Why Does Open Innovation Matter?

Ollama + open weights mean the entire haunting runs on your laptop, your abandoned code never touches a third-party API. A closed API couldn't give you this: nothing leaves the machine, you swap models freely, and the app degrades honestly (labeled fallbacks instead of silent hallucination) because the whole stack is inspectable and replaceable.

The Spirit of It

The ghost answering "I was a physics engine… my last recorded transmission was 2024-08-14" and citing its own dead commits as sources. Dead software narrating its own history.

Prize Categories

  • Gemma
  • Render

來源:DEV Community · dev.to