Skip to content

๐Ÿ™ Expozr lets you share and load modules at runtime, making decentralized app architectures simple, flexible, and hassle-free.

License

Notifications You must be signed in to change notification settings

brunos3d/expozr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

82 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Expozr

Universal plugin ecosystem for dynamic module sharing

Expozr enables any web bundler to expose and consume modules at runtime, creating a truly decentralized application architecture that's simpler and more flexible than traditional approaches.

๐Ÿšง Current Status: Expozr is in active development. The core functionality and Webpack adapter are working with examples available. See examples for working demos.

๐ŸŽฏ Core Concepts

๐Ÿช Expozr (Remote Application)

The application that exposes modules. Think of it as a supplier in the ecosystem.

  • Contains the actual implementation of shared components/utilities
  • Generates an Inventory (exposure map)
  • Can be deployed independently

๐Ÿ  Host (Consumer Application)

The application that consumes exposed modules from expozrs.

  • Loads modules from Expozrs at runtime
  • Uses a Catalog to discover available modules
  • Handles dependency resolution automatically

๐Ÿ“ฆ Cargo (Exposed Module)

Individual module/component being shared.

  • Can be a React component, utility function, entire library, etc.
  • Has metadata: name, version, dependencies, entry point
  • Loaded dynamically at runtime

๐Ÿ“‹ Inventory (Exposure Map)

JSON manifest generated by Expozrs that lists all available Cargo with metadata.

๐Ÿงญ Navigator (Runtime Loader)

Universal runtime system that handles dynamic loading, dependency resolution, and caching.

๐ŸŽจ Examples & Quick Start

The fastest way to understand Expozr is to run the examples! We have working examples for different bundlers and frameworks. Check out the examples directory for complete working examples and detailed setup instructions.

๐Ÿ“‚ Examples Directory

โžก๏ธ View all examples

Example Description Stack
Webpack + Get Started Simplest possible setup TypeScript
Webpack + Vanilla Basic module sharing Vanilla JS + TypeScript
Webpack + React React component sharing React + TypeScript
Webpack + Express (Node.js) Express server module sharing (ESM) Node.js + Express + TypeScript
Webpack + ESM Modern ES modules ESM + TypeScript
Webpack + UMD Universal module format UMD + TypeScript
Vite + React Vite React components Vite + React + TS

โšก Quick Start (2 minutes)

Try the simplest Get Started example:

# 1. Clone and setup
git clone https://github.com/brunos3d/expozr.git
cd expozr
npm install && npm run build

# 2. Start the expozr (port 3001)
cd examples/webpack/get-started/remote
npm run dev

# 3. In a new terminal, start the host (port 3000)
cd examples/webpack/get-started/host
npm run dev

# 4. Open http://localhost:3000 in your browser

That's it! You'll see the host loading and using utilities from the remote expozr in real-time.

๐ŸŽฏ What You'll See

  • โœ… Automatic Config Discovery: Zero configuration needed
  • โœ… Runtime Module Loading: Modules loaded dynamically from remote
  • โœ… Hot Reloading: Changes update instantly in development
  • โœ… Error Handling: Clear error messages and troubleshooting

โœจ Key Features

๐Ÿ™ Universal Module System

  • ๐ŸŒ Bundler Agnostic: Works with any bundler (Webpack, Vite, Rollup, Rspack, etc.)
  • โœจ Multi-Format Support: ESM, UMD, CJS, AMD, IIFE, SystemJS with automatic detection
  • ๐Ÿง  Intelligent Fallbacks: Graceful degradation when preferred formats fail
  • โšก Hybrid Mode: Load both ESM and UMD versions of the same module

๐Ÿš€ Runtime Excellence

  • ๐Ÿš€ Dynamic Loading: Load modules at runtime without build-time coupling
  • ๐ŸŽฏ Smart Format Detection: Automatically detects and loads the best available format
  • ๐Ÿ› ๏ธ Error Recovery: Comprehensive error handling with detailed feedback
  • ๐Ÿ“Š Format Tracking: Monitor which formats are successfully loaded

๐Ÿ”ง Developer Experience

  • ๐Ÿ”ง Great DX: Simple APIs, CLI tools, and comprehensive documentation
  • ๐Ÿ—๏ธ TypeScript First: Full type safety with intelligent autocompletion
  • ๐Ÿ“ฑ Cross-Platform: Works seamlessly in Browser and Node.js environments
  • ๐Ÿ”ฅ Hot Reloading: Development-time module reloading support

โš™๏ธ Advanced Configuration

  • ๐Ÿ”„ Version Management: Semantic versioning with automatic resolution
  • ๐Ÿ—๏ธ Dependency Resolution: Smart dependency handling and conflict resolution
  • โš™๏ธ Configuration Presets: Pre-built configurations for common scenarios
  • ๐Ÿ› ๏ธ Plugin Architecture: Extensible system for custom functionality

๐Ÿ’พ Intelligent Caching

  • ๐Ÿ’พ Multiple Strategies: Memory, localStorage, IndexedDB, or no caching
  • โฑ๏ธ TTL Support: Time-based cache invalidation
  • ๐Ÿ”ง Cache Analytics: Monitor cache performance and hit rates
  • ๐Ÿ”„ Smart Invalidation: Automatic cache updates when modules change

๐Ÿ”’ Production Ready

  • ๐Ÿ›ก๏ธ Error Boundaries: Graceful error handling and recovery
  • ๐Ÿ“Š Performance Monitoring: Track loading times and cache efficiency
  • ๏ฟฝ Debug Mode: Detailed logging for development and troubleshooting
  • ๐Ÿš€ Optimized Loading: Preloading and lazy loading strategies

๐Ÿ“ฆ Packages

Core Packages

  • @expozr/core - Core abstractions, types, and configuration system with multi-format module support (ESM, UMD, CJS)
  • @expozr/navigator - Universal runtime loader with smart format detection, caching strategies, and cross-platform support
  • @expozr/adapter-sdk - Shared SDK and utilities for building bundler adapters with configuration management and format utilities

Bundler Adapters

Framework Utilities

Developer Tools

๐Ÿ› ๏ธ Bundler Support

Bundler Status Package
Webpack 5+ โœ… Ready @expozr/webpack-adapter
Vite โœ… Ready @expozr/vite-adapter
esbuild ๐Ÿ“‹ Planned @expozr/esbuild-adapter
Rollup ๐Ÿ“‹ Planned @expozr/rollup-adapter
Rspack ๐Ÿ“‹ Planned @expozr/rspack-adapter
Parcel ๐Ÿ“‹ Planned @expozr/parcel-adapter
Bun ๐Ÿ“‹ Planned @expozr/bun-adapter
Turbopack ๐Ÿ“‹ Planned @expozr/turbopack-adapter
SWC ๐Ÿ“‹ Planned @expozr/swc-adapter
Farm ๐Ÿ“‹ Planned @expozr/farm-adapter

โš›๏ธ Frontend Framework Support

Framework Status Package Features
Vanilla JS โœ… Ready @expozr/core Universal module loading
React โœ… Ready @expozr/react Component loading, Suspense integration
Next.js ๐Ÿ“‹ Planned @expozr/nextjs SSR/SSG support, App Router integration
Modern.js ๐Ÿ“‹ Planned @expozr/modernjs Module federation, SSR support
Remix ๐Ÿ“‹ Planned @expozr/remix Route-based loading, loader integration
Gatsby ๐Ÿ“‹ Planned @expozr/gatsby Static generation, build-time integration
Vue ๐Ÿ“‹ Planned @expozr/vue Component loading, async components
Nuxt ๐Ÿ“‹ Planned @expozr/nuxt SSR/SSG support, auto-imports
Angular ๐Ÿ“‹ Planned @expozr/angular Module loading, lazy loading integration
Svelte ๐Ÿ“‹ Planned @expozr/svelte Component loading, reactive updates
SvelteKit ๐Ÿ“‹ Planned @expozr/sveltekit SSR support, route-based loading
Solid ๐Ÿ“‹ Planned @expozr/solid Component loading, lazy components
SolidStart ๐Ÿ“‹ Planned @expozr/solidstart SSR support, file-based routing
Astro ๐Ÿ“‹ Planned @expozr/astro Multi-framework support, island loading
Qwik ๐Ÿ“‹ Planned @expozr/qwik Resumable components, edge optimization
Lit ๐Ÿ“‹ Planned @expozr/lit Web component loading

๐Ÿ”ง Development Tools & Plugins

Tool Status Package Features
Node.js โœ… Ready @expozr/core Native runtime support
npm โœ… Ready @expozr/core Standard package manager support
TypeScript โœ… Ready @expozr/core Full TypeScript support
Bun ๐Ÿ“‹ Planned @expozr/bun All-in-one runtime, package manager, bundler
Deno ๐Ÿ“‹ Planned @expozr/deno Secure runtime, built-in tooling
Nx ๐Ÿ“‹ Planned @expozr/nx Monorepo integration, workspace management
Turbopack ๐Ÿ“‹ Planned @expozr/turbopack Fast builds, incremental compilation
Turborepo ๐Ÿ“‹ Planned @expozr/turborepo Monorepo builds, remote caching
Lerna ๐Ÿ“‹ Planned @expozr/lerna Package publishing, version management
Rush ๐Ÿ“‹ Planned @expozr/rush Scalable monorepo, dependency management
Changesets ๐Ÿ“‹ Planned @expozr/changesets Version management, changelog generation
pnpm ๐Ÿ“‹ Planned @expozr/pnpm Workspace support, efficient installs
Yarn PnP ๐Ÿ“‹ Planned @expozr/yarn-pnp Zero-installs, workspace optimization
esbuild ๐Ÿ“‹ Planned @expozr/esbuild Ultra-fast builds, module transformation
SWC ๐Ÿ“‹ Planned @expozr/swc Fast compilation, TypeScript support
Babel ๐Ÿ“‹ Planned @expozr/babel Code transformation, plugin ecosystem
Biome ๐Ÿ“‹ Planned @expozr/biome Linting integration, code formatting
ESLint ๐Ÿ“‹ Planned @expozr/eslint Code quality, custom rules
Prettier ๐Ÿ“‹ Planned @expozr/prettier Code formatting integration
Husky ๐Ÿ“‹ Planned @expozr/husky Git hooks, pre-commit validation
Vitest ๐Ÿ“‹ Planned @expozr/vitest Testing integration, module mocking
Jest ๐Ÿ“‹ Planned @expozr/jest Testing framework integration
Playwright ๐Ÿ“‹ Planned @expozr/playwright E2E testing, module loading tests
Storybook ๐Ÿ“‹ Planned @expozr/storybook Component documentation, isolated testing

๐Ÿ—บ๏ธ Roadmap

Phase 1: Foundation โœ…

  • Core library and types
  • Navigator runtime system
  • Webpack adapter
  • Vite adapter
  • React utilities
  • Working examples (Get Started, Vanilla, React, ESM, UMD, Vite)
  • Basic CLI tools (in beta)

Phase 2: Expansion ๐Ÿšง

  • Stable CLI with templates
  • Rollup adapter
  • Advanced CLI features
  • More framework examples (Vue, Angular, Svelte)
  • Documentation website

Phase 3: Production ๐Ÿ“‹

  • Performance optimizations
  • Security features
  • Monitoring tools
  • Registry service
  • VS Code extension

Phase 4: Ecosystem ๐Ÿ”ฎ

  • Plugin marketplace
  • Community tools
  • Enterprise features

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

๐Ÿ“„ License

MIT ยฉ Bruno Silva


๐Ÿš€ Built with โค๏ธ for the developer community

About

๐Ÿ™ Expozr lets you share and load modules at runtime, making decentralized app architectures simple, flexible, and hassle-free.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published