1.5 KiB
1.5 KiB
AGENTS.md — WB Mock Server — Project Context
Read this first. Append what you did at the end under Session Log.
1. What this is
Mock server emulating Wildberries Seller API for integration testing. Returns hardcoded fixture data.
| Layer | Tech |
|---|---|
| Language | Go 1.25, net/http stdlib |
| Deployment | Docker + systemd on ioffe |
| Auth | Optional Api-Key validation (WB Authorization header) |
| Config | Env vars: PORT, WB_API_KEY |
2. Endpoints (TBD by agent)
| Method | Path | Description |
|---|---|---|
| GET | /health |
Health check |
3. Test Data
| Entity | Count |
|---|---|
| Products | TBD |
| Stocks | TBD |
| Prices | TBD |
4. Deploy
cd /Users/rinat/projects/wb-mock
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o wb-mock ./cmd/server
scp wb-mock ioffe:/opt/wb-mock/wb-mock
ssh ioffe "sudo systemctl restart wb-mock"
curl https://wb-mock.px.kinrin.ru/health # expect {"status":"ok"}
5. Key Commands
make build # binary
make test # go test -race ./...
make docker # Docker build
go run ./cmd/server # local on :8080
6. Wildberries API Auth
WB Seller API uses Authorization: <api_key> header (no Client-Id).
7. Reference
Ozon mock sibling project: /Users/rinat/projects/ozon-mock — same architecture, 20 endpoints, 31 tests.
Use it as a reference for patterns: config loading, fixture generation, handler structure, filter logic.
8. Session Log
Append your summary below. Latest first.