git404hub

what is smocker fr?

pantafive/smocker — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2022-05-24

TypeScriptAudience · developerComplexity · 2/5DormantSetup · easy

tl;dr

Smocker lets you spin up a fake HTTP server that returns responses you define, so your code can be tested against realistic API behavior without calling real external services.

vibe map

mindmap
  root((repo))
    What it does
      Mocks HTTP APIs
      Simulates error responses
      Records request history
    Tech stack
      Go
      TypeScript
      React
    Use cases
      Test without real APIs
      Simulate error scenarios
      Isolated CI CD testing
    Audience
      Backend developers
      QA testers
      DevOps engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Mock a payment processor or email service so tests don't hit real external APIs.

VIBE 2

Simulate a 500 error or delayed response to test how your app handles failures.

VIBE 3

Run isolated, repeatable API tests inside a CI/CD pipeline.

VIBE 4

Use the web interface to inspect registered mocks and incoming request history.

what's the stack?

GoTypeScriptReactDocker

how it stacks up fr

pantafive/smocker0xradioac7iv/tempfs7vignesh/pgpulse
Stars00
LanguageTypeScriptTypeScriptTypeScript
Last pushed2022-05-24
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

Runs as a standalone binary or Docker container with separate mock and control ports.

in plain english

Smocker is a tool that lets you create fake HTTP servers for testing. Instead of calling real APIs during development or testing, you point your code at Smocker, tell it what responses to send back, and it handles the requests. This speeds up testing, lets you test error scenarios easily, and means you don't depend on external services being available. The way it works is straightforward: Smocker runs two ports side by side. One port (8080 by default) is the mock server itself, the fake API your code talks to. The other port (8081) is the control panel where you define what responses should be sent back. You describe your mocks in simple YAML or JSON files, listing the request path and method you want to handle, then the response status code, headers, and body you want to return. Once you upload these mocks to the control port, the mock server immediately knows how to respond to those requests. There's also a web interface on the control port so you can see what mocks are registered, view a history of requests that came in, and reset everything without restarting. You'd use this if you're building a frontend or backend service that depends on calling other APIs. During development, you might not want to hit the real payment processor, email service, or third-party data provider. Smocker lets you simulate those dependencies with whatever responses you need. Testers love it because they can easily set up scenarios, like testing what happens when an API returns a 500 error, or when a response is delayed. It also works well in CI/CD pipelines where you need isolated, repeatable test environments. The project is written in Go for the backend and includes a TypeScript/React frontend. You can run it as a standalone binary or as a Docker container, making it easy to drop into existing workflows. The README doesn't detail advanced features, but links to fuller documentation at smocker.dev for anything beyond the basics.

prompts (copy fr)

prompt 1
Show me how to write a Smocker mock in YAML that returns a 500 error for a given endpoint.
prompt 2
Help me run Smocker as a Docker container and point my app at its mock server port.
prompt 3
Explain how to use Smocker's control port to register and reset mocks during tests.
prompt 4
Walk me through simulating a delayed API response with Smocker for testing timeouts.

Frequently asked questions

what is smocker fr?

Smocker lets you spin up a fake HTTP server that returns responses you define, so your code can be tested against realistic API behavior without calling real external services.

What language is smocker written in?

Mainly TypeScript. The stack also includes Go, TypeScript, React.

Is smocker actively maintained?

Dormant — no commits in 2+ years (last push 2022-05-24).

How hard is smocker to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is smocker for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.