Prompt Details
Model
Chat - (gpt-5.6)
Token size
393
Example input
[INSERT YOUR PRODUCT TYPE, e.g., B2B SaaS / Autonomous AI Agent / Healthcare Platform]: B2B SaaS Enterprise CRM & Analytics Platform
[INSERT YOUR PREFERRED TECH STACK, e.g., Python, React, PostgreSQL, Docker, AWS]: Node.js, React, PostgreSQL, Docker, AWS
[INSERT TARGET USERS & SCALE, e.g., 50k Concurrent Users, Enterprise Clients]: 100k Concurrent Users
[INSERT COMPLIANCE REQUIREMENT, e.g., SOC2 Type II, GDPR, HIPAA, No-Log Policy]: SOC2 Type II and GDPR Compliant
Example output
# Production-Grade 10-Layer Enterprise Architecture
## B2B SaaS Enterprise CRM & Analytics Platform
### Scale Target: 100K Concurrent Users
### Tech Stack: Node.js + React + PostgreSQL + Docker + AWS
### Compliance: SOC2 Type II + GDPR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 1 — User Interface & Frontend Architecture
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Purpose
Deliver a highly scalable, responsive, secure enterprise UI.
Best-Fit Technologies
• React 19
• Next.js
• TypeScript
• Redux Toolkit / Zustand
• React Query (TanStack Query)
• Tailwind CSS
• Material UI
• AWS CloudFront
• Amazon S3
• Nginx
• WebSockets
• Service Workers
• PWA
Architecture Pattern
• Component-Based Architecture
• Micro Frontend (Module Federation)
• Atomic Design
• BFF (Backend For Frontend)
• CSR + SSR Hybrid
• Lazy Loading
• Code Splitting
Frontend Flow
User
↓
CloudFront CDN
↓
React Application
↓
API Gateway
↓
Backend Services
High Risk Bottlenecks
1. Large Bundle Size
Mitigation
• Lazy Loading
• Dynamic Imports
• Tree Shaking
2. API Overfetching
Mitigation
• GraphQL
• React Query Cache
3. High Traffic
Mitigation
• CDN
• Browser Cache
• Edge Caching
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 2 — API Gateway, Rate Limiting & Edge Security
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best Technologies
• AWS API Gateway
• AWS WAF
• AWS Shield
• CloudFront
• Kong Gateway
• Nginx
• Envoy Proxy
Design Pattern
• API Gateway Pattern
• Reverse Proxy
• Circuit Breaker
• Retry Pattern
• Token Bucket Rate Limiter
Architecture
Client
↓
CloudFront
↓
AWS WAF
↓
API Gateway
↓
Microservices
↓
Database
Security Controls
• JWT Validation
• OAuth2
• Request Validation
• IP Whitelisting
• Geo Blocking
• DDoS Protection
• Bot Protection
High Risk Bottlenecks
Gateway Overload
Mitigation
• Horizontal Auto Scaling
• Load Balancer
• Cache Frequently Requested APIs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 3 — Application & Microservices Business Logic
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Microservices
• Authentication
• CRM
• Leads
• Customers
• Sales Pipeline
• Billing
• Analytics
• Notifications
• Reports
• Admin
• Audit Logs
Technologies
• Node.js
• Express.js
• NestJS
• Docker
• Kubernetes (EKS)
• Redis
• gRPC
• REST APIs
Patterns
• Domain Driven Design
• Event Driven Architecture
• CQRS
• Saga Pattern
• Clean Architecture
• Hexagonal Architecture
Communication
External → REST
Internal → gRPC
Async → Kafka
High Risk Bottlenecks
Database Coupling
Mitigation
Database Per Service
Slow APIs
Mitigation
Redis Cache
Circuit Breaker
Bulkhead Pattern
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 4 — AI Engine, LLM Orchestration & RAG Pipeline
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Capabilities
• AI CRM Assistant
• Lead Scoring
• Sales Prediction
• Customer Insights
• Document Q&A
• AI Report Generator
Technologies
• LangChain
• LlamaIndex
• OpenAI GPT
• Anthropic Claude
• AWS Bedrock
• Redis
• pgvector
• PostgreSQL
• Python AI Workers
RAG Pipeline
Documents
↓
Chunking
↓
Embedding
↓
Vector Database
↓
Retriever
↓
LLM
↓
Response
Patterns
• Retrieval Augmented Generation
• AI Agent Workflow
• Prompt Templates
• Function Calling
• Tool Calling
High Risk Bottlenecks
Large Context Window
Mitigation
Semantic Search
Top-K Retrieval
Embedding Drift
Mitigation
Scheduled Re-Embedding
Model Latency
Mitigation
Response Cache
Streaming Responses
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 5 — Real-Time Data Streaming & Message Queues
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technologies
• Apache Kafka
• RabbitMQ
• AWS SQS
• AWS SNS
• Redis Streams
• Socket.IO
Use Cases
• Notifications
• Emails
• CRM Events
• Audit Logs
• Analytics
• AI Jobs
Patterns
• Event Driven
• Publish Subscribe
• Event Sourcing
• Message Queue
• Dead Letter Queue
Architecture
Service
↓
Kafka
↓
Consumers
↓
Analytics
↓
AI
↓
Notifications
High Risk Bottlenecks
Queue Backlog
Mitigation
Consumer Auto Scaling
Dead Letter Queue
Duplicate Messages
Mitigation
Idempotency Keys
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 6 — Multi-Tier Database & Vector Storage Architecture
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Primary Database
PostgreSQL
Read Replica
↓
Redis Cache
↓
ElasticSearch
↓
pgvector
↓
S3 Archive
Technologies
• PostgreSQL
• Redis
• pgvector
• Elasticsearch / OpenSearch
• Amazon S3
Patterns
• Read Replica
• Database Sharding
• Partitioning
• CQRS
• Polyglot Persistence
Data Storage
Transactional Data
→ PostgreSQL
Cache
→ Redis
Search
→ OpenSearch
AI Embeddings
→ pgvector
Files
→ Amazon S3
High Risk Bottlenecks
Database Locking
Mitigation
Connection Pooling
Read Replicas
Large Queries
Mitigation
Indexes
Partitioning
Caching
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 7 — Identity, IAM & Enterprise Security Controls
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technologies
• AWS Cognito
• Keycloak
• AWS IAM
• JWT
• OAuth2
• OpenID Connect
• AWS Secrets Manager
• AWS KMS
• HashiCorp Vault
Security Features
• MFA
• RBAC
• ABAC
• SSO
• Session Management
• Device Trust
• IP Restriction
Compliance
SOC2 Type II
GDPR
Encryption
TLS 1.3
AES-256
Audit Logs
Immutable Logs
High Risk Bottlenecks
Credential Theft
Mitigation
MFA
Passwordless Login
Secret Leakage
Mitigation
Vault
Secrets Manager
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 8 — End-to-End Observability, Metrics & Telemetry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technologies
• Prometheus
• Grafana
• Loki
• ELK Stack
• OpenTelemetry
• Jaeger
• AWS CloudWatch
Metrics
CPU
Memory
Latency
Throughput
Error Rate
AI Token Usage
Queue Size
Database Health
Patterns
• Centralized Logging
• Distributed Tracing
• Metrics Collection
• Alerting
High Risk Bottlenecks
Log Explosion
Mitigation
Log Sampling
Retention Policies
Alert Fatigue
Mitigation
Severity-Based Alerts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 9 — DevOps, Containerization & CI/CD Infrastructure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technologies
• Docker
• Kubernetes (Amazon EKS)
• GitHub Actions
• ArgoCD
• Terraform
• Helm
• AWS ECR
Pipeline
Developer
↓
GitHub
↓
CI
↓
Docker Build
↓
Image Scan
↓
ECR
↓
ArgoCD
↓
Kubernetes
↓
Production
Patterns
• GitOps
• Blue Green Deployment
• Canary Release
• Infrastructure as Code
• Immutable Infrastructure
High Risk Bottlenecks
Failed Deployment
Mitigation
Automatic Rollback
Health Checks
Configuration Drift
Mitigation
Terraform
GitOps
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LAYER 10 — Disaster Recovery, SLA Management & Cost Optimization
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Disaster Recovery
• Multi-AZ Deployment
• Cross-Region Backup
• Automated Snapshots
• Point-In-Time Recovery
• Database Replication
AWS Services
• Route53
• Backup
• S3 Versioning
• RDS Multi-AZ
• EKS Multi-AZ
SLA Targets
Availability
99.95%+
RTO
< 30 Minutes
RPO
< 5 Minutes
Auto Scaling
CPU Based
Memory Based
Custom Metrics
Cost Optimization
• Spot Instances
• Reserved Instances
• Auto Scaling
• S3 Lifecycle
• CloudFront Caching
• Compute Savings Plans
• Redis Cache
• Right Sizing
High Risk Bottlenecks
Region Failure
Mitigation
Cross-Region Failover
Backup Corruption
Mitigation
Immutable Backups
Regular DR Drills
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OVERALL PRODUCTION ARCHITECTURE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Users
│
▼
CloudFront CDN
│
AWS WAF + Shield
│
API Gateway
│
Load Balancer
│
──────────────────────────────────────────────
Microservices (Node.js / NestJS)
──────────────────────────────────────────────
│ Auth │ CRM │ Billing │ Analytics │ AI │
│ Reports │ Notifications │ Audit │
──────────────────────────────────────────────
│
Kafka / RabbitMQ / Redis Streams
│
──────────────────────────────────────────────
Redis Cache
PostgreSQL Cluster
Read Replicas
OpenSearch
pgvector
Amazon S3
──────────────────────────────────────────────
│
OpenTelemetry
Prometheus
Grafana
CloudWatch
Loki
Jaeger
──────────────────────────────────────────────
Docker
Amazon EKS
GitHub Actions
ArgoCD
Terraform
──────────────────────────────────────────────
Multi-AZ + Cross-Region Disaster Recovery
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
KEY PRODUCTION CHARACTERISTICS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Supports 100,000+ Concurrent Users
• Horizontally Scalable Microservices
• High Availability (99.95%+ SLA)
• SOC2 Type II Ready
• GDPR Compliant
• Zero-Trust Security Model
• AI-Native with RAG & LLM Orchestration
• Event-Driven Architecture
• Kubernetes-Based Deployment
• Fully Observable with OpenTelemetry
• Automated CI/CD & GitOps
• Multi-AZ + Cross-Region Disaster Recovery
• Cost-Optimized AWS Infrastructure
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Generates a complete, production-grade 10-layer enterprise architecture framework for SaaS, AI agents, and platforms. Covers UI, APIs, AI/RAG, Databases, Security, and DevOps.
...more
Added 2 days ago
