Faker
Generate massive amounts of realistic fake data for testing, seeding, and mocking in JavaScript and TypeScript.
Repository Health
Technical Analysis
Faker is a zero-dependency JavaScript and TypeScript library for generating large volumes of realistic-looking fake data. It exposes dozens of topic-scoped modules — person, location, commerce, finance, internet, date, and more — so instead of hand-writing placeholder values, developers call typed methods like faker.person.firstName() or faker.internet.email() to produce data that looks real without being real.
The library is organized around per-topic modules (currently 24+ covering airline, animal, book, color, commerce, company, database, date, finance, food, git, hacker, image, internet, location, lorem, medical, music, person, phone, science, system, vehicle, and word data) and supports over 70 locales, so generated names, addresses, and phone numbers can be localized instead of defaulting to generic English placeholders.
Faker is commonly used to seed development databases, generate mock API responses, and populate test fixtures, and its deterministic seeding (faker.seed()) lets teams reproduce the exact same ‘random’ dataset across test runs. The project was revived by the community after the original faker.js was deliberately corrupted by its maintainer in January 2022, and is now maintained under the faker-js organization with an active release cadence and a large contributor base.
What You Get
- 24+ topic modules (person, location, commerce, finance, internet, date, git, hacker, image, music, phone, science, vehicle, word, and more) covering the vast majority of fake-data needs out of the box
- 70+ locale data sets, with instance-level locale selection and configurable fallback so localized names, addresses, and phone numbers don’t default to English
- Deterministic seeding via
faker.seed()for reproducible datasets across test runs and CI environments - A zero-runtime-dependency, fully typed (TypeScript-first) API with tree-shakeable ESM exports for smaller bundle sizes when only specific modules or locales are imported
- A template helper (
faker.helpers.fake) for combining multiple generator calls into a single mustache-style string - A
SimpleFakerbase class and a fullFakerclass, letting consumers build custom locale-scoped instances rather than only using the default shared instance
Common Use Cases
- Seeding local or staging databases with realistic-looking sample data during development
- Generating mock API response payloads for frontend development before a backend endpoint exists
- Populating fixtures and factories in unit/integration test suites (e.g. with vitest, jest, or factory libraries)
- Producing consistent, seeded synthetic datasets for demos, load testing, or documentation examples
- Building localized test data (names, addresses, phone formats) for internationalized applications
Under The Hood
Architecture
Faker’s core class hierarchy runs SimpleFaker (src/simple-faker.ts) as the base random/seed engine, extended by the full Faker class (src/faker.ts) which composes 24+ per-topic modules (AirlineModule, PersonModule, InternetModule, etc., under src/modules/) as readonly instance properties. Each module is a self-contained class exported from its own index.ts/module.ts, so adding or modifying a data domain doesn’t touch the core engine. Locale data lives separately under src/locales/ (78 locale directories) and src/locale/, decoupled from module logic via a LocaleProxy internal layer, so the same module code can serve any locale’s dataset. This module-per-topic, locale-as-data separation means the core abstraction that would break the most if changed is the Faker/SimpleFaker constructor contract, since every module depends on it for seeded randomness.
Tech Stack
The project is 100% TypeScript, built with tsdown for the distributable ESM output and tsc for type-checking, inside a pnpm workspace (pnpm-workspace.yaml). It ships as type: module with zero runtime dependencies in package.json — only devDependencies (27 entries) for tooling. Linting and formatting use oxlint/oxfmt (Rust-based, faster alternatives to ESLint/Prettier) rather than the more common JS toolchain. Documentation is built with VitePress (docs/ directory), and release automation runs through commit-and-tag-version.
Code Quality
The test/ directory mirrors src/modules/ one-to-one, using Vitest with a shared seededTests helper (test/support/seeded-runs.ts) that runs each generator method with a fixed seed and asserts against stored snapshots (test/snapshots/), catching any unintended change in output distribution. Coverage is collected via the v8 provider across clover/cobertura/lcov/text reporters. GitHub Actions (.github/workflows/ci.yml, integration-test.yml, pr.yml) run lint, type-check, unit tests, and a separate integration-test pass. The combination of per-module seeded snapshot tests plus full TypeScript typing gives strong confidence that a change to one module’s output is caught immediately.
API Design
The public API favors flat, discoverable namespacing (faker.person.firstName(), faker.internet.email()) over deeply nested configuration objects, so autocomplete alone documents most of the surface area. Locale switching is done by importing a differently-named export (fakerDE, fakerJA) or constructing a custom new Faker({ locale: [...] }) instance rather than passing a locale string at call time, which trades a small amount of runtime flexibility for compile-time tree-shaking of unused locale data. A single template helper (faker.helpers.fake) covers the common case of composing multiple fields into one string, avoiding the need for consumers to hand-write string interpolation across several module calls.
Used by 59 apps in this directory
Activepieces
Automation · AI Assistants
Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.
AFFiNE
Productivity · Project Management · Note Taking
Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.
APITable
Low Code Platforms · Databases
API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.
Appsmith
Developer Tools · Automation · No Code Platforms
Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.
Artillery
Devops · Developer Tools
Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.
AutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.
Automatisch
Automation · No Code Platforms
Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.
Baserow
No Code Platforms · Databases
Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.
Bigcapital
Invoicing Finance
Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.