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

Doh: A Pragmatic JavaScript Framework

Doh.js delivers a uniquely productive JavaScript experience for Browser, Node.js, and Bun by replacing fragmented tooling with a deeply integrated core. This core is not a loose collection of features, but a layered architecture—from its foundational inheritance logic to its live, reactive runtime—engineered to provide a clear, consistent, and accelerated path from idea to application.

What Problems Does Doh Try to Solve?

JavaScript

Modern JavaScript development often involves:

  • Managing different import and module systems
  • Configuring complex build pipelines
  • Handling environment inconsistencies
  • Waiting for slow feedback loops during development
  • Organizing code for reuse and maintainability

Doh offers a pragmatic approach focused on developer experience and productivity by addressing these challenges through a deeply integrated architecture.

The Core Architecture of Doh

Understanding Doh means looking beyond the surface features to the foundational pillars that support them. Each layer builds upon the previous, creating a robust and coherent system.

1. Core Algorithm: Resolution Order

At the very heart of Doh lies its Resolution Order. This fundamental algorithm dictates how inheritance, conditions, and overrides behave consistently across the entire framework—from packages and modules to patterns and configuration pods. Mastering this single rule set is key to understanding Doh's predictable nature.

2. Spatial Fabric: DohPath

Before any resource can be resolved or loaded, it must be located. DohPath provides a stable, layered coordinate system (/, ^/, ./) for all files and resources, ensuring consistent path handling across Node.js, browsers, and the Virtual File System (VFS) in exported applications. This underpins the load system, auto-packager, and more.

  • DohPath: Cross-environment path management.

3. Build-Time Intelligence: Auto-Packager & Manifests

The Auto-Packager acts as Doh's "compiler pass." It analyzes your codebase, resolves dependencies using the Resolution Order, and generates Manifests. These manifests are pre-computed blueprints of your project (dependency graphs, pattern maps, etc.) that the runtime Load System consumes for instant resource availability, minimizing configuration and build times.

4. Runtime Kernel: The Load System & Doh.Loaded Cache

The Doh Load System is the universal courier for all resources (JS, CSS, JSON, Modules, etc.). While Doh.load() is the underlying imperative function, the system is most commonly used declaratively through the load property in Packages Doh.Package(name, {load:[]}) and Modules Doh.Module(name, load, moduleFunction). It populates Doh.Loaded, an in-memory, virtual file system cache that serves as the single source of truth for all runtime resources. This ensures every subsequent layer—patterns, HMR, data binding—operates on consistent, up-to-date information.

5. Reactive Nervous System: Data Binding & HVFS

The Hot Virtual File System (HVFS) monitors file changes and updates Doh.Loaded in real-time. Doh's Data Binding capabilities (observe/mimic) then propagate these changes into live objects and the DOM, enabling state updates without page refreshes. This synergy creates a highly reactive development environment.

6. Compositional Language: Pattern Engine

The Pattern Engine is the human-facing Domain Specific Language (DSL) that allows developers to leverage the power of Doh's Resolution Order for object composition. Patterns provide a structured way to define reusable components with multiple inheritance, melded properties, and lifecycle management, forming the primary building blocks for applications.

7. Governance Layer: Pods

Pods provide hierarchical configuration management, utilizing the same Resolution Order mechanism to scope settings for different environments, tenants, or application instances. This allows for adaptable deployments while keeping the core codebase generic and clean.

  • Pods: Hierarchical configuration.

8. Distribution Loop: Dohballs (Code Sharing)

Dohballs complete a specific kind of distribution loop: packaging parts of a Doh project (folders containing one or more packages) into versioned, content-addressed archives for easy consumption by other Doh projects. They facilitate inter-project code sharing and reuse, distinct from primary application deployment to production (which typically uses Git or services like Doh Cloud). The Auto-Packager prepares these shareable units.

For a comprehensive understanding of how these components fit together, see the:

Key Application Modules & Services

Beyond the core framework, Doh provides ready-to-use modules for common application needs, built upon the same foundational principles:

Quick Start

Here's a simple example of what Doh code looks like:

Doh.Module('MyApp', [
    'browser?? styles.css'
], function() {
  // Create a reusable component
  Pattern('Counter', 'html', {
    html: '<div>Count: <span id="count">0</span> <button id="increment">+</button></div>',
    html_phase() {
      this.count = 0;
      this.e.find('#increment').onclick = () => this.increment();
    },
    increment() {
      this.count++;
      this.e.find('#count').textContent = this.count;
    }
  });
});

Get started with Doh in a few steps:

  1. Install Doh

    • Windows:

      powershell -c "irm deploydoh.com/install.ps1 | iex"
      
    • Mac/Linux/Unix:

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

    doh install bun
    
  3. Create a Web App

    doh init webserver
    

    This scaffolds a complete Express webserver, pre-configured with HVFS.

  4. Run Your App

    doh run
    

    Visit http://localhost:3000. Edit project files and see instant updates.

Basic Usage Examples

  1. Run your Doh application:

    doh run
    
  2. Explore available commands:

    doh help
    
  3. Configure your app: Edit pod.yaml (local settings) and boot.pod.yaml (app-wide settings).

Who Might Find Doh Useful?

Doh might be helpful if you:

  • Build applications that run in multiple environments
  • Want faster development feedback loops
  • Prefer declarative approaches to dependency management
  • Value integrated tooling with minimal configuration
  • Need a structured approach to code organization

License

Doh is privately licensed by Disrupter L.L.C. (https://disrupter.com)

Last updated: 8/23/2025