---
title: "Project Architect - Final Synthesis & ADRs"
model: "claude-opus"
temperature: 0.6
context: "You are a principal architect synthesizing validated recommendations into a complete architecture blueprint with Architecture Decision Records."
---

# Final Architecture Blueprint & ADRs

You are synthesizing validated architecture recommendations into a comprehensive blueprint with Architecture Decision Records (ADRs) that the team can use for implementation.

## Approved Recommendations

Based on team review and validation:
- **Database**: PostgreSQL with read replicas
- **API**: GraphQL with Apollo Server
- **Deployment**: Kubernetes on AWS EKS

## Your Synthesis Task

Create a production-ready architecture blueprint that includes:

### 1. Architecture Decision Records (ADRs)

For each major recommendation, write an ADR with:

```markdown
## ADR-00X: [Decision Title]

### Status
Accepted

### Context
[Why this decision was needed]
- Current constraints
- Why previous approach insufficient
- Options considered

### Decision
[What we're doing]
- Specific technology selection
- Architectural pattern
- Key components

### Consequences
**Positive:**
- [Benefit]

**Negative:**
- [Trade-off]

**Risks:**
- [Risk] - Mitigation: [how to handle]

### Implementation
1. [Step]
2. [Step]
```

### 2. Complete Tech Stack

Create a comprehensive technology stack that integrates:
- **Backend**: Services/languages
- **API**: GraphQL gateway + Apollo Server
- **Database**: PostgreSQL 15 + pglogical replication
- **Caching**: Redis layer strategy
- **Search**: Elasticsearch for full-text search
- **Events**: Event bus for real-time updates
- **Deployment**: Kubernetes manifests (conceptual)
- **CI/CD**: Pipeline stages and tools
- **Observability**: Logging, metrics, tracing
- **Security**: GDPR and SOC 2 compliance

### 3. Deployment Architecture

Diagram and describe:
- **Infrastructure**: VPC, subnets, load balancing
- **Database**: Master-replica topology, backups
- **Application Tiers**: API servers, workers, caches
- **Data Flow**: Request path, replication, event streams
- **Disaster Recovery**: Failover strategy, RTO/RPO targets
- **Scaling**: Horizontal scaling strategy, auto-scaling policies

### 4. Implementation Roadmap

Phases for rolling out this architecture:
- **Phase 1**: Foundation (infrastructure, CI/CD)
- **Phase 2**: Migration (move existing services)
- **Phase 3**: Optimization (caching, monitoring)
- **Phase 4**: Advanced features (multi-region, advanced analytics)

### 5. Team & Operational Plan

Document:
- **Team Structure**: Who owns what
- **Operational Procedures**: Deployment, rollbacks, incident response
- **Training Needs**: Skills to develop
- **On-Call Rotations**: Coverage model
- **Tools & Platforms**: Monitoring, alerting, logging (ELK, Prometheus, etc.)

### 6. Risk Mitigation Strategy

For each identified risk:
- Detection strategy
- Response procedure
- Recovery steps
- Prevention going forward

## Critical Architecture Decisions to Document

### Data Architecture
- How does multi-tenancy work at database level?
- How do we isolate tenant data for GDPR compliance?
- How do analytics queries run without impacting OLTP?
- What's the backup and recovery strategy?

### API Layer
- How does GraphQL gateway route to microservices?
- What caching strategy reduces N+1 problems?
- How do we handle real-time subscriptions at scale?
- How do we document the GraphQL schema for 15 developers?

### Deployment Architecture
- How do we manage 15+ microservices on EKS?
- What service mesh do we use (Istio, Linkerd, none)?
- How do we handle secrets management?
- What's the deployment frequency and rollback strategy?

### Compliance & Security
- Where do we encrypt data (in-transit, at-rest)?
- How do we audit access for SOC 2?
- How do we handle GDPR data deletion requests?
- What role-based access control do we implement?

## Output Structure

Generate output in this order:

1. **Executive Summary** (1-2 pages)
   - Problem statement
   - Solution overview
   - Key benefits

2. **Technology Stack** (detailed component descriptions)

3. **Architecture Decisions (3-5 ADRs)**
   - Database architecture
   - API layer strategy
   - Deployment platform
   - (+ any others critical for success)

4. **System Architecture Diagram** (conceptual description)

5. **Deployment Guide**
   - Step-by-step setup
   - Key commands
   - Verification steps

6. **Operational Runbook**
   - Common operations
   - Troubleshooting
   - Escalation procedures

7. **Risk Register** with mitigations

## Important Guidance

- Be concrete: use actual AWS service names, port numbers, specific tools
- Think operationally: a 15-person team will live with this for years
- Account for growth: Design for 50K concurrent users, not just 10K
- Security-first: Every decision should account for GDPR/SOC 2
- Be pragmatic: Perfect architecture is enemy of shipping

Generate a complete, actionable architecture blueprint that a team can use to build and operate their system.
