npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ddjex/ddjex

v0.4.0

Published

Declarative Deterministic JSON Execution - Runtime for LLM code generation

Readme

ddjex

Declarative Deterministic JSON Execution - A JavaScript runtime optimized for LLM code generation.

What is ddjex?

ddjex is a reactive runtime where all code is JSON. No custom syntax, no DSL, no JSX - just pure JSON that any LLM can generate reliably.

Design Principles

  • JSON-Only: All code is valid JSON
  • One-Way: Exactly one pattern per concept
  • Explicit: Zero magic, everything declared
  • Minimal: 6 primitives, everything composes
  • Predictable: Deterministic execution

The 6 Primitives

| Primitive | Purpose | Reactive | |-----------|---------|----------| | value | Immutable data | No | | state | Mutable data with subscriptions | Yes | | computed | Derived from state/computed | Yes | | effect | Side effects on state change | Yes | | action | Batch state mutations | No | | component | UI/Service composition unit | Yes |

Installation

npm install ddjex

Quick Start

Browser

<div id="app"></div>
<script src="https://unpkg.com/ddjex/dist/ddjex.browser.min.js"></script>
<script>
const program = {
  "$ddjex": "0.4.0",
  "id": "counter",
  "target": "dom",
  "state": {
    "count": { "type": "number", "initial": 0 }
  },
  "actions": {
    "increment": {
      "mutations": [{ "target": "count", "op": "add", "value": 1 }]
    }
  },
  "root": {
    "type": "div",
    "children": [
      { "type": "button",
        "events": { "click": { "action": "increment" } },
        "children": [{ "text": "Count: " }, { "bind": "count" }]
      }
    ]
  }
};

DDJEX.run(program, { container: '#app' });
</script>

Node.js (Server)

import { createRuntime } from 'ddjex/server';

const program = {
  "$ddjex": "0.4.0",
  "id": "api",
  "target": "server",
  "state": {
    "items": { "type": "array", "initial": [] }
  },
  "routes": [
    { "method": "GET", "path": "/items", "handler": { "ref": "items" } },
    { "method": "POST", "path": "/items", "action": "addItem" }
  ],
  "actions": {
    "addItem": {
      "params": ["body"],
      "mutations": [{ "target": "items", "op": "push", "value": { "param": "body" } }]
    }
  }
};

const runtime = createRuntime(program);
runtime.listen(3000);

Program Structure

Every ddjex program is a JSON object:

{
  "$ddjex": "0.4.0",
  "id": "program-id",
  "target": "dom | server | cli",
  "state": { },
  "computed": { },
  "effects": [ ],
  "actions": { },
  "root": { }
}

Features

  • Reactive State: Fine-grained reactivity with automatic dependency tracking
  • 80+ Operations: Math, array, object, string, control flow, async
  • Multiple Targets: DOM (browser), Server (HTTP), CLI
  • Router: Client-side routing with guards, params, nested routes
  • Animations: Enter/exit transitions, spring physics
  • Self-Testing: Inline tests in JSON, 12 assertion operators
  • Constraints: State validation (min, max, pattern, unique)
  • WebSocket: Real-time communication
  • SSR: Server-side rendering with hydration
  • HMR: Hot module replacement for development

Documentation

Targets

DOM (Browser)

{ "target": "dom", "root": { "type": "div", ... } }

Server (HTTP)

{ "target": "server", "routes": [...] }

CLI

{ "target": "cli", "commands": [...] }

Development

# Run tests
npm test

# Development server with HMR
npm run dev

License

MIT