How msferraresi/service_doppel works
ServiceDoppel is a configurable HTTP mock hub: callers send requests to a catch-all route, which matches an active service endpoint, selects a response scenario, records the request, applies configured latency, and returns the scenario response. The SQLite-backed configuration describes services, endpoint patterns, and scenarios; a seed routine provides an example setup. Relationships below are limited to those shown in the excerpts or source index; the README is empty, and unshown administrative capabilities are not inferred.
Main entry points: app.py Catch-all API · models.py Service records · database.py SQLite database · main.py App startup
Components 11
Request ingress
- App startup
main.py - Catch-all API
src/server/app.py
Matching and response
- Endpoint matcher
src/engine/matcher.py - Scenario selector
src/engine/dispatcher.py - Latency simulation
src/engine/dispatcher.py - Mock response
src/server/app.py
Configuration and storage
- Example seeding
src/seed.py - Service records
src/db/models.py - Request audit
src/db/models.py - SQLite database
src/db/database.py
Other components
- API caller
Connections 15
- API caller → Catch-all API: sends request
src/server/app.py - App startup → SQLite database: initializes schema
main.py - App startup → Catch-all API: runs app
main.py - Catch-all API → Endpoint matcher: matches route
src/server/app.py - Endpoint matcher → Service records: queries endpoints
src/engine/matcher.py - Catch-all API → Scenario selector: resolves scenario
src/server/app.py - Scenario selector → Service records: reads scenarios
src/engine/dispatcher.py - Catch-all API → Request audit: records request
src/server/app.py - Catch-all API → SQLite database: commits audit
src/server/app.py - Catch-all API → Latency simulation: simulates delay
src/server/app.py - Catch-all API → Mock response: returns scenario body
src/server/app.py - Mock response → API caller: sends response
src/server/app.py - Example seeding → Service records: creates examples
src/seed.py - Example seeding → SQLite database: persists seed data
src/seed.py - Service records → SQLite database: defines schema
src/db/models.py