Minimal, project-agnostic tooling package built around Tailwind and Webpack. Drop it into a React project and get profile-based dev/build scripts, hydrated SSG, and AI-ready page context without rebuilding your tooling stack from scratch.
- 🚀 One package gives you dev server, production builds, SSG, and AI output
- 🧩 Package-owned defaults keep projects clean and override-friendly
- ⚡ React hydration, code splitting, and standard SPA patterns work out of the box
- 🧠 AI-readable Markdown output helps with SEO, AEO, content workflows, and agent ingestion
- 🛠️ Route-aware static export works without turning the whole project into a framework migration
| Experience | What You Get | Command |
|---|---|---|
SPA |
Dev server and production client bundle | nbs-root dev:development / nbs-root build:production |
SSG |
Static HTML output with client hydration | nbs-root build-ssg:production |
AI Optimized SEO / AEO |
AI-readable Markdown with page text, headings, metadata, and rendered markup | nbs-root build-ai:production |
| Capability | Included |
|---|---|
Hydration with hydrateRoot fallback |
✅ |
| Standard SPA flow | ✅ |
| Route-aware SSG | ✅ |
| AI-ready site context generation | ✅ |
| Webpack code splitting | ✅ |
| Tailwind-ready CSS pipeline | ✅ |
| Babel + ESLint + PostCSS defaults | ✅ |
| Project-level overrides when needed | ✅ |
For an existing React project:
npm i @ekv88/nbs-rootMinimal project shape:
my-site/
.env-cmdrc
src/
App.js
index.css
assets/
Example scripts:
{
"scripts": {
"start": "nbs-root dev:development",
"build:prod": "nbs-root build:production",
"build:staging": "nbs-root build:staging",
"build-ssg:prod": "nbs-root build-ssg:production",
"build-ai:prod": "nbs-root build-ai:production",
"lint": "nbs-root lint"
}
}By default, the only required project-level config is .env-cmdrc. The package provides defaults for Babel, ESLint, PostCSS, a Tailwind-ready CSS pipeline, the HTML template, and the runtime entry. If a project adds its own config or bootstrap files, those override the defaults.
- Produces the client app in
dist/ - Emits JS to
dist/js/and CSS todist/css/ - Keeps
index.html,asset-manifest.json, and copied assets at thedist/root
- Pre-renders static HTML
- Reuses the client bundle for hydration
- Supports multi-route output through
src/App.ssg.js
- Writes AI-readable Markdown into
dist/ai/ - Includes visible text, headings, metadata, and markup snapshots
- Useful for AI SEO / AEO workflows and downstream tooling
src/index.jsorsrc/index.jsxsrc/index.ejssrc/App.ssg.jsorsrc/App.static.jsorsrc/App.server.jsbabel.config.*eslint.config.*postcss.config.*tailwind.config.*
Env-based path overrides are also available, including NBS_PROJECT_ROOT, NBS_APP_MODULE, NBS_STATIC_APP_MODULE, NBS_HTML_TEMPLATE, and NBS_OUTPUT_DIR.
If a project wants multi-route static export, it can provide src/App.ssg.js and export:
export function createStaticApp(route) {
return <AppForRoute route={route} />;
}
export function getStaticRoutes() {
return ["/", "/about", "/guides/ssg"];
}If no static module is present, nbs-root falls back to the normal app module and renders a single root page.
This repo contains the package plus a local test project used to verify it before publishing.
npm run dev:testnpm run build:test:prodnpm run build:test:stagingnpm run build-ssg:test:prodnpm run build-ai:test:prodnpm run lint:testnpm run pack:root
- npm: https://www.npmjs.com/package/@ekv88/nbs-root
- GitHub: https://github.com/ekv88/nbs-root
- Package-focused docs:
packages/nbs-root/README.md
