We will be undergoing planned maintenance on January 16th, 2026 at 1:00pm UTC. Please make sure to save your work.

Inspiration

I was frustrated by the "dependency hell" of modern web development. node_modules folders are heavier than black holes. I asked a simple question: "How much can you build with almost nothing?" Could I build a core so robust and generic that it could power two completely opposite use cases—a chaotic game and a strict medical record system—without changing a single line of the foundation?

What it does

PhantomUI demonstrates the power of the HauntForge core. It is a monorepo containing:

  1. The Core (HauntForge): A tiny (~400 LOC) framework providing a Universal Router, Redux-like State Management, Event Bus, Storage Abstraction, and Plugin System. It has zero runtime dependencies.
  2. Shadow Realms: A real-time multiplayer game server built on the core.
  3. MediVault: A HIPAA-compliant medical record system built on the same core.
  4. PhantomUI: An interactive, visual dashboard that runs these demos in the browser, visualizing the internal state, logs, and architecture in real-time.

How I built it

I built it with TypeScript and Node.js, using npm workspaces for the monorepo structure.

  • Core: Pure TypeScript, no external libraries.
  • Build System: esbuild for lightning-fast compilations.
  • Testing: jest and fast-check for property-based testing to ensure bulletproof reliability.
  • UI: Vanilla HTML/CSS/JS for the PhantomUI dashboard to maintain the "no dependencies" philosophy even in the frontend.

Challenges I ran into

  • The "Zero Dependency" constraint: Implementing a robust event bus and complex state management without libraries like Redux or RxJS was difficult but rewarding.
  • Universal Routing: Designing a router that works equally well for HTTP requests (medical app) and WebSocket commands (game) required a novel abstraction.
  • Type Safety: Ensuring strict type safety across a monorepo with shared generic interfaces was a constant battle.

Accomplishments that I'm proud of

  • 400 Lines: I stuck to our limit. The core really is that small.
  • Versatility: It actually works. The game plays, and the medical records stay secure, using the same code.
  • Performance: Without the bloat, the startup time is instant (sub-millisecond).

What I learned

  • Most libraries solve problems you don't have yet.
  • Abstractions are powerful when they model the domain, not the technology.
  • TypeScript's type system is a superpower for enforcing architectural boundaries.

What's next for HauntForge

  • Plugin Ecosystem: I want to build a library of plugins (Auth, Database adaptors).
  • CLI Generator: npx create-haunt-app to scaffold new projects.
  • WebAssembly: Porting the core to WASM for even more portability.
Share this project:

Updates