@fonderie/core
v0.5.0
Published
Framework core — request router, middleware pipeline, module system, and shared context types. Every other @fonderie-js package depends on this.
Maintainers
Readme
@fonderie/core
The framework core every other @fonderie-js package builds on: a web-standard
request router, a composable middleware pipeline, a module system, and the
shared IFonderieContext that flows through all of it.
You can run it standalone — FonderieApp includes a Node HTTP server — or
mount it inside an existing Express, Hono, or Koa app via the adapter packages.
Install
npm install @fonderie/coreUse
import { FonderieApp, defineConfig } from '@fonderie/core';
const app = new FonderieApp(defineConfig({ basePath: '/v1' }));
app.listen(3000, { name: 'my-api' });Built-in middlewares (CORS, request logging, auth guards, body parsing) live under their own entry point so the root barrel stays lean:
import { cors, requireAuth } from '@fonderie/core/middlewares';Also exported: compose for middleware composition, HTTP/setApiResponse
response helpers, and defensive parsers (stringOrEmpty, numberOrZero, …)
for untrusted input.
The module system
Feature packages — auth,
workspaces,
billing,
courier, and
friends — implement IFonderieModule and register their routes, migrations,
and event handlers against this core. Pick the modules your product needs;
skip the rest.
Why this exists
You've shipped this plumbing before — auth, teams, billing, messaging —
and the next project will ask for it again. Fonderie packages it once:
plain TypeScript modules for
@fonderie/core,
PostgreSQL-backed, self-hosted, MIT. No external control plane, no
per-seat anything. Register the modules you need; skip the ones you don't.
This package owns the contract. The router, middleware pipeline, request context, and module lifecycle every other brick builds against. It depends on nothing; everything depends on it.
Browse the whole set at fonderie-js/sdk · follow @fonderiejs
License
MIT © Fonderie, Inc.
