
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
synthetic-api
Advanced tools
A declarative mock backend CLI for frontend developers.
You define API routes in JSON, then run a local or cloud-hosted mock API with:
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)none, bearer, apiKey)querySchema, bodySchema, headersSchema)mkdir my-mock-api && cd my-mock-api
npx synthetic-api init
npm install
npm run start
Then call:
GET http://localhost:4010/GET http://localhost:4010/healthGET http://localhost:4010/__routesinit scaffolds:
synthetic-api.config.jsonfixtures/users.jsonDockerfile, .dockerignore, render.yaml, railway.json, Procfilepackage.json scripts: start, dev, validate, start:cloud, helpBehavior:
--force to overwrite generated files/scripts.--config <path>, generated npm scripts use that same config path.Run without installing:
npx synthetic-api --help
Install in a project:
npm i synthetic-api
npx synthetic-api init
Install globally:
npm i -g synthetic-api
synthetic-api --help
synthetic-api init [--config synthetic-api.config.json] [--force]
synthetic-api dev [--config synthetic-api.config.json] [--port 4010] [--watch true|false]
synthetic-api validate [--config synthetic-api.config.json]
synthetic-api tunnel [--port 4010] [--provider auto|cloudflared|ngrok]
Port resolution order for dev:
--portPORT environment variable4010GET /health: healthcheck payload (for cloud probes)GET /__routes: routes index (includes system + declared routes){
"version": 1,
"global": {
"latencyMs": [50, 250],
"cors": {
"enabled": true,
"origin": "*",
"methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
"headers": ["content-type", "authorization", "x-api-key"]
}
},
"auth": {
"tokens": ["demo-token"],
"apiKeys": ["demo-key"]
},
"routes": [
{
"method": "GET",
"path": "/users",
"querySchema": { "page": "number?", "limit": "number?" },
"pagination": { "type": "offset", "defaultLimit": 5 },
"response": { "status": 200, "bodyFrom": "fixtures/users.json" },
"errors": [{ "status": 500, "probability": 0.05 }]
}
]
}
Template variables in response strings:
{{params.id}}{{query.page}}{{body.email}}Use:
npm run start:cloud
start:cloud:
PORT from host environmentScaffold includes provider files:
render.yamlrailway.jsonProcfileDockerfileFAQs
Declarative mock API server for frontend development
We found that synthetic-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.