Skills

Standalone Micro Apps

Builds standalone micro apps with SSR, Workers, CDN, SEO and gateway routes.

Install

npx skills add lobehub/lobehub --skill split-micro-app -g -a claude-code -y
Repository
lobehub/lobehub83.7k
Category
Engineering
Updated
3d ago
License
See repository
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Use for standalone micro apps: React Router SSR/SSG, Cloud overlays, Workers, CDN/R2, SEO/OG, gateway routes, previews, Docker integration and SSR bundle isolation.

Micro App: Split, SSR, SEO, Gateway

Canonical living examples, both extracted 2026-08, read the real files, this skill records the decisions and landmines, not copies of the code:

  • apps/workbench (/acceptance, /agent/:aid/docs/:docId; /verify only redirects retired report links into Acceptance), all code in this repo, builds and deploys from OSS CI.
  • apps/share (/share/t/:id, /share/page/:id), renders Cloud-only surfaces, so it builds and deploys from lobehub-cloud CI. See §1b before touching it.
  • apps/auth (/signin, /signup, …), the SSG variant: ssr: false + prerender, so the worker carries no React at all (7KB). 18 locales x 4 routes of prerendered documents. Also renders Cloud-only surfaces (§1b). See §3b.

Hosting

One app, two serve paths. Do not mix them.

SurfaceWho serves itBuild
CloudGateway (torii) → Worker (SSR)Cloud Next does not build:spa:<name>, copy _spa-<name>, rewrite to /spa-<name>, or CDN-upload that prefix
OSS / 子部署 DockerNext in the same image, client-renderedbuild:docker runs build:spa:<name>; <NAME>_REQUIRED=1 on generateSpaTemplates; Dockerfile copies apps/<name>/package.json before pnpm i and public/_spa-<name> into the runtime image
Read the whole SKILL.md on GitHub

More in Engineering