architecture.md943 BView on GitHub
# AWS Architecture

## Runtime split

- `api-service`: request/response APIs, auth handlers, and webhooks
- `chat-service`: chat streaming and long-lived chat execution
- `worker-service`: queue consumers, scheduled work, and sync processing

## Stack split

- `EnvironmentStack`: naming, outputs, and shared metadata
- `DataStack`: storage and queueing primitives
- `ObservabilityStack`: logs, alarms, dashboards
- `AppStack`: frontend hosting, API hosting, ECS services

## Resource intent

### App

- S3 + CloudFront for `aws-*-app`
- ALB for `aws-*-api`
- ECS services for `api-service`, `chat-service`, `worker-service`

### Data

- S3 for object storage
- SQS for async message delivery
- EventBridge for hourly cron triggers
- DynamoDB for selected operational state
- Step Functions for workflow orchestration and cron task orchestration

### Observability

- CloudWatch log groups
- alarms and dashboards
- Datadog integration points