How juspay/hyperswitch-helm works
Project Type and Purpose
• The README clearly states that Hyperswitch is “the open-source payments switch” – a community-led project that provides a single API interface to access diverse payment infrastructures.
• The emphasis on Helm (with charts and related files) indicates that the deployment is intended to be orchestrated in a Kubernetes environment.
• Given the multiple components (app, card vault, keymanager, istio, web, etc.), the project employs a microservices architecture.
Analyzing the File Structure
• hyperswitch-app: Likely the core payment routing or business logic service.
• hyperswitch-card-vault: Handles sensitive card data storage (vaulting).
• hyperswitch-istio: Contains networking or ingress configuration via Istio resources.
• hyperswitch-keymanager: Manages encryption keys and secrets.
• hyperswitch-stack: Appears to be a meta-chart bundling the above components together.
• hyperswitch-web: Likely provides a web interface or API frontend for consuming the platform.
• In addition, directories such as “load_test” and “misc/cypress” suggest there are testing scripts for load testing and end-to-end validations using Cypress.
• The presence of versioned release directories (v0.1.1, v0.2.2, etc.) indicate an established versioning and release strategy for the Helm charts.
Key Components and Their Interactions
a. Main Components:
• Hyperswitch App: The core payment processing and routing logic.
• Hyperswitch Card Vault: A dedicated service for secure card storage.
• Hyperswitch Keymanager: Handles key management, encryption, and secure operations.
• Hyperswitch Istio: Implements ingress routing, traffic management, and gateway configuration with Istio.
• Hyperswitch Web: Provides the frontend or API interface.
• Supporting services: Included via Helm dependencies such as Kafka (messaging), PostgreSQL (transactional data), Redis (caching), ClickHouse (analytics), Mailhog (email testing), and Loki/Grafana (logging and monitoring).
b. Relationships and Interactions:
• The Hyperswitch Web service likely acts as the point of entry for API calls or web interface interactions.
• Incoming requests are routed (possibly via the Istio configuration) to the appropriate microservice – either the App for processing or to the Card Vault/Keymanager as needed.
• The services communicate with supporting systems such as databases (PostgreSQL), caches (Redis), message brokers (Kafka), and logging/monitoring stacks.
Architectural Patterns & Design Principles
• Microservices Architecture: Each component (app, vault, keymanager, web) is designed as an independent Helm chart that can be deployed and scaled separately.
• Containerized Deployment on Kubernetes: Deployment configuration files like deployment.yaml, service.yaml, ingress.yaml, and configuration templates in each service indicate Kubernetes as the orchestration platform.
• Infrastructure as Code: Helm charts define the infrastructure, promoting repeatable deployments.
• Versioning & Release Management: Version directories (v0.1.1, etc.) show a clear versioning strategy.