🍡 mochi

SSR framework for Svelte 5 + Bun with islands-based selective hydration

Architecture

FileRole
src/index.tsHTTP server entry point
src/routes.tsRoute definitions
src/mochi-framework/Mochi.tsMochi.serve(), page(), api(), ws(), sse()
src/mochi-framework/ComponentRegistry.tsSSR compilation, hydration preprocessing, client bundling
src/mochi-framework/hooks.tsMiddleware system (Handle, sequence())
src/mochi-framework/utils.tsjson(), error(), gzip
src/mochi-framework/HydratableIsland.tsClient-side custom element for island hydration
src/mochi-framework/ServerIsland.tsClient-side custom element for server island fetching
src/mochi-framework/serverIslandCrypto.tsHMAC signing/verification for server island props
src/mochi-framework/types.tsShared TypeScript types