@dnzn/dxkit
v0.1.4
Published
DxKit — A headless microframework for building composable dapps.
Downloads
644
Readme
DNZN // DxKit
A headless microframework for building composable dapps. Routing, lifecycle management, event bus, plugin registry — zero DOM ownership.
by Denizen. // dnzn.wei
Release Info
Project Status
| STATUS | VERSION | AUDIT |
|:---|:---|:---|
| vibe/alpha | 0.1.0 | Self Review |
This is alpha software. Let it bake. Do not trust in production without thorough testing and review.
No warranty.
Installation
Framework
npm install @dnzn/dxkitPlugins
npm install @dnzn/dxkit-auth
npm install @dnzn/dxkit-wallet
npm install @dnzn/dxkit-settings
npm install @dnzn/dxkit-themeDocumentation
Framework
| DOCUMENT | DESCRIPTION | |----------|-------------| | Getting Started | Framework overview, core concepts, lifecycle, config, full sample project | | Dapp Development | Manifest, lifecycle events, context, settings, sub-routing, standalone mode | | Plugin Development | Plugin interface, init lifecycle, custom events, duck-typing, full example | | System Internals | Architecture, sequence diagrams, router/lifecycle/event bus internals | | Events Reference | Complete event catalog with payloads, organized by source | | API Reference | All factory functions, interfaces, and type definitions | | Cookbook | Patterns & recipes — DxKit by example |
Plugins
| DOCUMENT | DESCRIPTION | |----------|-------------| | @dxkit/wallet | Wallet providers, EIP-1193, local dev, custom providers | | @dxkit/auth | Passthrough auth, wallet bridging | | @dxkit/theme | CSS theming, light/dark/system, DOM integration | | @dxkit/settings | Key-value store, sections, form generation, dapp toggles |
Development
Common Helpers
make setup # Install dependencies and initialize development environment
make build # Build dxkit + all plugins -> dist/ + plugins/*/dist/
make test # Lint + run all tests (vitest + happy-dom)
make test-watch # Lint + run tests in watch mode
make lint # Run biome check
make lint-fix # Run biome check with auto-fix
make lint-format # Run biome format with auto-fix
make clean # Remove all dist/ directories
make superclean # Remove all dist/ and node_modules/ directories
make audit # Run pnpm audit, semgrep SAST, and gitleaks secret detectionTests run the standalone vitest config (vitest.config.ts) with happy-dom for DOM APIs.
Build System
Each package (core + plugins) uses tsup to produce three output formats from a single TypeScript entry point:
| FORMAT | PATH | PURPOSE |
|--------|------|---------|
| ESM | dist/index.js | Modern import/export — bundlers, Node.js, <script type="module"> |
| CJS | dist/index.cjs | CommonJS require() — legacy Node.js tooling |
| IIFE | dist/index.global.js | Self-contained <script> tag — no bundler required, good for IPFS/etc |
The exports field in each package.json maps consumers to the right format automatically. IIFE builds attach to a global (DxKit, DxWallet, DxAuth, DxTheme, DxSettings) for use in static HTML without a build step — the primary deployment target for dapps served from IPFS or file:///.
Plugin IIFE builds bundle dxkit core inline (noExternal: ['dxkit']). ESM/CJS builds declare it as external to avoid duplication when used with a bundler.
License
MIT — see LICENSE.
