How aws-samples/bedrock-engineer works
Main Components
• Electron Shell / Core Application – This includes the Electron main process, preload scripts, and configuration settings.
• Backend (Main Process) – Organized under “src/main” with APIs and services (e.g., bedrock, command, store). This layer handles application logic:
– API Services: Contains submodules that manage Bedrock integration (invokeBedrockAgent, image generation, etc.) and other command APIs.
– Logger Module: Structured under “src/common/logger” for consolidated logging management.
• Preload Layer – Acts as a bridge between the main process and renderer for secured API exposure (see “src/preload”).
• Frontend (Renderer Process) – Under “src/renderer”, mainly a React/Typescript-based UI that includes various pages:
– Agent Chat Interface: For interactive chat, file system operations, and tool management.
– Agent Directory: To discover and add preconfigured AI agents.
– Additional UI components, contexts, hooks, and assets which support features like internationalization and theme/settings.
Architectural Patterns and Design Principles
• Separation of Concerns: Differentiate between the Electron main (backend) and renderer (frontend) processes.
• API Gateway / Service Layer: Within “src/main/api”, multiple services handle domain-specific operations such as agent management, file operations, and AWS integrations.
• Modular and Extensible Design: The presence of distinct directories such as “agents” (in .bedrock-engineer) and a variety of tools indicate a plugin-like system where new functionalities (e.g., tool integrations or agent roles) can be added with minimal friction.
• Cross-Platform Build Process: The presence of build configuration files (e.g., electron-builder.yml, specific build scripts for mac, win, linux) highlights a deployment/packaging step as part of the system’s lifecycle.
Technologies and Frameworks
• Electron as the core application framework.
• React (with Typescript) for the Renderer UI.
• AWS Bedrock and related APIs for AI services.
• Node.js-based backend modules; usage of configuration and build tools (webpack/ESLint/Prettier).
• Testing frameworks (Jest) indicating integrated testing of components.
Elements
• Core application layers (main, renderer, preload),
• UI components/pages,
• External integrations (AWS, Tavily API, file system, command execution),
• Cross-cutting utilities (Logger, Configuration, Testing).
• Annotations that specify which technologies (Electron, React, AWS Bedrock) are utilized by each module.