跳到正文
DEV Community· Ankit Kumar·· 4 小時前AI 評分39

RELIC:軟件數碼考古,讓被遺忘的程式碼庫重獲新生

RELIC — Digital Archaeology for Software | Bringing Forgotten Codebases Back to Life

AI 導讀

RELIC 是一個數碼考古平台,分析被遺忘的程式碼庫及相關證據,協助開發者瞭解項目狀況並規劃復原。平台透過 Ollama 在本機使用 Gemma 3 (4B),讓開發者以自然語言查問程式碼庫,並根據分析證據取得回答。RELIC 亦會將分析結果整理成四階段復原計劃,並支援匯出 Markdown 調查報告。

正文

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

What I Built

Software projects don't always die. Sometimes, they are simply forgotten.

Repositories get abandoned, dependencies become outdated, unfinished features remain buried in the code, and eventually nobody remembers how the project was supposed to work.

I built RELIC, a digital archaeology platform that investigates forgotten codebases and helps developers understand their current state and how they can be revived.

With RELIC, developers can:

Repository Excavation: Upload a repository as a ZIP archive for investigation.

Codebase Analysis: Analyze programming languages, project structure, dependencies, Git history, and unfinished work such as TODO, FIXME, and HACK markers.

Forensic Evidence: Explore findings with actual file paths, line numbers, and supporting evidence.

AI Interrogation: Ask natural-language questions about the repository and investigate its condition using a locally running AI model.

Revival Roadmap: Turn discoveries into a structured four-phase recovery plan.

Forensic Dossier: Export a complete investigation report in Markdown.

RELIC doesn't just scan a repository and display a list of issues. It connects discoveries to evidence, lets developers investigate them, and turns the results into a practical recovery plan.

The idea is to bring forgotten software back to life by understanding what was left behind.

Demo

GitHub Repository: https://github.com/ankit9241/Relic

Code

Repository: https://github.com/ankit9241/Relic

Built using:

Frontend: TanStack Start, React, TypeScript, Vite

Backend: Node.js, Express, TypeScript

Database: SQLite

AI: Ollama with Gemma 3 (4B)

The repository includes the application source code, setup instructions, and MIT License.

How I Built It

RELIC combines deterministic repository analysis with local AI inference.

The process starts with repository ingestion. Uploaded ZIP archives are validated and extracted with protections against unsafe archive paths, excessive file sizes, and resource exhaustion. RELIC never executes uploaded source code.

Once extracted, the analysis engine investigates the repository by examining:

Programming language distribution

File and project structure

Dependency manifests

Git history

TODO, FIXME, and HACK markers

These discoveries are organized into structured evidence records that can be explored through the Evidence Explorer.

For AI interrogation, I integrated Gemma 3 (4B) using Ollama.

Instead of sending arbitrary repository questions to a generic chatbot, RELIC compiles the findings from the investigated repository into context for the model. The AI uses this evidence to answer questions about the codebase and provides supporting evidence references.

The final stage is the revival roadmap, which organizes findings into four phases:

Stabilize — Understand the current state and address immediate risks.

Repair — Prioritize identified issues and unfinished work.

Modernize — Plan improvements to outdated components and dependencies.

Revive — Prepare the project for continued development.

I also implemented a Markdown report generator that brings together repository information, analysis findings, evidence, and the proposed roadmap into an exportable forensic dossier.

The important engineering decision was to keep repository analysis deterministic and use AI as an investigation layer on top of actual findings.

Why Does Open Innovation Matter?

I wanted RELIC's AI capabilities to work without making a closed AI API a mandatory part of the experience.

Using Google's open-weight Gemma 3 through Ollama made local inference possible and gave me control over the model, system instructions, and evidence passed into the AI workflow.

It also allowed me to experiment with how the model interprets repository findings, how evidence is supplied as context, and how answers can be grounded in the available information.

Open-source tooling made it possible to combine repository analysis, local AI inference, and a complete investigation workflow without depending on a proprietary AI provider for every interaction.

For a tool that investigates potentially sensitive source code, having the option to run AI locally is particularly valuable.

Open innovation isn't just about using an open model. It's about having the freedom to inspect, adapt, run, and build on the technology powering your product.

The Spirit of It

Most developers have at least one repository they started with excitement and never returned to.

Maybe it was a hackathon project, a side project, an ambitious idea, or something that got lost between deadlines.

The code is still there. The files are still there. The unfinished work is still there.

But the context is gone.

I built RELIC around that thought.

What if we could investigate these forgotten projects, uncover what remains, understand their condition, and find a way forward?

Not every abandoned project needs to be revived. But perhaps some of them deserve a second look.

RELIC — Bring forgotten code back to life.

Prize Categories

Gemma — Best Use of Gemma

RELIC integrates Google's Gemma 3 (4B) through Ollama for local AI-powered repository interrogation. The model receives compiled repository evidence as context and helps developers investigate their codebases through natural-language questions.

Built with curiosity, open-source technology, and the belief that forgotten code deserves a second look.

RELIC. Bring forgotten code back to life.

來源:DEV Community · dev.to