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

@actdim/dynstruct

v1.5.14

Published

A type-safe component system for large-scale apps: explicit dependencies, message bus communication, and structure-first, declarative design

Readme

@actdim/dynstruct

Structure-First Component Model & Architecture for Large-Scale TypeScript Apps

npm version TypeScript License: BUSL-1.1 Open in StackBlitz


What is Dynstruct?

@actdim/dynstruct is a TypeScript-first component system and architectural framework. It replaces fragile prop-drilling, scattered MobX observables, and tightly-coupled component trees with declarative component structures, zero-boilerplate MobX reactivity, and decoupled message bus channels.

The Problem It Solves

  • Spaghetti React State: Scared of refactoring because prop-drilling and callback chains bleed through 5 layers of UI?
  • Implicit Dependencies: Hard to tell what data or API services a component needs just by reading its signature?
  • Reactivity Boilerplate: Tired of manual makeAutoObservable, autorun cleanup, and useEffect dependencies?

The Output You Get

  • Explicit Type-Safe Contracts: Declare props, actions, child structures, and message channels at the TypeScript level before writing UI code.
  • 🎯 Decoupled Architecture: Components interact over typed message channels (@actdim/msgmesh) rather than hard-coded callbacks.
  • 🔄 Automatic Fine-Grained Reactivity: Mutate model.prop = value and UI updates automatically. Zero extra hooks or boilerplate.
  • 🎨 First-Class UI Adapter Support: Ready-to-use Material UI adapters via @actdim/dynstruct-mui.

15-Second Code Snippet

import { ComponentStruct, ComponentDef, ComponentParams } from '@actdim/dynstruct/componentModel/contracts';
import { useComponent, toReact, bind } from '@actdim/dynstruct/componentModel/react';

// 1. Declare pure type structure (Zero runtime code needed)
type CounterStruct = ComponentStruct<AppMsgStruct, {
    props: { count: number };
    actions: { increment: () => void };
}>;

// 2. Define component logic & view
const useCounter = (params: ComponentParams<CounterStruct>) => {
    let c: Component<CounterStruct>;
    let m: ComponentModel<CounterStruct>;

    const def: ComponentDef<CounterStruct> = {
        props: { count: 0 },
        actions: { increment: () => { m.count++; } }, // Mutate directly — reactive UI updates automatically
        view: () => (
            <button onClick={m.increment}>Count: {m.count}</button>
        ),
    };

    c = useComponent(def, params);
    m = c.model;
    return c;
};

// 3. Export as a native React component
export const Counter = toReact(useCounter);

Installation

pnpm add @actdim/dynstruct @actdim/msgmesh @actdim/utico mobx mobx-react-lite react react-dom

Documentation Index

Explore the complete guide step-by-step from core concepts to advanced patterns:

| Section | Description | |---|---| | 📖 01. Overview & Key Advantages | Framework design philosophy, UI companion libraries, and comparison with MobX/React. | | 🧩 02. Core Concepts | ComponentStruct, ComponentDef, reactive properties, form helpers (mapToEdit), and events. | | 🏗️ 03. Architecture & Wiring | Message channels, parent-child wiring, direct bindings (bind), and effects. | | ⚛️ 04. React Integration & Services | useComponent, toReact, API service adapters, routing, and auth providers. | | 🛠️ 05. API Reference & Development | Complete type reference, Storybook integration, and testing commands. |


Quick Interactive Demo

Try @actdim/dynstruct in your browser via StackBlitz:

Open in StackBlitz

# Run live Storybook examples locally
pnpm run storybook

AI-Assisted Development

Developed with Along - a provider-agnostic context and memory system for AI coding agents.


License

Proprietary / BUSL-1.1. See LICENSE for details.