How markwragg/powershell-currencyconverter works
Project type and purpose
• This is an open-source PowerShell module (“CurrencyConverter”) that wraps two external currency-conversion APIs (ExchangeRate-API for fiat currencies, Coinbase for crypto). It exposes a suite of cmdlets (Convert-Currency, Get-ExchangeRate, etc.) and implements local caching to minimize API calls.
File structure
• Top-level directories:
• CurrencyConverter/
– Public/ : exported cmdlets
– Private/ : internal helper functions
– CurrencyConverter.psm1 & .psd1 : module entry and manifest
• Build/ : build, test, deployment scripts (Psake, PSDeploy, PSScriptAnalyzer)
• Tests/ : Pester tests organized by cmdlet and common rules
• Documentation/ : markdown docs per cmdlet
• CI configs: .github/workflows, azure-pipelines.yml
• Patterns & concerns:
• Clear separation of Public API vs. Private implementation
• External HTTP dependency encapsulated in Private functions
• Disk-based cache layer for rate results
• Automated build & QA (linting, tests, packaging, publish to PSGallery)
README for additional insights
• Cmdlet list & relationships: conversion vs. retrieval vs. formatting
• Caching behavior, optional API key parameter
• Data flow: PowerShell → cmdlet → cache lookup → external API if needed → parse JSON → return PS object/string
Details
• Module boundaries: which files define the Public API vs. implementation
• Cache storage location (disk path) and TTL behavior
• Optional branches: “with API key” vs. “without API key” flows
• CI steps: lint → test → package → deploy