# PROJECT — Wikipedia3D Revival

## Summary
A 3D semantic web explorer built around Wikipedia/DBpedia that lets users **walk through knowledge**. The aim is to preserve the original “spatial discovery” feel while modernizing the tech stack and data sources.

## Current state (2026 snapshot)
- **Frontend:** legacy JS (jQuery + MooTools + old Three.js), global namespaces, no build step.
- **Backend:** PHP proxies for CORS + lightweight API access.
- **APIs:** Wikipedia API, DBpedia SPARQL, GeoNames; old Google Maps JS API with panoramio; AlchemyAPI (dead).
- **Hosting:** originally on Apache; works with PHP built-in server for local dev.

## Unique features worth preserving
- Real-time 3D spawning of Wikipedia entities
- Spatial browsing with first-person camera
- Map-driven “find nearby” discovery
- Favourites + blacklist + quick language switching
- Lightweight, static-ish deployment (no heavy backend)

## Known breakpoints
- Panoramio library removed → map layer needs modernization
- AlchemyAPI is shut down → remove/replace
- HTTP endpoints + mixed content → fail under HTTPS
- Hard-coded domain URLs → break local use

## Success criteria (modernization)
- Runs on modern browsers (no legacy polyfills)
- Fully local-dev friendly (one command)
- CORS-safe and configurable API endpoints
- Maintains the signature UX: 3D walkable graph + map discovery
- Easy deploy to static hosting or simple Node/PHP server

---

## Roadmap

### Phase 1 — Stabilize (1–2 days)
- Replace hard-coded URLs with relative or config values
- Consolidate configuration into a single `config.js`
- Add minimal dev script: `npm run dev` or `php -S`

### Phase 2 — Frontend modernization (1–2 weeks)
- Upgrade to modern Three.js (ES modules)
- Replace MooTools and outdated jQuery plugins
- Refactor core logic into modules (`browser`, `item`, `data`, `ui`)
- Add linting + formatting

### Phase 3 — Data layer refresh (1 week)
- Add Wikidata SPARQL as primary
- Cache + rate-limit API requests in proxy
- Replace deprecated endpoints (AlchemyAPI, Panoramio)

### Phase 4 — Experience upgrades (optional)
- Better layout algorithms for nodes
- A “timeline trail” of explored topics
- WebXR / VR mode (optional)
- Mobile-friendly UI pass

---

## Risks / considerations
- API changes may alter data availability and result structures.
- Rewriting the UI may unintentionally lose the “feel” of the original.
- The proxy should be secured to prevent abuse in public deployments.

---

## Immediate recommendation
Start with **Phase 1** (URL fixes + config), then build a clean **Phase 2** modern frontend while preserving the original UI layout and controls.

If you want, I can begin Phase 1 now and open a modernization branch for Phase 2.
