Architecture

wayparam is intentionally modular. Each module has a single responsibility, which makes the tool easier to test, audit, and package.

High-level data flow

  1. cli.py / gui/
  2. Parse user input
  3. Build a frontend-independent RunConfig
  4. core.py
  5. Orchestrates concurrency, filtering, normalization, cross-provider deduplication and output
  6. providers/
  7. Defines the archive-provider contract and source records
  8. Adapts Wayback to the provider interface
  9. Implements Common Crawl collection discovery and CDXJ pagination
  10. analysis.py
  11. Aggregates uncollapsed capture metadata into endpoint, parameter and domain views
  12. Formats deterministic TXT/JSONL historical output
  13. wayback.py
  14. Builds CDX query parameters
  15. Handles pagination/resumeKey
  16. Exposes both URL-only and capture-metadata iterators
  17. http.py
  18. Makes resilient HTTP requests (retries, backoff)
  19. filters.py
  20. Drops “boring” URLs (static assets) early
  21. normalize.py
  22. Canonicalizes and normalizes URLs (stable output)
  23. output.py
  24. Writes records to files and/or stdout (txt/jsonl)
  25. ratelimit.py
  26. Global RPS limiter (optional)

Why this structure matters

  • unit tests focus on pure logic (normalize.py, filters.py, parsing)
  • integration tests mock HTTP at the transport layer (httpx MockTransport)
  • providers share one normalization/dedup pipeline, so adding a source does not fork output semantics
  • CLI stays pipeline-friendly: stdout is clean and predictable