一键导入
manifest-frontend
// Work with Manifest's frontend system — building, serving, dev workflow, debugging, and presets. Use when creating pages, components, debugging frontend errors, or configuring the build.
// Work with Manifest's frontend system — building, serving, dev workflow, debugging, and presets. Use when creating pages, components, debugging frontend errors, or configuring the build.
Write knowledge-transfer git commits for Manifest projects. Use when making git commits. Commits include a typed subject line and a detailed body explaining what changed, why, and how.
Contribute framework improvements back to the upstream Manifest repo via PR. Use when the user says "contribute back", "open a PR upstream", "send this fix upstream", or wants to share a framework improvement.
Structured implementation flow for Manifest features — from investigation through execution with subagents. Follows the full chain: investigate → clarify → explore → validate → plan → todos → branch → execute → review. No shortcuts. Invoke manually when building a new feature or significant change in a Manifest project.
Reflect on recent large changes and check if the rest of the codebase needs to catch up. Use after adding features, installing extensions, changing services, updating schemas, or making any significant structural change.
Resolve merge conflicts from upstream syncs or other merges. Preserves application identity while accepting framework and tooling improvements. Use when you see merge conflict markers or the user says "resolve conflicts", "fix merge", or "merge conflict".
Code review guidelines and quality rubric for Manifest projects. Covers framework conventions, feature structure, schema quality, and security. Shared by the reviewer subagent and available for manual reviews. Use when reviewing code changes.
| name | manifest-frontend |
| description | Work with Manifest's frontend system — building, serving, dev workflow, debugging, and presets. Use when creating pages, components, debugging frontend errors, or configuring the build. |
Manifest has a two-layer frontend system: a framework layer (serving + building) and preset extensions (starter kits with templates and conventions).
The framework layer lives in manifest/frontend.ts (~90 lines) and handles three things:
Bun.build() bundles frontend/ into dist/ with source maps.manifest/server.ts serves dist/ as a fallback after API routes. API routes always win./__dev/reload pushes reload events to the browser when files change.The preset extensions provide the actual frontend code and conventions. Check which one is installed:
ls extensions/ | grep manifest-frontend
| Extension | Stack | Best for |
|---|---|---|
manifest-frontend-static | HTML + Tailwind + vanilla TS | Content sites, dashboards, simple UIs |
manifest-frontend-reactive | SolidJS + Tailwind | Interactive apps, real-time UIs, client-side state |
Always read the installed extension's EXTENSION.md for preset-specific guidance (component patterns, routing, API fetching).
Tailwind v4 + Bun: Bun's bundler does NOT run the Tailwind compiler. It inlines
@import "tailwindcss"but generates zero utility classes. Both presets usebundleCss: false+ Tailwind CLI viapostBuildinconfig/frontend.ts. If Tailwind classes aren't rendering, check these two settings first.
Read config/frontend.ts before making any frontend changes:
export default {
entryPoint: 'frontend/index.ts', // or index.tsx for reactive
outputDir: 'dist',
sourceMaps: true, // always true — agents need source maps
spaFallback: true, // serves index.html for all non-file paths
devReload: true, // SSE live reload in dev mode
}
entryPoint — .ts for static preset, .tsx for reactive preset.spaFallback — When true, any path that doesn't match an API route or a file in dist/ serves index.html. Set to false for multi-page sites.One command does everything:
bun --hot index.ts
The server watches frontend/ for changes, rebuilds automatically, and triggers a browser reload via SSE. No second process needed.
Static preset: Add .html files and .ts files in frontend/. For SPA routing, handle window.location.pathname in TypeScript.
Reactive preset: Add .tsx files in frontend/. Import and compose them in App.tsx. SolidJS components are plain functions returning JSX.
Static assets (images, fonts, favicons): Put them in frontend/public/. They're copied to dist/ as-is during build.
NODE_ENV=production bun run build
Produces minified output with source maps in dist/. The dist/ directory is gitignored.
When a frontend error appears (error tracker, browser console, logs):
dist/index.js:142:18dist/index.js.map maps bundled lines back to source filesfrontend/App.tsx:28bun run buildThe browser dev tools do this mapping automatically. When debugging from server-side error reports, use the .map files manually.
If the user is on the static preset and asks for:
Suggest installing the reactive preset (manifest-frontend-reactive). Read its EXTENSION.md for install steps.
| Task | Command |
|---|---|
| Build | bun run build |
| Dev (server + watch + reload) | bun --hot index.ts |
| Production build | NODE_ENV=production bun run build |
| Check config | Read config/frontend.ts |
| Check which preset | ls extensions/ | grep manifest-frontend |