{"id":13451949,"url":"https://github.com/bitovi/velocirender","last_synced_at":"2025-08-22T05:32:19.399Z","repository":{"id":136982340,"uuid":"162190696","full_name":"bitovi/velocirender","owner":"bitovi","description":"Accelerated server-side rendering.","archived":false,"fork":false,"pushed_at":"2019-02-11T18:02:49.000Z","size":237,"stargazers_count":127,"open_issues_count":8,"forks_count":5,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-08-08T14:11:22.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bitovi.github.io/velocirender/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitovi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-12-17T21:14:51.000Z","updated_at":"2025-02-12T20:52:27.000Z","dependencies_parsed_at":"2023-03-22T12:17:41.491Z","dependency_job_id":null,"html_url":"https://github.com/bitovi/velocirender","commit_stats":null,"previous_names":["bitovi/incremental"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/bitovi/velocirender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fvelocirender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fvelocirender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fvelocirender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fvelocirender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitovi","download_url":"https://codeload.github.com/bitovi/velocirender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitovi%2Fvelocirender/sbom","scorecard":{"id":240521,"data":{"date":"2025-08-11","repo":{"name":"github.com/bitovi/velocirender","commit":"537f2a0708caea91e62c2c6a5fbe97ace9e186fa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 3/19 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: non-200 OK status code: 502 Bad Gateway body: \"\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e502 Bad Gateway\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e502 Bad Gateway\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n\"","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T06:37:07.479Z","repository_id":136982340,"created_at":"2025-08-17T06:37:07.479Z","updated_at":"2025-08-17T06:37:07.479Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271590396,"owners_count":24786214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:07.949Z","updated_at":"2025-08-22T05:32:19.055Z","avatar_url":"https://github.com/bitovi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bitovi/velocirender/blob/master/LICENSE.md)\n[![npm version](https://badge.fury.io/js/%40bitovi%2Fvelocirender.svg)](https://badge.fury.io/js/%40bitovi%2Fvelocirender)\n[![Build Status](https://travis-ci.org/bitovi/velocirender.svg?branch=master)](https://travis-ci.org/bitovi/velocirender)\n\n# @bitovi/velocirender\n\nAccelerated server-side rendering.\n\n- [Install](#install)\n- [Getting Started](https://github.com/bitovi/velocirender/blob/master/docs/getting-started.md)\n- [Usage](#usage)\n  - [CLI](#cli)\n    - [Flags](#flags)\n    - [Cache considerations](#cache-considerations)\n  - [JavaScript API](#javascript-api)\n    - [Callback argument](#callback-argument)\n- [Browser Compatibility](#browser-compatibility)\n\n## Install\n\nInstall from [npm](https://www.npmjs.com/):\n\n```shell\nnpm install @bitovi/velocirender\n```\n\nOr [Yarn](https://yarnpkg.com/en/):\n\n```shell\nyarn add @bitovi/velocirender\n```\n\n## Getting Started\n\nThe [Getting Started guide](https://github.com/bitovi/velocirender/blob/master/docs/getting-started.md) goes over everything in much more depth but here is a primer.\n\nOnce you've installed Velocirender you can use the CLI to start a server and point at an HTTP(S) endpoint like so:\n\n```shell\nnode_modules/.bin/velocirender https://bitovi.github.io/dog-things-react/\n```\n\nThis will tell you to visit [http://localhost:8080](http://localhost:8080) where you see the sight load incrementally. [Continue on with the guide](https://github.com/bitovi/velocirender/blob/master/docs/getting-started.md) which walks you through what is happening and how to integrate this into your workflow.\n\n## Usage\n\n__Velocirender__ comes with CLI and JavaScript APIs.\n\n### CLI\n\nThe command-line interface is the easiest way to use __Velocirender__. Provide a path to your production HTML file and a few options, if needed. The HTML file can be a local path or a remote HTTP(S) address:\n\n__Locally__\n\n```shell\nnode_modules/.bin/velocirender build/index.html\n```\n\n__Remote__\n\n```shell\nnode_modules/.bin/velocirender https://bitovi.github.io/dog-things-react/\n```\n\n#### Flags\n\nThe following CLI flags are available for use:\n\n* __--port__: Specify the port to use, otherwise __8080__ will be used.\n* __--key__: An SSL key. This should match what is provided to [Node https](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener).\n* __--cert__: The SSL certificate. This should match what is provided to [Node https](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener).\n* __--no-cache-html__: By default Velocirender caches the HTML skeleton (everything that occurs before API requests are made). For the vast majority of apps this is fine, but if you do something weird like write a `Math.random()` into your output you might need this (file an issue to discuss first, you almost definitely don't need it).\n\n#### Cache considerations\n\nWhen running from a remote HTTP(S) address, Velocirender will download static assets and serve them from a local cache. That cache will be used until the next time the server starts, at which time they'll be re-downloaded.\n\nThis means that a deployed Velocirender server doesn't need to be redeployed when you release a new version of your front-end app; but you *will* need to restart the server.\n\n[See this issue](https://github.com/bitovi/velocirender/issues/15) for discussion on more advanced caching coming in the future.\n\n### JavaScript API\n\n__Velocirender__ takes a function that is given a *rendering context*. This includes a *document*, the *request* and *response* objects. A function is returned with a signature of `(request, response)` and can be used as [Express](https://expressjs.com/) middleware, directly with `require('http')`, etc.\n\nHere's an example that uses [http module](https://nodejs.org/api/http.html) directly:\n\n```js\nconst velocirender = require('@bitovi/velocirender');\nconst { ReactDOM, App } = require('./dist/webpack-build-whatever.js');\n\nconst handler = velocirender(({ document, request }) =\u003e {\n  let root = document.createElement('div');\n  root.setAttribute(\"id\", \"root\");\n  document.body.appendChild(root);\n  ReactDOM.render(React.createComponent(App), root);\n});\n\nrequire('http').createServer(handler).listen(8080);\n```\n\nNote the above doesn't handle serving static assets. If you are using the http module directly you probably already know how to handle this, but most will likely want to use a framework like [Express](https://expressjs.com/). Here's an example that does so:\n\n```js\nconst velocirender = require('@bitovi/velocirender');\nconst { ReactDOM, App } = require('./dist/webpack-build-whatever.js');\nconst express = require('express');\nconst app = express();\n\n// Add any normal Express middlware you use here.\napp.use(express.static(__dirname + '/build', { index: false }));\n\n// Add this last.\napp.use(velocirender(({ document, request }) =\u003e {\n  let root = document.createElement('div');\n  root.setAttribute(\"id\", \"root\");\n  document.body.appendChild(root);\n  ReactDOM.render(React.createElement(App), root);\n}));\n\napp.listen(8080);\n```\n\n\u003e *Note* that `{ index: false }` is provided to `express.static`. This disables [serving the index.html](https://expressjs.com/en/resources/middleware/serve-static.html#index) file for routes like `/`. This is disabled in this example because __Velocirender__ will handle those routes.\n\n#### Callback argument\n\n__Velocirender__ takes a handler function as its only argument. That function receives a context object that contains the following properties:\n\n* __request__: The [request](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object from the HTTP request.\n* __response__: The [response](https://nodejs.org/api/http.html#http_class_http_serverresponse) object from the request. Note that can set headers on this response, but you won't want to call `.write()` or `.end()` as Velocirender calls those itself.\n* __document__: A [document](https://developer.mozilla.org/en-US/docs/Web/API/Document) that is scoped to this request. You can modify this document just as you would in a browser. Typically you'll want to create a root element to render your application onto. This document is backed by [jsdom](https://github.com/jsdom/jsdom).\n* __window__: A [window](https://developer.mozilla.org/en-US/docs/Web/API/Window) object. This contains many (but not all) of the properties that are seen in a browser window.\n\n\n#### velocirender.serve()\n\nA second API works like the CLI. Give it a path or URL and options that match the CLI's options. It will create a server for the app.\n\n```js\nconst velocirender = require('@bitovi/velocirender');\n\nconst server = velocirender.serve('https://bitovi.github.io/dog-things-react/', {\n  port: 8089\n});\n```\n\nThe second argument options should match the available [CLI flags](#flags).\n\n## Browser Compatibility\n\n__Velocirender__ utilizes recent additions to the browser specs such as [preload](https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content), [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), and [ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).\n\nAs of today Velocirender rendering is possible in Chrome and Safari \u003e=12.\n\nIn browsers that don't support these technology Velocirender will fallback to the traditional SSR method of waiting for a fully rendered page. We call these separate ___strategies___:\n\n* __incremental__ strategy is for modern browsers with streaming capabilities.\n* __legacy__ strategy is for older browsers.\n\n## Changelog\n\nSee the [latest releases on GitHub](https://github.com/bitovi/velocirender/releases).\n\n## License\n\n[MIT](https://github.com/bitovi/velocirender/blob/master/license.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitovi%2Fvelocirender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitovi%2Fvelocirender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitovi%2Fvelocirender/lists"}