# miragejs/miragejs

A client-side server to build, test and share your JavaScript app

Repository: https://github.com/miragejs/miragejs
Canonical: https://ross.abutalabs.com/products/miragejs
Homepage: https://miragejs.com/
Language: JavaScript
License: MIT
License Family: permissive
Topics: testing, mock, database, testing-tools, hacktoberfest
Last push: 2025-08-11T14:21:25+00:00

## Health v2 (maintenance only)
Score: 39/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 36, release rhythm 8, longevity 100
- inputs: {"age_days": 2749, "days_push": 387, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5529, forks 174 (observed 2026-08-28T04:09:21.977728+00:00)

## What it is
Mirage JS is a client-side API mocking library that lets frontend developers build, test, and prototype complete JavaScript applications without a real backend. It intercepts XMLHttpRequest and fetch requests in the browser and lets you define mock routes, a seeded database, and factories to simulate dynamic server behavior.

## Use cases
- mock backend APIs for frontend development
- write UI tests without a real server
- prototype frontend features before the API exists
- demo a JavaScript app offline
- seed test scenarios with factories and fixtures
- share a working frontend repo with no backend setup

## When to choose
- you're building or testing a JavaScript frontend and the backend isn't ready or available
- you want high-level application tests that simulate realistic server state
- you need an offline dev environment that new collaborators can run with just npm install

## When to avoid
- you need to mock APIs for backend or integration tests of the actual server
- you only need simple static JSON stubs and don't want a full in-browser database
- your app communicates over protocols other than HTTP (XHR/fetch)

## Facets
- artifact type: library
- maturity: stable
- function: mock-api, testing, http-server, database, e2e-testing
- domain: frontend, web-development, testing, developer-tools
- platform: browser
- tags: api-mocking, fake-server, frontend-development, ui-testing, prototyping, pretender, nodejs, javascript

## Member repositories
- miragejs/miragejs (main) score 39

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:21.977728+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:45.661907+00:00, confidence not recorded.
  - readme: https://github.com/miragejs/miragejs (fetched 2026-08-28T04:09:21.977728+00:00, sha 9e9ddf555213)
  - homepage: https://miragejs.com/ (fetched 2026-08-29T08:51:29.582655+00:00, sha 2e543cb64efb)
  - site_page: https://miragejs.com/docs/getting-started/introduction (fetched 2026-08-29T08:51:29.592187+00:00, sha 62da40059bf3)
  - site_page: https://miragejs.com/quickstarts/overview (fetched 2026-08-29T08:51:29.594027+00:00, sha 9750e91eff8b)
  - site_page: https://miragejs.com/docs/testing/application-tests (fetched 2026-08-29T08:51:29.595738+00:00, sha 6ae2fac74ce8)
  - registry_npm: https://registry.npmjs.org/miragejs (fetched 2026-08-29T08:51:29.597797+00:00, sha cd4e36455fb2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
