{"id":38497941,"url":"https://github.com/rdkcentral/mock-firebolt","last_synced_at":"2026-01-17T05:56:42.670Z","repository":{"id":37480645,"uuid":"454360869","full_name":"rdkcentral/mock-firebolt","owner":"rdkcentral","description":"An advanced, controllable mock Firebolt OS implementation, which can also act as a reverse proxy to a real Firebolt OS running on a real device","archived":false,"fork":false,"pushed_at":"2026-01-14T14:34:42.000Z","size":2272,"stargazers_count":4,"open_issues_count":10,"forks_count":24,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-14T18:12:59.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdkcentral.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-01T11:26:42.000Z","updated_at":"2026-01-14T14:34:47.000Z","dependencies_parsed_at":"2023-02-19T07:15:33.021Z","dependency_job_id":"75e6e47e-cbf0-44e5-b22d-a093ea34f8df","html_url":"https://github.com/rdkcentral/mock-firebolt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rdkcentral/mock-firebolt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdkcentral%2Fmock-firebolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdkcentral%2Fmock-firebolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdkcentral%2Fmock-firebolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdkcentral%2Fmock-firebolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdkcentral","download_url":"https://codeload.github.com/rdkcentral/mock-firebolt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdkcentral%2Fmock-firebolt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28501349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-17T05:56:41.785Z","updated_at":"2026-01-17T05:56:42.662Z","avatar_url":"https://github.com/rdkcentral.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mock Firebolt\n=============\n\nMock Firebolt allows an app developer creating a Firebolt-compliant app to \"artificially\" cause calls to the Firebolt SDK(s) to return different responses than those returned by a real Firebolt running on whatever device(s) they may have.\n\nThis might be used, for example:\n\n- by a developer who only has a STB to get Firebolt to answer as if it is a TV (or vice versa)\n- to test variations of accessibility settings, advertising settings, etc.\n- to test how the app responds to errors from the Firebolt SDK\n- to test slow responses from the Firebolt SDK, etc.\n\nFUTURE: Can act as a reverse proxy to a real Firebolt running on a real device.\n\n\n# Goals:\n- Enable app developers to be productive without needing a real device for as long as possible\n- Enable app developers to force various responses from Firebolt to test an app \"on\" multiple devices, test edge cases, and simulate errors\n\n(NOTE: The standard SDK has static mocks built in but it is *not* controllable or extensible.)\n\nNote, too, that since the SDK does not validate parameters on method calls, app developers can also use Mock Firebolt as a way to validate that their invocations of Firebolt methods are correct.\n\n# Features\n- Controllable Mock Firebolt server (NodeJS websocket + HTTP server)\n- Control mock method responses via control plane RESTful API, CLI, web admin UI (soon), browser extension (soon)\n- 100% OpenRPC-driven; no SDK-specific details within the implementation\n- Supports Firebolt SDKs: **core** \u0026  **manage**\n- Complete documentation\n- Docker support\n- Validation (based on OpenRPC specifications) of all parameters sent on method calls\n- Validation (based on OpenRPC specifications) of all mock method override values\n- Set multiple method overrides at once\n- Command-line interface; especially helpful for loading all method overrides in a JSON or YAML file all at once (\"import\")\n- CLI support for both JSON and YAML files\n- Specify a method's response as either a non-error result or as an error\n- Specify a method's response as a JavaScript function, which receives parameters passed to method call\n- Share state between functions used to specify method responses\n- Specify a sequence of responses (fail once, succeed once, etc.)\n- Send events to the Firebolt SDK via the control plane (RESTful API, CLI, etc.)\n- Send an event to multiple apps via the control plane (RESTful API, CLI, etc.)\n- Send a timed sequence of events to the Firebolt SDK via the control plane (soon)\n- Import/export for loading/saving mock response values \n- Magic date/time variable support (e.g., {{+1h|x}}, {{20:00|YYYY-MM-DD HH:mm:ssZ}})\n- Set response latency per-method or globally\n- Multi-user support (using paths on websocket URLs)\n- Web admin UI to set mock responses (soon)\n- Browser extension to send Firebolt lifecycle events\n- Browser extension to set mock responses (some day)\n\n# Architecture:\n\n![Architecture Diagram](./docs/images/MockFireboltArchitecture.png)\n\n\n# Repo Contents\n\nThis repo contains these elements:\n\n- **docs/**\n  - [Documentation](./docs/Documentation.md)\n- **server/**\n  - A NodeJS server that acts as a mock Firebolt server\n    - Responds to Firebolt SDK requests and sends events to the Firebolt SDK via the socket transport layer\n    - Presents a RESTful interface for control tools (CLI, browser extensions, web admin app) to use\n    - Presents an Express-based web administrative app, which can be used to affect the behavior of the mock Firebolt server\n      - NOTE: **THE WEB ADMIN APP IS NOT FINISHED YET**.\n- **cli/**\n  - A command-line interface which can be used to affect the behavior of the mock Firebolt server\n- **browser-extensions/**\n  - Browser extensions which can be used to affect the behavior of the mock Firebolt server\n\n\n# Documentation\n\nSee [Documentation](./docs/Documentation.md).\n\n\n# SDK Support and the server/src/.mf.config.json File\n\nMock Firebolt is a very generic mocking service for almost *any* OpenRPC-based service. The list of particular SDKs the server supports when you run it is controlled by the contents of the `server/src/.mf.config.json` file and any associated command-line flags you provide when you start the server.\n\nThe repo contains a `server/src/.mf.config.SAMPLE.json` file and you'll need to copy this file to `server/src/.mf.config.json` in order for the server to start. Once you've done this, you're free to edit your `server/src/.mf.config.json` file and add other SDKs if you'd like. If the OpenRPC JSON file for your API is somewhere in the cloud or otherwise available via HTTP, you should use the `url` property for the SDK in this file rather than the `fileName` property (which is only used for SDKs for which there is a \"hard dependency\" in the `server/package.json` file).\n\nThe next two sections presume you are using the out-of-the-box `.mf.config.json` file.\n\n\n# Firebolt SDK Support\n\nMock Firebolt supports these Firebolt SDKs: **core** \u0026 **manage**.\n\n# $badger Support\n\nMock Firebolt also supports the $badger SDK for application developers migrating from $badger to Firebolt.\n\nDevelopers wishing to activate this functionality must pass the `--moneybadger` command-line flag when starting Mock Firebolt. As well, you must use the `activateMockFireboltForBadger.js` script within your app and have it execute *before* your app bundle (which includes $badger) executes.\n\n# Usage (Local)\n\nNote: Requires NodeJS 16+. If you're using `nvm`, do `nvm use 16` or similar.\n\nTo install and run:\n\n```\ncd \u003cthe place you put your code repos\u003e\ngit clone https://github.com/rdkcentral/mock-firebolt.git            /* THIS REPO */\ncd mock-firebolt\n\n# To start the mock Firebolt server (if running locally)\ncd server\n\n# One-time stuff\n\ncp src/.mf.config.SAMPLE.json src/.mf.config.json\n\n# To install dependencies, clean/create build/ subdirectory, build and upgrade SDK, build source code within this project\nnpm install\n\n# If you want support for Firebolt Core/Manage SDK\n# Run in a separate terminal window/tab, or use '\u0026' to background\nnpm start\n\n# If you need to use non-standard ports for any reason:\nnpm start -- --httpPort 3456 --socketPort 9876 --wsSessionServerPort 1234\n\n#If you wish to enable conduit functionality*\nnpm start -- --conduit\n\n*Note*: Requires Conduit to be running. See the Conduit documentation (./conduit/README.md) for more information.\n\n# If you need to use proxy connection for any reason:\nnpm start -- --proxy \u003cip\u003e:\u003cport\u003e\nRefer more about proxy mode in ./docs/ProxyMode.md\n\n# To use the control CLI (assuming you're in the top-level directory for this repo)\ncd cli\nnpm install\ncd src\nnode cli.mjs --help\n\n# FUTURE: To use the Chrome browser plugin\nVisit chrome://extensions in Chrome\nEnsure \"Developer mode\" is turned on (slider to the right in the top right corner of your browser window)\nClick the \"Load Unpacked\" button (top left corner of browser window)\nNavigate to the directory under browser-extensions which contains a manifest.json file and click \"Select\"\n```\n\nNow you can access core/manage OpenRPC from HTTP by adding `\"url\": \"https://rdkcentral.github.io/firebolt/requirements/latest/specifications/firebolt-open-rpc.json\"` in `mf.config.SAMPLE.json` and copying to `mf.config.json`. \n\n# Usage (via Docker, if you prefer)\n\nNOTE: These instructions currently involve creating a docker image locally rather than downloading one from an image repository.\n\n```\nexport MF_DOCKER_USER=\u003cyourDockerUsername\u003e\n\ncd \u003ctop of repo\u003e\n\n# Create a docker image: Use the appropriate command (most 3rd party app devs should use the first command)\ndocker build -f Dockerfile.coreSdk . -t $MF_DOCKER_USER/mock-firebolt\ndocker build -f Dockerfile.allSdks . -t $MF_DOCKER_USER/mock-firebolt\n\n# Confirm your image was created\ndocker images | grep mock-firebolt\n\n# Run the image, enabling the core/manage OpenRPC (typical)\n# Change '$(pwd)' to whatever else you might want to use; this is where your MF .json files live\n# NOTE: -p \u003coutside/host port\u003e:\u003cinside/container port\u003e\ndocker run -d \\\n  --name mf \\\n  --mount type=bind,source=\"$(pwd)\",target=/usr/src/firebolt/host-files \\\n  -p 3333:3333 \\\n  -p 9998:9998 \\\n  $MF_DOCKER_USER/mock-firebolt\n\n# Get container ID\ndocker ps | grep mf\n\n# See logs\ndocker logs mf\n\n# Enter the container (if necessary/desired)\ndocker exec -it mf /bin/bash\n\n# Run CLI commands from inside the container (if necessary/desired)\ncontainer\u003e cd /usr/src/firebolt/mock-firebolt/cli/src\ncontainer\u003e node cli.mjs --help\n\n# Run CLI\n# Note the container path for the volume used when running the image is used here to refer to MF .json files\ndocker exec -it mf mf.sh --help\ndocker exec -it mf mf.sh --upload /usr/src/firebolt/host-files/\u003cfile relative current directory\u003e\n# E.g., docker exec -it mf mf.sh --upload /usr/src/firebolt/host-files/cli/examples/account-1.json\n\n# Cleanup when done\ndocker stop mf\ndocker rm mf\ndocker image rm $MF_DOCKER_USER/mock-firebolt     (If you want to remove the image, too)\n```\n\n\n# Known Issues\n\nSee [Known Issues](./docs/KnownIssues.md).\n\n\n# Contributing\nIf you would like to contribute code to this project you can do so through GitHub by forking the repository and sending a pull request.\n\nBefore RDK accepts your code into the project you must sign the RDK Contributor License Agreement (CLA).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdkcentral%2Fmock-firebolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdkcentral%2Fmock-firebolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdkcentral%2Fmock-firebolt/lists"}