Home Doh Ref
Dohballs
  • 📁 doh_chat
  • 📁 doh_modules
    • 📦 dataforge
    • 📦 express
    • 📁 sso
    • 📁 user

Doh.js Documentation

JavaScript

Doh.js is a unified execution environment where the boundary between Client, Server, and Network has been deleted. Paired with uNet VPU, it forms a complete application platform - from UI rendering and state management to encrypted networking and cloud orchestration - governed by a single composition algorithm.

The Core Idea

One composition algorithm governs everything in Doh: object inheritance, module loading, configuration cascading, database pipelines, and network routing.

That algorithm has two parts:

  1. Resolution Order - Flattens any dependency graph into a deterministic ordered list. No ambiguity about what runs first.
  2. Melded Object Composition (MOC) - Explicit per-property rules for how values combine. Objects merge. Arrays concatenate. Methods collaborate with controlled ordering and return handling.

These two primitives - ordering and melding - solve every namespace conflict the framework encounters, from pattern inheritance to pod configuration to load dependencies.

-> Learn about Resolution Order -> Learn about MOC

The Sovereign Stack

The full stack:

Application Layer - Patterns with multiple inheritance, lifecycle phases, reactive state, and HTML rendering

Infrastructure Layer - Auto-Packager performs AST-level analysis of your code, generates manifests, and resolves dependencies at build time. No transpilation. Your code runs as-is.

Server Layer - Express Router unifies HTTP and WebSocket, User System handles auth, Dataforge provides declarative data pipelines, Pods handle configuration.

Network Layer - uNet VPU provides trust-first encrypted networking where identity is established at the protocol level before any traffic flows. Self-healing routing, address portability, and multi-VPU membership.

Operations Layer - Cloud Manager for distributed instance orchestration, Security Audit for automated checks, MCP Server for AI assistant integration.

Zero-Management Infrastructure

No build configuration:

doh update  ->  AST scan  ->  manifests  ->  doh run

The Auto-Packager scans your source code, understands dependencies, exports, and environment targets, then generates structured metadata. Runtime execution reads these manifests - your code is never transpiled or transformed.

Environment fluidity: Patterns run on browser or server, Bun or Node. The same module system, the same composition rules, the same code.

Path resolution: DohPath handles project-relative (/), module-relative (^/), and package-relative (^:pkg/) paths across all environments.

Feature-Driven Composition

No single-inheritance class hierarchies. Capabilities compose:

Pattern('LiveDashboard', [
    'AuthenticatedUser',    // JWT auth, session management
    'ReplicatedState',      // CRDT sync across all clients
    'RealTimeStream',       // WebSocket + Socket.IO
    'html'                  // DOM, events, CSS proxies
], {
    // Four capabilities. Zero glue code.
    // MOC governs how their methods, properties, and state combine.
});

Every property gets explicit rules for how it combines during inheritance. Every method gets pre_ and post_ hooks automatically. The composition strategy itself becomes part of your domain modeling.

-> Explore the full architecture overview

Quick Start

1. Install Doh CLI

Windows:

powershell -c "irm deploydoh.com/install.ps1 | iex"

Mac/Linux:

curl -fsSL https://deploydoh.com/install | bash

2. Install a Package Manager

Bun:

doh install bun

OR

Node:

doh install node

3. Create Your App

mkdir my-app && cd my-app
doh init webserver

4. Run

doh run

Runs at http://localhost:3000 with HMR - CSS, HTML, JSON, and Patterns hot-reload without page refresh.

Reference

Last updated: 2/17/2026