跳到正文
DEV Community· Himanshu Nikam·· 2 小時前AI 評分39

AFTERWEB:死去的互聯網之城——以 3D 與本地 AI 探索失效連結

AFTERWEB: The Dead Internet City — Missing-Link Archaeology in 3D & Local AI

AI 導讀

AFTERWEB 是一款本地優先、可離線使用的 3D 網絡考古探索器,以早期網頁快照中的真實超連結建構城市。無法在已查詢的檔案中找到目標網址時,系統會以標示原始錨文字和目標網址的 Ghost Plot 呈現,不會虛構網頁。透過 Ollama 執行的本地 Qwen3:4b 只根據 SQLite 檔案檢索到的文字提供答案,並附上可核實的引用。

正文

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


What I Built

AFTERWEB is a local-first, offline-capable 3D web archaeology explorer that lets you walk through a city built from the actual hyperlinks of the early web. Every street, every connection in the city corresponds to a real <a> tag extracted from a historical web snapshot.

The theme is Ghost in the Machine — and the interpretation is literal: when a link from 1996 leads to a URL that the Wayback Machine can no longer find, that destination doesn't get silently skipped or replaced with a fabrication. It manifests as a Ghost Plot — a glowing, empty lot in the 3D city — labeled with its original anchor text and target URL. The ghost of a place that once existed on the internet, or maybe never made it past the intention.

Three curated early-web neighborhoods form the map:

  • 🎬 Space Jam (1996) — the legendary studio promotional site and its outbound hyperlink graph
  • 🏡 GeoCities Homestead — personal home pages and their hand-crafted link webs
  • 🏛️ NCSA Mosaic Library — institutional academic pages from the dawn of the graphical browser

A local, open-weight AI Archivist (Qwen3 via Ollama) can answer your questions about any site or missing link in the map. Critically: it is evidence-bound. It can only reference text chunks retrieved from the local SQLite archive, and every answer includes verifiable [E1] [E2] citation chips you can click to inspect the exact source excerpt. If the evidence isn't there, it abstains. No hallucinated history. No invented lost pages.


Demo

Deployment: Fully local — clone, run setup, and the whole experience lives on localhost:5173 with zero cloud dependencies after initial archive pack creation.

What you'll see:

  1. Open the 3D City — three floating village islands suspended in twilight, connected by glowing amber lantern-arc routes
  2. Click into Space Jam's island and follow a hyperlink route from 1996
  3. The camera glides along the arc → terminates at an outlined Ghost Plot: "No capture found in checked archive query", the original anchor text, the target URL
  4. Ask the Ghost Archivist AI Panel: "What do we know about this missing destination?"
  5. The local Qwen3 model replies with cited evidence from the source page. Click [E1] — the exact text chunk highlights in the Evidence Drawer
  6. Toggle Wi-Fi off. Run another query. Still works. 100% offline.

Code

AFTERWEB: The Dead Internet City

Missing-Link Archaeology in 3D & Local Evidence-Bound AI

Walk through a city built from the hyperlinks of the early web.
Follow real archival evidence into places that survived, places that changed, and places the archive can no longer find. A local open-weight model helps interpret the evidence, but never invents history to fill a gap.


🌟 The Signature Experience

  1. Observed Routes: Every physical street and connection in the 3D city corresponds to a real <a> tag extracted from historical web captures.
  2. Ghost Plots: When a target URL yields no capture in the checked query, it manifests as a glowing empty lot displaying its original anchor text and target URL—never a fabricated webpage.
  3. Evidence-Bound Local AI: Ask questions about historical sites or missing links. A local Qwen3 model running through Ollama references local SQLite chunks and generates verified [E#] citations. If evidence is…

How I Built It

Open-Source AI Stack

Component Tech Why Open
Language Model Qwen3:4b (Apache 2.0) via Ollama Runs on loopback 127.0.0.1:11434, zero telemetry
Vector / Lexical Search SQLite FTS5 (built into Python stdlib) Full-text retrieval with no external search service
Archive Data Internet Archive Wayback CDX API Open historical web record

Architecture

Internet Archive (online, pack-prep only)
         │
         ▼
  Seed Builder (CDX API + bounded HTML extraction)
         │
         ▼
  Local Archive Pack (manifest + excerpts + provenance)
         │
         ▼
  SQLite + FTS5 ──────────────────────────────────────┐
                                                       │
  React + TypeScript (Vite) ◄──── FastAPI (localhost) ◄┤
  Three.js / React Three Fiber                         │
  Zustand state                              Evidence retrieval
                                             + citation validator
                                                       │
                                                    Ollama
                                                  (Qwen3:4b)

Frontend

  • React 19 + TypeScript + Vite
  • Three.js / React Three Fiber v9 + Drei for the 3D diorama city
  • Zustand for inspector drawer, camera, and chat state
  • 2D Accessible Fallback — complete list/graph view for low-spec machines and keyboard navigation

Backend

  • FastAPI + Python 3.11 — REST endpoints on 127.0.0.1:8000
  • archive_client: Rate-limited CDX API fetcher with strict host allowlist
  • extractor: BeautifulSoup parsing clean text chunks + valid <a> anchors
  • retrieval: FTS5 lexical search matching questions against curated chunks
  • chat_service: Builds bounded prompt payloads, enforces citation validation, and verifies every [E#] reference against the retrieved chunks before streaming a response

The Evidence-Bound Prompt Contract

The AI is not asked to "know about" a website. It is handed a small set of retrieved text chunks from the actual archive and told:

"You may only reference evidence from the provided context. If a question cannot be answered from the evidence, say so clearly. Do not invent URLs, dates, or facts."

Every cited [E#] is validated server-side: if the model outputs a citation number that doesn't correspond to a real retrieved chunk, the response is flagged before it reaches the UI.

The Three 3D Neighborhoods (Three.js)

Each island is a floating plinth with a cottage or library — hand-crafted procedural Three.js geometry:

  • Space Jam Cinema Cottage: timber walls, pumpkin cone roof, glowing screen window, twin V-antennas
  • GeoCities Homestead: mint walls, lavender pitched roof, CRT monitor window with flower box
  • NCSA Mosaic Library: ivory stone body, lilac dome, arched portico with classical columns

Between them: catenary lantern-arc bezier curves, 90 golden particle fireflies, and sinusoidally bobbing 3D ghost meshes hovering over Ghost Plots.


Why Does Open Innovation Matter?

The core tension in this project is between knowing and inventing.

A closed, proprietary LLM endpoint is optimized to be helpful — and helpfulness often means filling in the gap with a plausible answer. Ask it about a dead GeoCities page and it might give you something that sounds like what that page contained. It might be true. It might be confabulation. You cannot know, and the model has no incentive to tell you.

Open models running locally flip this relationship. With Qwen3 running on my machine through Ollama:

  • I control the prompt. The system prompt, the citation contract, the abstention instruction — these can't be overridden by a fine-tune update or a policy change I didn't consent to.
  • I control the retrieval. The model only sees what my own SQLite FTS5 retrieval layer hands it. No external knowledge base, no internet access, no cloud context injection.
  • I can validate every claim. Because the model's entire evidence base is my local SQLite DB, I can write a citation validator that checks every [E#] reference against the actual retrieved chunk before the response reaches the user. This is impossible with a black-box cloud API.
  • It runs completely offline after setup. The web archive of the early internet is itself an act of preservation. An app that requires a cloud connection to explore it would be philosophically incoherent.

Open weight models made it possible to build a trustworthy AI assistant — one where "I don't know" is a valid answer the system is allowed to give, and where you can verify every single thing it claims.


The Spirit of It

When you click a link from 1996 and the route ends at a glowing empty lot — the Ghost Plot — there's a specific feeling. Not sadness, exactly. More like the recognition of an intention. Someone built a page, linked to somewhere they thought was worth linking to, and that somewhere didn't survive.

The Ghost Archivist won't tell you what was there. It can't. Nobody can. But it will tell you exactly what we do know: the anchor text, the target URL, what the source page said around that link. The evidence. Not the memory, not the guess — just the evidence.

That felt right for a project about the dead internet. The AI shouldn't be haunted by the gap. It should be honest about it.


Prize Categories

  • 🏆 Open-Source AI / Open-Weight Models — Local Qwen3:4b via Ollama (Apache 2.0)
  • 🏆 Best Use of AI for Preservation / Heritage — Internet Archive + evidence-bound local archaeology
  • 🏆 Best Technical Implementation — Full-stack local: Three.js 3D city + FastAPI + SQLite FTS5 + Ollama citation-validated RAG
  • 🏆 Hacktoberfest Community Choice — MIT licensed, fully reproducible local setup

Built with React 19 · TypeScript · Vite · Three.js · React Three Fiber · FastAPI · SQLite FTS5 · Ollama · Qwen3 · Internet Archive Wayback CDX API

來源:DEV Community · dev.to