Advanced Topics
This section covers advanced Minima.js concepts for building custom integrations and understanding the framework's internals.
Topics
Module Discovery Configuration
Customize how Minima.js discovers modules: change filenames, scan roots, or plug in a custom scanner.
Topics covered:
moduleDiscoveryoptions (root,index,scanner)- Absolute path requirements
- Custom discovery patterns
- Disabling discovery for manual registration
Custom Runtime Adapters
Learn how to create custom adapters to run Minima.js on different runtimes like Deno, uWebSockets.js, or any other HTTP server implementation.
Topics covered:
- Understanding the
ServerAdapterinterface - Converting between native and Web standard Request/Response
- Implementing runtime-specific features
- Examples for Deno, uWebSockets.js, and more
Container and Encapsulation
Deep dive into Minima.js's container system for managing state, settings, and module isolation.
Topics covered:
- Understanding the container architecture
- How container cloning works (arrays, cloneable objects, references)
- Using containers for plugin settings and configuration
- Module hierarchy and the modules chain
- Best practices for container usage
- Advanced patterns for shared state and encapsulation
Who Should Read This?
These guides are for:
- Framework integrators creating adapters for new runtimes
- Plugin authors building complex plugins with state management
- Advanced users who need fine-grained control over encapsulation
- Contributors understanding Minima.js internals
Prerequisites
Before diving into these topics, you should be familiar with:
- Core Concepts
- Hooks System
- TypeScript and advanced JavaScript concepts
Related Documentation
Getting Help
If you're working on a custom adapter or have questions about containers:
- Check the source code - the implementations are well-documented
- Review existing adapters in
packages/server/src/nodeandpackages/server/src/bun - Open a discussion on GitHub
- Join our community for support
Contributing
Found an issue or want to improve these guides? Contributions are welcome! See our Contributing Guide.