{"id":24087917,"url":"https://github.com/tinybirdco/mockingbird","last_synced_at":"2025-05-16T13:07:10.361Z","repository":{"id":151207640,"uuid":"588533919","full_name":"tinybirdco/mockingbird","owner":"tinybirdco","description":"Mockingbird is a mock streaming data generator","archived":false,"fork":false,"pushed_at":"2025-02-06T10:55:32.000Z","size":2691,"stargazers_count":118,"open_issues_count":12,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-11T20:38:18.761Z","etag":null,"topics":["data-generation","data-generator","fakerjs","generator","http","kafka","streaming-data","tinybird","typescript"],"latest_commit_sha":null,"homepage":"https://mockingbird.tinybird.co","language":"TypeScript","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/tinybirdco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-01-13T10:59:13.000Z","updated_at":"2025-05-07T12:02:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"21b40631-4db8-4edd-b654-25095c287640","html_url":"https://github.com/tinybirdco/mockingbird","commit_stats":{"total_commits":198,"total_committers":19,"mean_commits":"10.421052631578947","dds":0.6111111111111112,"last_synced_commit":"32f5fc5d9197307b561dcc356466c575cc77ade5"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fmockingbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fmockingbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fmockingbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fmockingbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinybirdco","download_url":"https://codeload.github.com/tinybirdco/mockingbird/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535829,"owners_count":22087399,"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","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":["data-generation","data-generator","fakerjs","generator","http","kafka","streaming-data","tinybird","typescript"],"created_at":"2025-01-10T03:56:02.454Z","updated_at":"2025-05-16T13:07:10.263Z","avatar_url":"https://github.com/tinybirdco.png","language":"TypeScript","readme":"![Mockingbird Logo](assets/logo/logo_white.png)\n\n# Mockingbird\n\nMockingbird is mock streaming data generator built by [Tinybird](https://tinybird.co).\n\nIt can be used as a library in other projects, or on its own via the UI or CLI.\n\nMockingbird can send data to any downstream HTTP endpoint through Destination plugins. If you don't see a Destination that you want, feel free to request it or contribute it!\n\nIf you simply want to use the Web UI, you use the hosted one here: [https://mockingbird.tinybird.co/](https://mockingbird.tinybird.co/)\n\n## Docs\n\nFind the docs at [https://mockingbird.tinybird.co/docs](https://mockingbird.tinybird.co/docs)\n\n## Usage\n\n### Web UI\n\nThe Web UI provides and easy to use, guided experience. It should be pretty easy to get started with, so give it a go!\n\nIf you need help with defining schemas, or configuring particular Destinations, you can find more complete documentation [here](https://mockingbird.tinybird.co/docs).\n\n### Passing params in the URL\n\nIf you want to re-use configurations from a previous session, you can simply save the URL. All settings are saved as parameters in the URL, so you can re-use and share configs with your team. For example: [http://localhost:3000/?schema=z_sales\u0026eps=1\u0026host=gcp_europe_west3\u0026datasource=sales_dg\u0026token=p.eyJ1IjogIjg4Nzk5NGUxLWZmNmMtNGUyMi1iZTg5LTNlYzBmNmRmMzlkZCIsICJpZCI6ICIwN2RlZThhMS0wNGMzLTQ4OTQtYmQxNi05ZTlkMmM3ZWRhMTgifQ.p_N4EETK7dbxOgHtugAUue3BUWwyGHT461Ha8P-d3Go](http://localhost:3000/?schema=z_sales\u0026eps=1\u0026host=gcp_europe_west3\u0026datasource=sales_dg\u0026token=p.eyJ1IjogIjg4Nzk5NGUxLWZmNmMtNGUyMi1iZTg5LTNlYzBmNmRmMzlkZCIsICJpZCI6ICIwN2RlZThhMS0wNGMzLTQ4OTQtYmQxNi05ZTlkMmM3ZWRhMTgifQ.p_N4EETK7dbxOgHtugAUue3BUWwyGHT461Ha8P-d3Go)\n\n**Warning**: all settings are saved in the URL including senstive field such as tokens \u0026 passwords! This is helpful in many occasions for demos, POCs and tests where these credentials are short-lived and disposable - but take care if you are using credentials that must not be shared!\n\n### CLI\n\nMockingbird is available as a standalone CLI.\n\nInstall the CLI with:\n\n```\nnpm install @tinybirdco/mockingbird-cli\n```\n\nHere is an example of sending data to the Tinybird Events API:\n\n```sh\n\u003e mockingbird-cli tinybird\n  --schema schema.json \\\n  --datasource \"my_data_source\" \\\n  --token \"e.Pdjdbfsbhksd....\" \\\n  --endpoint gcp_europe_west3 \\\n  --eps 50 \\\n  --limit 200\n```\n\nOr if you use [Tinybird Local](https://www.tinybird.co/docs/cli/local-container):\n\n```sh\n\u003e TB_ENDPOINT=http://localhost mockingbird-cli tinybird\n  --schema schema.json \\\n  --datasource \"my_data_source\" \\\n  --token \"e.Pdjdbfsbhksd....\" \\\n  --endpoint \"custom\" \\\n  --eps 50 \\\n  --limit 200\n```\n\n## Contributing\n\nAll contributions are welcome! We encourages individuals \u0026 commerical vendors to contribute to Mockingbird to build a data generator that works for everyone.\n\nThe repository has the following structure:\n\n```bash\n├── apps\n│   ├── cli\n│   ├── docs\n│   └── web\n└── packages\n    └── mockingbird\n```\n\n### Generator\n\nThe core Mockingbird generator is under `./packages/mockingbird`. All new Data Types, Schemas and Destinations are added here.\n\nThe generator is written in TypeScript \u0026 uses [Faker.js](https://fakerjs.dev/) under the hood to power much of the fake data generation. Custom Data Types are added on-top of Faker to supplement where needed.\n\n#### Adding new Data Types\n\nDataTypes are defined in [/packages/mockingbird/src/extendedFaker.ts](./packages/mockingbird/src/extendedFaker.ts).\n\nTo add a new Data Type, add a new item to the `mockingbirdModule` object.\n\nThey key of the item will become the name of the Data Type. Types added to this module are automatically added to the `mockingbird` namespace, meaning that they are referenced in schemas like `mockingbird.myTypeName`, this avoids clashes with Faker.js types.\n\nThe value of the item must be a function that returns the desired value. The function can have 1 optional parameter, which allows the function to accept incoming parameters.\n\nFor example, a custom Data Type that takes no input params:\n\n```javascript\nlatitudeString: () =\u003e faker.address.latitude().toString(),\n```\n\nA custom Data Type that accepts incoming parameters:\n\n```javascript\npick: (params: { values: unknown[] }) =\u003e\n    params.values[Math.floor(Math.random() * params.values.length)],\n```\n\n#### Adding new preset schemas\n\nPreset schemas are defined in [/packages/mockingbird/src/schemas/](./packages/mockingbird/src/schemas).\n\nCreate a new file in the `./packages/mockingbird/src/schemas/` directory.\n\nThe contents of the file should look like this:\n\n```javascript\nimport { Schema } from \"../types\";\n\nconst newSchema: Schema = {\n  timestamp: {\n    type: \"mockingbird.timestampNow\",\n  },\n};\n\nexport default newSchema;\n```\n\nEnsure a new schema is exported in [./packages/mockingbird/src/schemas/index.ts](./packages/mockingbird/src/schemas/index.ts)\n\n### CLI\n\nThe CLI is under `./apps/cli`\n\nThe CLI is Node based and uses [`yargs`](https://github.com/yargs/yargs).\n\n### Web UI\n\nThe Web UI is under `./apps/web`\n\nThe Web UI is a Next.js application written in TypeScript.\n\n#### Running the local dev server\n\nTo run the Mockingbird UI locally, first install Node.js (developed using v18).\n\nThen, use these commands:\n\n```bash\ngit clone https://github.com/tinybirdco/mockingbird.git\ncd mockingbird\nnpm install\nnpm run dev\n```\n\nThis will serve both the Web UI \u0026 the documentation site locally. By default, the UI is available on `http://localhost:3001` and the docs are on `http://localhost:3000`.\n\n### Docs\n\nThe Docs are under `./apps/docs`\n\nThe Docs are written in MDX using [Nextra](https://nextra.site/) as a static site generator.\n\nTo run the docs locally, see the instructions for the running the [Web UI](#running-the-local-dev-server).\n","funding_links":[],"categories":["Testing \u0026 Development","Free"],"sub_categories":["Data Generation","Development \u0026 Testing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fmockingbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinybirdco%2Fmockingbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fmockingbird/lists"}