# Counterfact > Build the frontend. Don’t wait for the backend. Counterfact turns an OpenAPI document into a useful local API in one command. Start with an OpenAPI document, point a frontend at `http://localhost:3100`, and use schema-derived responses before writing custom handlers. Requires Node 22+. Supports Swagger 2.0 and OpenAPI 3.0, 3.1, and 3.2. ```sh npx counterfact@latest https://petstore3.swagger.io/api/v3/openapi.json api ``` ## Start here - [Getting Started](https://counterfact.dev/docs/getting-started) — prerequisite, one command, localhost browser request, generated files, and one optional custom response. - [First 10 minutes](https://counterfact.dev/docs/first-10-minutes) — add a small stateful create/read workflow and one frontend-relevant failure. - [Usage](https://counterfact.dev/docs/usage) — guides grouped by frontend work, team/test work, advanced control, and troubleshooting. ## Add only what the workflow needs - [Custom responses](https://counterfact.dev/docs/features/routes) - [State](https://counterfact.dev/docs/features/state) - [Failures](https://counterfact.dev/docs/patterns/simulate-failures) and [latency](https://counterfact.dev/docs/patterns/simulate-latency) - [Proxying](https://counterfact.dev/docs/features/proxy) - [Tests](https://counterfact.dev/docs/patterns/automated-integration-tests) and [REPL](https://counterfact.dev/docs/features/repl) ## Reference - [Reference](https://counterfact.dev/docs/reference) - [FAQ](https://counterfact.dev/docs/faq) - [Without OpenAPI](https://counterfact.dev/docs/features/without-openapi) — use this alternative only when no OpenAPI document exists. - [GitHub repository](https://github.com/counterfact/api-simulator)