Snapshot for
@system-core/core0.8.x. Current docs live at /.
Nuxt App On System-Core
Recipe
This is the default full-stack path for a public site or admin app hosted on Nuxt 3 / Nitro.
Target Outcome
- Nuxt hosts the HTTP surface and frontend rendering.
createSystem()owns CMS, auth, delivery, storage, and platform runtime concerns.- Nuxt routes and server handlers compose around package exports instead of bypassing them.
Build Shape
- Install
@system-core/coreand the required peer dependencies. - Create one Nuxt server plugin that bootstraps
createSystem({ prisma, ... }). - Use
@system-core/core/integrations/nuxtfor request/response adapter work. - Keep server routes on runtime surfaces like
system.cms,system.auth, andsystem.delivery. - Use
site-client,theme,sections, andui-contractson the browser side.
Install
bash
npm install @system-core/core zod @prisma/client h3
npm install bcryptjs jsonwebtoken nodemailerAdd these only if the project needs them:
- Redis-backed limits or queues:
npm install ioredis - S3 media storage:
npm install @aws-sdk/client-s3 @aws-sdk/s3-request-presigner
Server Bootstrap
ts
import { createSystem } from '@system-core/core'
export default defineNitroPlugin(async () => {
const system = await createSystem({
prisma,
media,
notifications: {
appUrl: 'https://example.com',
appName: 'Example'
}
})
globalThis.__system = system
})HTTP Composition
ts
import { h3Adapter } from '@system-core/core/integrations/nuxt'
export default defineEventHandler(async (event) => {
const system = globalThis.__system
const body = await h3Adapter.readBody(event)
const page = await system.cms.getPageBySlug(body.slug)
return { page }
})Frontend Boundaries
- Public pages:
@system-core/core/site-client - Theming:
@system-core/core/theme - Section rendering metadata:
@system-core/core/sections - Shared renderer contracts:
@system-core/core/packages/ui-contracts
Do Not
- Import
core/*files into Nuxt app code. - Rebuild auth or CMS state outside
createSystem(). - Push server runtime objects into browser bundles.