@cadriciel/kernel
v0.3.2
Published
Core kernel for Cerema Cadriciel
Readme
🧠 @cadriciel/kernel
The heart of the Cadriciel framework. The Kernel provides the core ecosystem, module registration, and fundamental system utilities.
Features
- Module Lifecycle: Manages
setup,routes, andstartphases for all framework modules. - Unified Context: Re-exports Hono core components to provide a consistent development experience.
- Service Registry: A centralized registry for cross-module service sharing.
- Configuration: Integrated dotenv management.
- Logging: Pre-configured professional logger.
Usage
import { Kernel } from "@cadriciel/kernel";
const kernel = new Kernel();
// Load modules
kernel.load(moduleA);
kernel.load(moduleB);
// Start the server
kernel.start({ port: 8080 });Internal Context (Hono)
The Kernel re-exports Context, Next, and Hono so you don't need to depend on hono directly in your business logic.
import { Context } from "@cadriciel/kernel";
export const GET = (c: Context) => {
return c.text("Powered by Cadriciel Kernel");
};