The architectural engine of the MontRS framework.
Target Audiences: Application Developers, Framework Contributors, Agents.
montrs-core provides the foundational traits and data structures that define the "Shape" of a MontRS application. It is the minimal runtime required to build a deterministic, modular system.
- Architectural Fragmentation: Provides a unified way to define plates, routes, and configuration.
- Testing Complexity: Enables deterministic execution and mocking through trait-driven interfaces.
- Agent Discoverability: Implements the base metadata hooks that allow agents to understand the codebase.
- Rendering: It does not handle UI rendering (that's handled by Leptos/UI packages).
- IO Operations: It defines interfaces for DBs and Files but does not implement the drivers (see
montrs-orm). - Build Logic: It has no knowledge of how the app is compiled (see
montrs-cli).
This is the root dependency. Every other package in the ecosystem depends on montrs-core. It acts as the "contract" between different parts of the framework.
- When defining a new
PlateorRoute. - When implementing a custom
AppConfigorAgentError. - When building a new integration package for MontRS.
- Architecture Overview
- Plates - The unit of composition.
- Routing System - The unified Route trait.
- Core Contract: All significant framework behaviors are defined via traits in this package.
- Unified Route: The
Routetrait combines params, loaders, actions, and views into a single, machine-readable unit. - Metadata Hook: Use the
.description()and.metadata()methods on anyPlateorRouteto understand its purpose. - Error Handling: Look for
AgentErrorimplementations to get structured debugging context. - Deterministic: Assume all core components are deterministic unless explicitly documented otherwise.