Cloud Weaver is an AWS architecture assistant that converts a plain-English idea into a validated architecture design.
It supports a full architecture workflow:
- prompt-to-diagram generation (Mermaid)
- rule-based validation (syntax + architecture constraints)
- session-aware context for multi-turn refinement
- optional CloudFormation generation after approval
- Frontend (CloudFront): https://d2k45vy1qt3ioe.cloudfront.net/
- Website has been shutdown due to Hackathon ending
- Backend (API Gateway WebSocket): wss://9vihcpxj86.execute-api.us-west-2.amazonaws.com/dev/
- What this project does
- End-to-end flow
- System architecture
- AWS services users can design with
- AWS services used to build this application
- Validation pipeline
- Session memory model
- Repository layout
- Getting started
- Configuration
- Current project focus
Cloud Weaver helps teams quickly go from idea to deployable architecture artifacts while keeping output constrained to an approved AWS service set.
Primary outputs:
- Mermaid architecture diagram text (rendered in frontend)
- architecture reasoning/explanations
- CloudFormation YAML draft generated from approved architecture context
- A user submits a system idea in the frontend chat UI.
- The frontend sends the request over API Gateway WebSocket routes.
- Lambda orchestrates prompt construction and model invocation.
- Amazon Bedrock returns architecture reasoning + Mermaid graph.
- Backend validators enforce Mermaid syntax and architecture constraints.
- Validated output is returned to the frontend for rendering.
- If approved, CloudFormation generation is requested using the latest session context.
- CloudFormation output is syntax-validated before deployment-oriented workflows continue.
- React + Vite chat application
- WebSocket client for low-latency request/response flow
- Markdown + Mermaid rendering for assistant output
- Python Lambda handlers for orchestration
- Bedrock integration for generation
- DynamoDB-backed session/message persistence
- Validation modules for Mermaid and CloudFormation outputs
- Mermaid syntax validation
- Architecture rule validation
- CloudFormation YAML structure/syntax validation
7 Predefined selectable services for generated architectures:
- Amazon Bedrock
- AWS Lambda
- Amazon S3
- API Gateway
- CloudFront
- DynamoDB
- AWS IAM
These services power Cloud Weaver itself:
| Service | Role in this project | Notes |
|---|---|---|
| API Gateway (WebSocket) | Real-time transport between frontend and backend | Handles bidirectional chat traffic |
| AWS Lambda | Prompt handling, orchestration, validation pipeline, and response routing | Backend compute layer |
| Amazon Bedrock | Model inference for diagram and CloudFormation generation | Generates architecture output |
| DynamoDB | Persistent conversation memory and session state | Sessions table: SessionsMessages table: MessagesTTL attribute: expiresAt |
| Amazon S3 | Frontend artifact hosting and prompt sync target during deploy | Static assets and deployment sync |
| CloudFront | Frontend CDN distribution and cache invalidation | Public frontend delivery |
| CloudFormation | Infrastructure-as-code output target | Template generation path |
| IAM | Execution and deployment permissions | Policies for runtime and deployment |
| STS | Identity checks and temporary credentials in deployment workflows | Temporary role/session credentials |
Validation is separated to reduce invalid model output before deployment actions:
validation/mermaid_syntax.py- header and structural checks
- quote/delimiter balance checks
validation/architecture_rules.py- approved service enforcement
- connection integrity and duplicate/orphan checks
validation/cloudformation_syntax.py- YAML syntax checks
- root object/resource structure checks
Cloud Weaver uses sessionID for multi-turn session continuity.
- Frontend stores
sessionIDin browser localStorage. - Backend loads recent session history from DynamoDB and injects it into prompt context.
- CloudFormation generation references the latest approved architecture context from the same session.
Current Lambda environment values:
CHAT_HISTORY_LIMIT=20MESSAGES_TABLE=MessagesSESSION_TABLE=SessionsSESSION_TTL_SECONDS=604800
Note: backend supports both SESSION_TABLE and SESSIONS_TABLE variable names.
aws-architect/
├── backend/
│ ├── lambda/
│ │ ├── handler.py
│ │ ├── bedrock_client.py
│ │ ├── session_store.py
│ │ └── test_local.py
│ ├── validation/
│ │ ├── architecture_rules.py
│ │ ├── mermaid_syntax.py
│ │ └── cloudformation_syntax.py
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── MermaidChart.jsx
│ │ └── components/
│ └── package.json
└── prompts/
- Node.js 20+
- Python 3.12
- AWS credentials configured locally (for backend Bedrock/AWS calls)
cd frontend
npm install
npm run devOptional clean reinstall after dependency drift:
cd frontend
rm -rf node_modules
npm cicd backend
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txtOptional local harness:
cd backend/lambda
python3 test_local.pyFrontend runtime configuration (typically in .env under frontend/):
VITE_WS_URLfor WebSocket backend endpointVITE_TEST_MODE=truefor local fallback behavior
Backend configuration relies on Lambda environment variables and AWS IAM permissions for Bedrock, DynamoDB, and API integrations.

