{"id":28566434,"url":"https://github.com/js-devtools/static-mock-data","last_synced_at":"2026-02-27T17:08:15.197Z","repository":{"id":33231285,"uuid":"36874983","full_name":"JS-DevTools/static-mock-data","owner":"JS-DevTools","description":"High-quality mock data for sample apps, demos, and POCs","archived":false,"fork":false,"pushed_at":"2020-07-18T22:32:33.000Z","size":10879,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T01:42:49.578Z","etag":null,"topics":["javascript","mock-data","nodejs","poc","universal-javascript"],"latest_commit_sha":null,"homepage":"https://jstools.dev/static-mock-data/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JS-DevTools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-04T14:23:14.000Z","updated_at":"2021-11-16T18:23:22.000Z","dependencies_parsed_at":"2022-07-13T07:40:56.570Z","dependency_job_id":null,"html_url":"https://github.com/JS-DevTools/static-mock-data","commit_stats":null,"previous_names":["bigstickcarpet/mock-data","bigstickcarpet/static-mock-data"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fstatic-mock-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fstatic-mock-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fstatic-mock-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fstatic-mock-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JS-DevTools","download_url":"https://codeload.github.com/JS-DevTools/static-mock-data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fstatic-mock-data/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259098639,"owners_count":22804794,"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":["javascript","mock-data","nodejs","poc","universal-javascript"],"created_at":"2025-06-10T15:10:53.226Z","updated_at":"2025-12-12T03:38:55.250Z","avatar_url":"https://github.com/JS-DevTools.png","language":"JavaScript","readme":"Static mock data\n==============================\nStatic mock data (as opposed to randomly-generated mock data) for sample apps, demos, and POCs.\n\n[![Build Status](https://github.com/JS-DevTools/static-mock-data/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/static-mock-data/actions)\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/static-mock-data/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/static-mock-data)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/static-mock-data.svg)](https://www.npmjs.com/package/@jsdevtools/static-mock-data)\n[![Dependencies](https://david-dm.org/JS-DevTools/static-mock-data.svg)](https://david-dm.org/JS-DevTools/static-mock-data)\n[![License](https://img.shields.io/npm/l/@jsdevtools/static-mock-data.svg)](LICENSE)\n\n[![OS and Browser Compatibility](https://jstools.dev/img/badges/ci-badges.svg)](https://github.com/JS-DevTools/static-mock-data/actions)\n\n\n\nFeatures\n--------------------------\n* __[100 mock employees](https://raw.githubusercontent.com/JS-DevTools/static-mock-data/master/employees.json)__, with names, addresses, phone numbers, etc.\n* __[100 mock projects](https://raw.githubusercontent.com/JS-DevTools/static-mock-data/master/projects.json)__, with names, dates, departments, employees assigned, etc.\n* __[Full-size](https://github.com/JS-DevTools/static-mock-data/blob/master/portraits/jdoe.jpg)__ and __[thumbnail](https://github.com/JS-DevTools/static-mock-data/blob/master/portraits/jdoe-thumb.jpg)__ photos for each employee\n* No dependencies\n* Tested in Node.js and all modern web browsers on Mac, Windows, and Linux\n* All data follows logical rules:\n    - Usernames, SSNs, addresses, etc. are unique\n    - Birthdates, hire dates, and termination dates are in proper chronological order\n    - Employee roles \"make sense\" (e.g. \"full time\" and \"part time\" are mutually exclusive)\n    - Employees are only assigned to projects in their own department\n    - Employees are only assigned to projects that occurred during their employment\n\n\n\nInstallation\n-------------------------------------\nInstall using [NPM](https://docs.npmjs.com/about-npm/) or [Yarn](https://yarnpkg.com):\n\n```bash\nnpm install @jsdevtools/static-mock-data\n```\n\n\nUsage\n-------------------------------------\nThe mock data can be used as plain JSON or as JavaScript objects.\n\n### Raw JSON\n```javascript\nconst employees = require(\"@jsdevtools/static-mock-data/employees.json\");\n\nfor (let employee of employees) {\n  console.log(employee.dob);        // date string\n  console.log(employee.portrait);   // relative file path\n}\n```\n\n### JavaScript Objects\n```javascript\nconst mockData = require(\"@jsdevtools/static-mock-data\");\n\nfor (let employee of mockData.employees) {\n  console.log(employee.dob);        // Date object\n  console.log(employee.portrait);   // absolute file path\n}\n```\n\n\n\nBrowser support\n--------------------------\nStatic Mock Data supports recent versions of every major web browser.  Older browsers may require [Babel](https://babeljs.io/) and/or [polyfills](https://babeljs.io/docs/en/next/babel-polyfill).\n\nTo use Static Mock Data in a browser, you'll need to use a bundling tool such as [Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/), [Parcel](https://parceljs.org/), or [Browserify](http://browserify.org/). Some bundlers may require a bit of configuration, such as setting `browser: true` in [rollup-plugin-resolve](https://github.com/rollup/rollup-plugin-node-resolve).\n\n\n\n\nEmployees\n--------------------------\n`mockData.employees` is an array of objects with the following properties:\n\n| Property              | Data Type        | Description\n|:----------------------|:-----------------|:----------------------------\n| `username`            | string           | A alphanumeric username that is unique for each employee\n| `password`            | string           | An alphanumeric password\n| `name.first`          | string           | First name\n| `name.last`           | string           | Last name\n| `gender`              | string           | \"male\" or \"female\"\n| `portrait`            | string           | The path of the full-size portrait photo\n| `thumbnail`           | string           | The path of the thumbnail-size portrait photo\n| `email`               | string           | Email address\n| `address.street`      | string           | House number and street name\n| `address.city`        | string           | City name\n| `address.state`       | string           | U.S. state name (full name, not abbreviation)\n| `address.zip`         | string           | U.S. zip code, in the format #####\n| `phones`              | array of objects | Array of phone objects\n| `phones[].type`       | string           | \"home\", \"office\", or \"cell\"\n| `phones[].number`     | string           | Phone number, in the format ###-##-####\n| `ssn`                 | string           | U.S. Social Security Number, in the format ###-##-####. Unique for each employee.\n| `dob`                 | Date             | Date of birth\n| `hiredOn`             | Date             | Date the employee was hired\n| `terminatedOn`        | Date or null     | Date the employee was terminated, or `null` if still employed\n| `department`          | string           | \"Accounting\", \"Sales\", \"Human Resources\", or \"Marketing\"\n| `roles`               | array of strings | Array of roles, such as \"employee\", \"consultant\", \"part time\", etc.\n\n\n\nProjects\n--------------------------\n`mockData.projects` is an array of objects with the following properties:\n\n| Property              | Data Type        | Description\n|:----------------------|:-----------------|:----------------------------\n| `id`                  | number           | Numeric ID that is unique for each project\n| `name`                | string           | Project name that is unique for each project. 55 characters max.\n| `description`         | string           | Long project description. 2000 characters max\n| `department`          | string           | \"Accounting\", \"Sales\", \"Human Resources\", or \"Marketing\"\n| `startedOn`           | Date             | Date that the project started\n| `endedOn`             | Date or null     | Date that the project ended, or `null` if still ongoing\n| `assigned`            | array of strings | Array of usernames of employees who are assigned to the project. Projects will only have employees from the same department.\n\n\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/JS-DevTools/static-mock-data/issues) on GitHub and [submit a pull request](https://github.com/JS-DevTools/static-mock-data/pulls).\n\n#### Building\nTo build the project locally on your computer:\n\n1. __Clone this repo__\u003cbr\u003e\n`git clone https://github.com/JS-DevTools/static-mock-data.git`\n\n2. __Install dependencies__\u003cbr\u003e\n`npm install`\n\n3. __Run the build script__\u003cbr\u003e\n`npm run build`\n\n4. __Run the tests__\u003cbr\u003e\n`npm test`\n\n\n\nLicense\n--------------------------\nAll JSON data is [MIT licensed](http://opensource.org/licenses/MIT) and can be used however you want.\n\nAll images (employee portraits) are licensed under [Creative Commons BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/2.0/deed.en) and have some limitations on their use.\n\nSee the [LICENSE file](LICENSE) for more details.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![Travis CI](https://jstools.dev/img/badges/travis-ci.svg)](https://travis-ci.com)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fstatic-mock-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-devtools%2Fstatic-mock-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fstatic-mock-data/lists"}