How juspay/hyperswitch-cdk works
Core Components
• Infrastructural Deployment Layer: Represented by the AWS CDK scripts (cdk.json, awsconfig.ts, bin/hs-cdk.ts) and configuration files under the “lib/aws” directory. Note the specialized stacks for card vault, auto scaling groups, networking, RDS, jump servers, etc.
• Service Modules: Highlight the App Server (described in the README as a key Rust-based backend), Scheduler Services, Admin Control Center, and Demo App with SDK integration. Even if their code isn’t completely visible in this repository, the README clearly defines their roles.
• Support / Auxiliary Components: Include specialized components such as Card Vault (with its dedicated stacks and scripts), Image Builder (with its own deployment scripts and configuration in the “single-click”, “install-locker.sh”, “deploy_imagebuilder.sh”, etc.), and Jump Servers (for secure access).
• External Dependencies & Infrastructure Scripts: Scripts in the “bash” folder, installation and upgrade scripts, and integration utilities (e.g., in “dependencies/code_builder”) show how setup and build are automated.
Out Communication & Relationships
• Directional flows showing that installation scripts (from the “bash” and “bin” directories) trigger the deployment processes.
• That some components, like the Card Vault, require a multi-step jump server connection (making it a layered/security-focused component with an internal and an external jump connection).
Architectural Patterns & Design Choices
• Module Isolation: Each major function (e.g., card vault, image builder) is isolated into its own module/stack as seen in separate directories and scripts.
• Cross-Cloud Flexibility: Although AWS is the primary target, note references to Azure and GCP stacks in the “lib/azure” and “lib/gcp” directories.
• Extensibility & Security: A layered security design is implied (e.g., jump servers accessing card vault securely), so clearly denote secure channels and control boundaries.
• App Server (with a note on its Rust implementation).
• Scheduler Services.
• Admin Control Center.
• Card Vault services with internal and external jump server layers.
• Image Builder for proxies (Squid and Envoy) as detailed in the components folder.
• Build Automation (code builder) and dependency management.
• Detailed sub-components within the AWS layer (e.g., Auto Scaling Groups, EKS, RDS, Lambda functions, networking modules) as represented in the “lib/aws” subdirectories.
• Clear directional flows showing deployment triggers (e.g., from install.sh, deploy_imagebuilder.sh) and data flow between modules (e.g., API calls from the Demo App to the App Server, secure jumps from external to internal jump servers for Card Vault access).