Skip to content
Back to search

lomray

MarketplaceWorks with Claude CodeGitHub

Super easy, based on Vite for create awesome SSR or SPA applications on React and React Router.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lomray-software--vite-ssr-boost/badge.svg)](/listings/lomray-software--vite-ssr-boost)

HTML

<a href="/listings/lomray-software--vite-ssr-boost"><img src="/api/listings/lomray-software--vite-ssr-boost/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Add to an existing app:**

npm i @lomray/vite-ssr-boost
npx ssr-boost init --dry-run
npx ssr-boost init --apply
npm install
npx ssr-boost doctor

`@lomray/vite-ssr-boost` adds server rendering to your Vite project while keeping your route objects and components. Build SSR and SPA output from the same app, and choose a managed Express server or a Fetch handler for your own transport.

The [migration guide](./docs/guide/migrate-existing-spa.md) walks through the five-file change:

| File | Change | | ---------------- | ---------------------------------------------------- | | `vite.config.ts` | Add `SsrBoost()` to the plugins. | | `src/index.html` | Add the SSR outlet inside the root element. | | `src/client.ts` | Use the browser entry for hydration or SPA mounting. | | `src/server.ts` | Add the server entry and request-scoped setup. | | `package.json` | Use the `ssr-boost` dev, build and start commands. |

**Start a new app** with the `minimal` template (default):

npm create @lomray/ssr-app@latest my-app

Choose the `full` template by passing the flag after `--`:

npm create @lomray/ssr-app@latest my-app -- --template full

Starting a new app? Choose one of the [template branches](./docs/examples/index.md) with the [`npm create` command](./docs/guide/getting-started.md#create-a-new-app) or clone the branch directly.

To defer loader work, return `{ title, slow: fetchUsers() }` and render `slow` with Suspense and `<Await>`; see the [streaming guide](./docs/guide/data-streaming.md).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 16 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "lomray",
  3. "owner": {
  4. "name": "Lomray Software"
  5. },
  6. "plugins": [
  7. {
  8. "name": "ssr-boost",
  9. "source": "./",
  10. "description": "Migrate a Vite SPA or create a new SSR Boost application."
  11. }
  12. ],
  13. "metadata": {
  14. "description": "Agent skills for Vite SSR Boost applications."
  15. }
  16. }
README.md · README · 195 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Vite SSR BOOST
  2. <p align="center"><img src="https://raw.githubusercontent.com/Lomray-Software/vite-ssr-boost/prod/logo.png" alt="Vite SSR BOOST logo" width="250" height="250"></p>
  3. <p align="center">SSR for React Router apps in <a href="https://reactrouter.com/start/modes">Data mode</a>, without moving to Framework mode and without rewriting the app.</p>
  4. <p align="center">
  5. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=reliability_rating" alt="Reliability Rating"></a>
  6. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=security_rating" alt="Security Rating"></a>
  7. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=sqale_rating" alt="Maintainability Rating"></a>
  8. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=vulnerabilities" alt="Vulnerabilities"></a>
  9. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=bugs" alt="Bugs"></a>
  10. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=ncloc" alt="Lines of Code"></a>
  11. <a href="https://sonarcloud.io/dashboard?id=vite-ssr-boost"><img src="https://sonarcloud.io/api/project_badges/measure?project=vite-ssr-boost&amp;metric=coverage" alt="Code Coverage"></a>
  12. <a href="https://www.npmjs.com/package/@lomray/vite-ssr-boost"><img src="https://img.shields.io/npm/v/@lomray/vite-ssr-boost?label=semantic%20release&amp;logo=semantic-release" alt="npm version"></a>
  13. <a href="https://www.npmjs.com/package/@lomray/vite-ssr-boost"><img src="https://img.shields.io/npm/dm/@lomray/vite-ssr-boost" alt="npm monthly downloads"></a>
  14. <a href="./LICENSE"><img src="https://img.shields.io/npm/l/@lomray/vite-ssr-boost" alt="MIT License"></a>
  15. <a href="https://www.npmjs.com/package/@lomray/vite-ssr-boost"><img src="https://img.shields.io/node/v/@lomray/vite-ssr-boost" alt="Node version requirement"></a>
  16. </p>
  17. ## Quick start
  18. **Add to an existing app:**
  19. ```bash
  20. npm i @lomray/vite-ssr-boost
  21. npx ssr-boost init --dry-run
  22. npx ssr-boost init --apply
  23. npm install
  24. npx ssr-boost doctor
  25. ```
  26. `@lomray/vite-ssr-boost` adds server rendering to your Vite project while keeping your route objects and components. Build SSR and SPA output from the same app, and choose a managed Express server or a Fetch handler for your own transport.
  27. The [migration guide](./docs/guide/migrate-existing-spa.md) walks through the five-file change:
  28. | File | Change |
  29. | ---------------- | ---------------------------------------------------- |
  30. | `vite.config.ts` | Add `SsrBoost()` to the plugins. |
  31. | `src/index.html` | Add the SSR outlet inside the root element. |
  32. | `src/client.ts` | Use the browser entry for hydration or SPA mounting. |
  33. | `src/server.ts` | Add the server entry and request-scoped setup. |
  34. | `package.json` | Use the `ssr-boost` dev, build and start commands. |
  35. **Start a new app** with the `minimal` template (default):
  36. ```bash
  37. npm create @lomray/ssr-app@latest my-app
  38. ```
  39. Choose the `full` template by passing the flag after `--`:
  40. ```bash
  41. npm create @lomray/ssr-app@latest my-app -- --template full
  42. ```
  43. Starting a new app? Choose one of the [template branches](./docs/examples/index.md) with the [`npm create` command](./docs/guide/getting-started.md#create-a-new-app) or clone the branch directly.
  44. To defer loader work, return `{ title, slow: fetchUsers() }` and render `slow` with Suspense and `<Await>`; see the [streaming guide](./docs/guide/data-streaming.md).
  45. ## Who this is for
  46. - Teams adding SSR to a Vite SPA with React Router route objects.
  47. - Teams that need server rendering and SPA output from one application.
  48. - Teams that want to control request hooks, response headers and deployment.
  49. ## What you keep
  50. - Your Vite configuration and plugins, with the SSR plugin added.
  51. - Your React Router route objects.
  52. - Your components, after removing browser globals from server execution.
  53. - Your React version within the package's peer range: React and React DOM `>=18.2.0`.
  54. - Your hosting choice, provided it can run the selected SSR transport or serve SPA files.
  55. Loader and action promises support `<Await>` and React 19 `use()` during hydration by default. [Stream loader data](./docs/guide/data-streaming.md) shows the loader pattern and `hydration: 'early'` for shell interaction before slow boundaries finish.
  56. ## What you add
  57. Add `SsrBoost()` to the Vite plugins, wire `client.ts` and `server.ts`, and replace the Vite scripts with `ssr-boost` commands. The [migration guide](./docs/guide/migrate-existing-spa.md) includes these entries and the HTML outlet, copied from the minimal example.
  58. Deferred router data needs no additional state library. Keep footer hydration by default, or opt into early hydration with custom state available at `onShellReady`.
  59. ## Choose your server
  60. **Managed CLI (default).** Use `ssr-boost dev` for Express with Vite development and HMR, then `ssr-boost build` and `ssr-boost start` for production assets and SSR. The server entry is `@lomray/vite-ssr-boost/adapters/express/entry`, with hooks for requests, rendering and responses.
  61. **Request protection.** The default-on [request guard](./docs/api/request-guard.md) validates document methods and targets before hooks, with configurable 404 modes and optional SSR concurrency limits.
  62. **Fetch handler.** Import `createHandler` from `@lomray/vite-ssr-boost/core/handler` and connect it through `adapters/node`, `adapters/express`, `adapters/fastify`, `adapters/hono` or `adapters/edge`. Your transport owns the development server, static assets and route-asset injection; follow [Runtime adapters](./docs/guide/runtime-adapters.md) when you need this control.
  63. Both paths are measured weekly in the public [ssr-benchmarks](https://github.com/Lomray-Software/ssr-benchmarks) repository: the same application on vite-ssr-boost, React Router Framework mode, Vike, TanStack Start and Next.js, and a runtime matrix that serves the boost build through Express, `node:http`, Fastify, Hono and Bun. See [Benchmarks](./docs/reference/benchmarks.md) for what is measured and how to reproduce it.
  64. ## Not a fit when
  65. - You need an implementation of React Server Components and Server Actions.
  66. - You want the package to impose file-system routing conventions.
  67. - You want zero server ownership for SSR.
  68. ## Install and template quick start
  69. See [Compatibility](#compatibility) for the package Node requirement. The example uses Node 22.23.2; React Router and build tools can raise the required Node version.
  70. Start with the [minimal template](https://github.com/Lomray-Software/vite-template/tree/example/minimal):
  71. ```bash
  72. npm create @lomray/ssr-app@latest my-app
  73. cd my-app
  74. npm run develop
  75. ```
  76. Or clone the template branch directly:
  77. ```bash
  78. git clone --branch example/minimal https://github.com/Lomray-Software/vite-template.git
  79. cd vite-template
  80. npm ci
  81. npm run develop
  82. ```
  83. Its six direct runtime dependencies are React, React DOM, React Router, vite-ssr-boost, `@lomray/react-head-manager` and `isbot`.
  84. For production, run `npm run build` and `npm run start:ssr`. For a SPA build, run `npm run build:spa` and `npm run start:spa`. See [Example projects](./docs/examples/index.md) for the `prod` template with state management and deployment workflows.
  85. Already running this in production? Point our [free performance audit](https://audit.lomray.com/?utm_source=github&utm_medium=readme-vite-ssr-boost&utm_campaign=owned-surface-github) at the URL. It reports Core Web Vitals, JavaScript bundle weight and whether the HTML really arrives server-rendered. No signup.
  86. ## Compatibility
  87. See the [support policy](./SUPPORT.md) for version lifetimes, response targets and breaking-change commitments, and [Upgrade from 7 to 8](./docs/guide/upgrade-v8.md) for migration instructions.
  88. The package is tested against the current and previous major of React, React Router and Vite, with an additional Vite 6 row. The [compatibility workflow](./.github/workflows/react-compatibility.yml) runs the full test suite and a built Worker check on Node 22.23.2 with these exact combinations:
  89. | React / React DOM | React Router | Vite |
  90. | ----------------- | ------------ | ------- |
  91. | `18.2.0` | `7.18.3` | `6.4.3` |
  92. | `19.2.8` | `7.18.3` | `7.3.6` |
  93. | `19.2.8` | `8.3.1` | `8.2.2` |
  94. [package.json](./package.json) declares Node `>=22.12.0` and these peer ranges:
  95. | Peer | Range |
  96. | -------------- | ---------- |
  97. | `react` | `>=18.2.0` |
  98. | `react-dom` | `>=18.2.0` |
  99. | `react-router` | `>=7.0.1` |
  100. | `vite` | `>=5` |
  101. Peer ranges allow installation; the matrix tests only the combinations above. It does not test every version in those ranges or every combination of majors.
  102. ## Examples
  103. The [example projects guide](./docs/examples/index.md) explains the wiring in each template branch.
  104. | Template branch | What it includes |
  105. | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
  106. | [`prod`](https://github.com/Lomray-Software/vite-template/tree/prod) | MobX state management, component-level data streaming, metadata and deployment workflows. |
  107. | [`example/minimal`](https://github.com/Lomray-Software/vite-template/tree/example/minimal) | Six runtime dependencies, loaders, a lazy route with CSS, redirects, 404s, metadata and a browser-only route. |
  108. | [`example/custom-server`](https://github.com/Lomray-Software/vite-template/tree/example/custom-server) | Managed CLI development and an application-owned Fastify 5 production server with static assets, compression, route assets and Early Hints. |
  109. | [`example/localization`](https://github.com/Lomray-Software/vite-template/tree/example/localization) | Per-request i18next, cookie and header language selection, and language state restored before hydration. |
  110. ## Documentation
  111. Test SSR routes without a server with `@lomray/vite-ssr-boost/testing`; see the [Vitest and Playwright guide](https://lomray-software.github.io/vite-ssr-boost/guide/testing).
  112. - [Documentation site](https://lomray-software.github.io/vite-ssr-boost/), [comparison guide](./docs/guide/choosing.md) and [FAQ](./docs/reference/faq.md).
  113. - [Hydration order and streaming](./docs/reference/hydration-and-streaming.md) and [Benchmarks](./docs/reference/benchmarks.md).
  114. - API: [Plugin](./docs/api/plugin.md), [Browser entry](./docs/api/browser-entry.md), [Server entry](./docs/api/server-entry.md), [Node production](./docs/api/node-production.md), [Components and helpers](./docs/api/components-and-helpers.md) and [CLI](./docs/api/cli.md).
  115. ## AI agents
  116. The repository includes `ssr-boost-migrate` and `ssr-boost-new-app` in the [Agent Skills format](https://agentskills.io/specification).
  117. Claude Code plugin:
  118. ```sh
  119. claude plugin marketplace add Lomray-Software/vite-ssr-boost
  120. claude plugin install ssr-boost@lomray
  121. ```
  122. Codex CLI, from this checkout:
  123. ```sh
  124. mkdir -p ~/.codex/skills
  125. cp -R skills/ssr-boost-migrate skills/ssr-boost-new-app ~/.codex/skills/
  126. # Or use the target application's .codex/skills directory.
  127. ```
  128. Current Codex versions document `.agents/skills` for discovery; use that destination or the symlinks in [AI usage and installation](./docs/ai-usage.md#ai-agents). That page also covers local Claude plugin testing before the files reach the default branch.
  129. For Cursor, copy the folders into the app's `skills/` directory and add a `.cursor/rules/ssr-boost.mdc` rule pointing to the relevant `SKILL.md`; see the [complete rule](./docs/ai-usage.md#ai-agents). Other agents can use [llms.txt](https://lomray-software.github.io/vite-ssr-boost/llms.txt) or [llms-full.txt](https://lomray-software.github.io/vite-ssr-boost/llms-full.txt).
  130. ## License
  131. Made with 💚
  132. Published under [MIT License](./LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.