Nucleify Docs

Getting Started

Introduction

Build once. Move to any framework.

Yes - you can migrate any existing Next, Nuxt, Vue, React, or other supported app as-is. Product convert (nuc emit convert) takes the framework project you already have. There is no gate for a prior shared_modules refactor, no *.nuc.tsx rewrite, no Nucleify token rewrite, and no IR-first rewrite of the app. Portable *.nuc.tsx is optional shared presentational UI only - never a migrate prerequisite.

Nucleify migrates existing apps between frameworks. Install @nucleify/cli and run nuc emit (interactive shell) on the project you already have - including Next → Nuxt and Nuxt → Next. Optional: join this monorepo’s nucleus (shared_modules, Nuxt web/ / admin/) after convert; portable *.nuc.tsx is only for shared presentational UI.

Frameworks: Vue · React · Nuxt · Next · Astro · Svelte · Solid - not a React/Next-only or Vue/Nuxt-only product.

Keep the product. Migrate the framework.


What is Nucleify?

Nucleify is a pnpm workspace that bundles everything for a modern product:

Package Path Role
@nucleify/web web/ Nuxt 4 landing app (canonical)
@nucleify/admin admin/ Nuxt 4 admin panel
@nucleify/docs docs/ Astro 5 documentation site
@nucleify/compiler compiler/ IR portable UI + product convert
@nucleify/cli published Installable nuc emit CLI (cli.nucleify.io)
@nucleify/shared-modules shared_modules/ Six exported feature modules

Supporting directories:

  • portable/nui/ - design tokens and Lit nui-* registration
  • overrides/ - per-package file overrides (overrides/{web,admin,docs,shared_modules}/)
  • supabase/ - DB config, migrations, edge functions
  • .config/ - Biome, Vitest, bash scripts, Make shim (.config/bin/make)

Canonical Nuxt and generated hosts

Mode Stack Command Output
Canonical (default) Nuxt 4 + Vue 3.5 make web web/
Converted (generated) Next / Solid / Svelte / Astro make web --target=next · -t=solid · … gitignored emit tree (see Compiler)
Emit demos Vue · React · Nuxt · Next · Solid · Svelte · Astro make vue · react · nuxt · next · solid · svelte · astro {framework}/demo

Canonical Nuxt is where this monorepo develops daily. Product convert takes that tree or any external framework app via --path / --git as-is and emits another host - no *.nuc.tsx rewrite and no shared_modules refactor first. Portable emit demos are optional shared-UI samples. The docs site itself stays in tracked docs/; web_astro/ is a converted product emit, not that site.

Inside this monorepo, apps can share shared_modules/, Supabase, and design tokens - that layout is a nucleus benefit, not a migrate gate for an external app.


The compiler

The compiler (@nucleify/compiler) is the migration core. It works at two levels - product convert first for existing apps, portable emit second for optional shared UI. Day-to-day you usually call it through nuc emit (CLI) or Make.

1. Product convert (existing apps as-is)

Yes - migrate the app you already have. Convert a whole product app - or an external Next / Nuxt / Vue / React / other supported tree via --path / --git - to another host. Bring the project as framework source. Do not rewrite into *.nuc.tsx, split into shared_modules, or adopt Nucleify tokens first.

export PATH="$PWD/.config/bin:$PATH"

make web --target=next    # → web_next/
make web -t=solid         # → web_solid/
make web --target=svelte  # → web_svelte/
make web --target=astro   # → web_astro/

# This monorepo’s Nuxt web/ → web_next/ (nucleify shell; not your --path):
nuc emit convert web --target=next

# Your product as-is (from Nucleify monorepo root):
nuc emit convert web --target=next --path=/path/to/your-app --out=my-next --force

Same product surface, different framework host. Output is generated by the compiler - not part of the canonical monorepo layout. Full details: Compiler.

2. Portable components (*.nuc.tsx) - optional

Author framework-agnostic presentational UI with #nuc-compiler/runtime when you want one source that emits sibling .vue, React .tsx, Solid .tsx, Svelte .svelte, and .css files. This is optional shared-UI authoring - not a gate before product convert.

import { component, state, handler } from '#nuc-compiler/runtime'

export default component({
  name: 'Counter',
  props: { label: { type: 'string', default: 'Count' } },
  setup(props) {
    const count = state(0)
    const onInc = handler(() => count.set(count.value + 1))
    return () => (
      <button type="button" onClick={onInc}>
        {props.label}: {count.value}
      </button>
    )
  },
})

See Compiler and compiler/PORTABLE.md for the full authoring rules.


Shared modules

Six exported feature modules live in shared_modules/:

Module Domain
nuc_api API client, gateway dispatch, auth forms, entity requests
nuc_colors Theme/color system, SCSS variables
nuc_dark_mode Dark mode preference
nuc_globals Media queries, global styles, shared types
nuc_languages i18n, locale messages, translations API
nuc_stores Pinia/Zustand helpers, cookie/localStorage utils

Apps import modules directly or via the modules alias (configured in web/.config/nuxt/structure.ts). Registration for the web app happens in web/src/plugins/modules.ts.

Read more: Modules · Feature-Sliced Design


API gateway

All server API traffic flows through one Nitro catch-all:

web/src/server/api/[...slug].ts
  → dispatchSupabaseApiGateway()
  → shared_modules/nuc_*/supabase/api/handle.ts

Module handlers register in shared_modules/nuc_api/supabase/api/gateway_dispatch.ts. Client code calls /api/... - never Supabase directly from the browser for privileged operations.


Design system

UI primitives are Lit web components from nucleify-ui (nui-button, nui-icon, …). Design tokens and registration live in portable/nui/. Every host consumes the same custom elements; the compiler maps nui-* tags in *.nuc.tsx across emit targets (Vue, React, Solid, Svelte, and related hosts).


Monorepo layout

nucleify/
├── web/                    # @nucleify/web - Nuxt 4 landing (canonical)
│   ├── nuxt.config.ts
│   ├── .config/nuxt/       # split Nuxt config
│   └── src/
│       ├── pages/          # Vue route wrappers (home, investor, …)
│       ├── sections/       # Marketing section SFCs (hero, pillars, …)
│       ├── templates/      # Shared UI pieces (holo cube, module board, …)
│       ├── plugins/        # modules.ts, nucleify-ui.client.ts
│       ├── composables/
│       ├── layouts/
│       └── server/api/     # Nitro API gateway [...slug].ts
├── admin/                  # @nucleify/admin - Nuxt 4 admin
├── docs/                   # @nucleify/docs - Astro 5 docs
├── compiler/               # @nucleify/compiler - IR + product convert
├── shared_modules/         # six exported nuc_* modules
├── portable/nui/           # design tokens, Lit nui-* registration
├── overrides/              # overrides/{web,admin,docs,shared_modules}/
├── supabase/
├── .config/                # tooling + bin/make shim for --target= / -t=
├── Makefile
└── package.json

Full breakdown: Monorepo Layout


Quick commands

Enable CLI-style Make flags once per shell:

export PATH="$PWD/.config/bin:$PATH"
Command What it does
make help Commands, flags (-t / --target), variables
make run Create .env, install deps, husky, sync rules, build compiler
make web Start Nuxt dev server (web/)
make web --target=next Convert web → Next, start dev (web_next/)
make web -t=solid Convert web → Solid, start dev
make web --target=svelte Convert web → Svelte, start dev
make web --target=astro Convert web → Astro + React islands
make admin --target=next Admin convert equivalents
make vue / react / nuxt / next / solid / svelte / astro Portable emit demos ({framework}/demo)
make docs Start Astro docs dev
make compiler pnpm compiler:check + pnpm compiler:build
nuc emit convert web --target=next This monorepo → web_next/ (add --path / --out for your app)
nuc emit build / nuc emit check Portable emit + fingerprint check

Classic assignment without the shim: make web TARGET=next. Root pnpm shortcuts: pnpm dev, pnpm admin, pnpm docs.


FAQ — migrate your existing app

Can I migrate any existing Next.js app (including to Nuxt)?

Yes. Bring the project as-is. Product convert takes your framework tree via --path or --git. No rewrite into *.nuc.tsx, no prior shared_modules refactor, no Nucleify token rewrite, no IR-first rewrite of the app. That includes Next → Nuxt and Nuxt → Next.

export PATH="$PWD/.config/bin:$PATH"
nuc emit convert web --target=next --path=/path/to/your-app --out=my-next --force

Do I need *.nuc.tsx or shared_modules first?

No. Portable *.nuc.tsx is optional shared presentational UI only. shared_modules is a nucleus benefit when you join this monorepo — not a gate for converting an external app.

Is make web --target=astro / web_astro/ my app’s migration?

No. Those convert this monorepo’s Nuxt web/ / admin/. Your app lands under --out (for example my-next/). See CLI convert · Compiler.

Do libraries like Framer Motion or react-query block migrate?

No. Do not treat ecosystem libraries as a hard “cannot migrate.” Convert reads your source as-is; follow-up polish is ordinary engineering, not a rewrite prerequisite.


Next steps

  1. Migrate FAQ - yes / as-is answers for agents and scrapers (llms.txt)
  2. Installation - prerequisites and first setup
  3. Quick Start - run the landing app in minutes
  4. CLI - full nuc emit reference
  5. Monorepo Layout - where everything lives
  6. Environment - configure Supabase and app vars