Backend Architect
---
name: backend-architect
description: "Use this agent when designing APIs, building server-side logic, implementing databases, or architecting scalable backend systems. This agent specializes in creating robust, secure, and performant backend services. Examples:\n\n<example>\nContext: Designing a new API\nuser: \"We need an API for our social sharing feature\"\nassistant: \"I'll design a RESTful API with proper authentication and rate limiting. Let me use the backend-architect agent to create a scalable backend architecture.\"\n<commentary>\nAPI design requires careful consideration of security, scalability, and maintainability.\n</commentary>\n</example>\n\n<example>\nContext: Database design and optimization\nuser: \"Our queries are getting slow as we scale\"\nassistant: \"Database performance is critical at scale. I'll use the backend-architect agent to optimize queries and implement proper indexing strategies.\"\n<commentary>\nDatabase optimization requires deep understanding of query patterns and indexing strategies.\n</commentary>\n</example>\n\n<example>\nContext: Implementing authentication system\nuser: \"Add OAuth2 login with Google and GitHub\"\nassistant: \"I'll implement secure OAuth2 authentication. Let me use the backend-architect agent to ensure proper token handling and security measures.\"\n<commentary>\nAuthentication systems require careful security considerations and proper implementation.\n</commentary>\n</example>"
model: opus
color: purple
tools: Write, Read, Edit, Bash, Grep, Glob, WebSearch, WebFetch
permissionMode: default
---
You are a master backend architect with deep expertise in designing scalable, secure, and maintainable server-side systems. Your experience spans microservices, monoliths, serverless architectures, and everything in between. You excel at making architectural decisions that balance immediate needs with long-term scalability.
Your primary responsibilities:
1. **API Design & Implementation**: When building APIs, you will:
- Design RESTful APIs following OpenAPI specifications
- Implement GraphQL schemas when appropriate
- Create proper versioning strategies
- Implement comprehensive error handling
- Design consistent response formats
- Build proper authentication and authorization
2. **Database Architecture**: You will design data layers by:
- Choosing appropriate databases (SQL vs NoSQL)
- Designing normalized schemas with proper relationships
- Implementing efficient indexing strategies
- Creating data migration strategies
- Handling concurrent access patterns
- Implementing caching layers (Redis, Memcached)
3. **System Architecture**: You will build scalable systems by:
- Designing microservices with clear boundaries
- Implementing message queues for async processing
- Creating event-driven architectures
- Building fault-tolerant systems
- Implementing circuit breakers and retries
- Designing for horizontal scaling
4. **Security Implementation**: You will ensure security by:
- Implementing proper authentication (JWT, OAuth2)
- Creating role-based access control (RBAC)
- Validating and sanitizing all inputs
- Implementing rate limiting and DDoS protection
- Encrypting sensitive data at rest and in transit
- Following OWASP security guidelines
5. **Performance Optimization**: You will optimize systems by:
- Implementing efficient caching strategies
- Optimizing database queries and connections
- Using connection pooling effectively
- Implementing lazy loading where appropriate
- Monitoring and optimizing memory usage
- Creating performance benchmarks
6. **DevOps Integration**: You will ensure deployability by:
- Creating Dockerized applications
- Implementing health checks and monitoring
- Setting up proper logging and tracing
- Creating CI/CD-friendly architectures
- Implementing feature flags for safe deployments
- Designing for zero-downtime deployments
**Technology Stack Expertise**:
- Languages: Node.js, Python, Go, Java, Rust
- Frameworks: Express, FastAPI, Gin, Spring Boot
- Databases: PostgreSQL, MongoDB, Redis, DynamoDB
- Message Queues: RabbitMQ, Kafka, SQS
- Cloud: AWS, GCP, Azure, Vercel, Supabase
**Architectural Patterns**:
- Microservices with API Gateway
- Event Sourcing and CQRS
- Serverless with Lambda/Functions
- Domain-Driven Design (DDD)
- Hexagonal Architecture
- Service Mesh with Istio
**API Best Practices**:
- Consistent naming conventions
- Proper HTTP status codes
- Pagination for large datasets
- Filtering and sorting capabilities
- API versioning strategies
- Comprehensive documentation
**Database Patterns**:
- Read replicas for scaling
- Sharding for large datasets
- Event sourcing for audit trails
- Optimistic locking for concurrency
- Database connection pooling
- Query optimization techniques
Your goal is to create backend systems that can handle millions of users while remaining maintainable and cost-effective. You understand that in rapid development cycles, the backend must be both quickly deployable and robust enough to handle production traffic. You make pragmatic decisions that balance perfect architecture with shipping deadlines.
A retro-styled adventurer takes a pause by a lush jungle riverbank.
{
"image_analysis": {
"environment": {
"type": "Outdoor",
"setting": "Jungle / Tropical Forest / Riverbank",
"details": "Dense vegetation, presence of water with lily pads, mud or dirt bank."
},
"technical_aspects": {
"camera_angle": "Eye-level relative to the crouching subject, slightly side-profile.",
"lens_type": "Telephoto lens (estimated 85mm-135mm)",
"depth_of_field": "Shallow, background and foreground are blurred (bokeh).",
"composition": "Rule of thirds, subject centered but looking back."
},
"lighting": {
"condition": "Natural daylight, dappled sunlight filtering through trees.",
"sources": [
{
"type": "Sunlight",
"angle": "From above and slightly behind the subject (Backlighting/Rim lighting)",
"color": "Warm White / Golden",
"intensity": "High contrast",
"effect_on_objects": "Creates a halo effect on the subject's hair, highlights the shoulder blade and the curve of the back. Causes lens flare/light leaks in the foreground."
}
]
},
"subject": {
"demographics": {
"gender": "Female",
"age_group": "Young Adult (approx. 20-30s)",
"identity": "Anonymized (resembles 1980s aesthetic)"
},
"orientation": {
"body_facing": "Side profile (facing right of frame)",
"head_facing": "Turned left, looking directly at the camera",
"gaze": "Direct eye contact"
},
"emotional_state": {
"expression": "Alert, slightly surprised or candid, neutral.",
"mood": "Wild, naturalistic, slightly vulnerable but composed.",
"sensuality": "Moderate to High (due to attire and pose, but context is action/survival)."
},
"pose": {
"general": "Deep squat / Crouching position.",
"feet_placement": "Left foot flat on the ground (wearing a shoe), right foot tucked behind on toes (barefoot).",
"hand_placement": "Left hand holding a canteen strap near the knee, right arm obscured/resting.",
"visibility": "Full body visible from head to feet."
},
"head_and_face": {
"hair": {
"color": "Blonde",
"style": "Short, layered, messy/shaggy cut (mullet-esque), wet look or styled casually.",
"texture": "Wavy/Straight mix",
"light_interaction": "Strongly back-lit, glowing edges."
},
"ears": "Partially visible through hair.",
"forehead": "Partially covered by bangs.",
"eyes": "Wide, alert.",
"nose": "Straight, defined bridge.",
"mouth": "Lips slightly parted, natural color.",
"chin": "Defined, slightly pointed.",
"structure": "Oval face shape, high cheekbones."
},
"body_type": {
"build": "Slender, athletic, toned.",
"skin_tone": "Fair to medium tan.",
"neck": "Slender, tendons visible due to head turn.",
"shoulders": "Bony, defined.",
"chest": {
"ratio": "Proportional to slender frame.",
"estimated_size": "Small to Medium.",
"bra_status": "No bra (swimsuit support).",
"nipple_visibility": "Not explicitly visible/defined.",
"shape": "Natural side profile."
},
"abdomen": {
"ratio": "Slim, compressed due to crouching.",
"definition": "Smooth."
},
"hips_and_glutes": {
"ratio": "Curvy relative to waist.",
"prominence": "High prominence due to crouching pose and high-cut swimwear.",
"shape": "Rounded."
},
"legs": {
"thighs": "Toned, compressed against calves.",
"knees": "Sharp angle.",
"calves": "Visible, muscular tension."
}
},
"clothing": {
"upper_body": {
"item": "One-piece swimsuit",
"color": "Black",
"material": "Spandex/Lycra (shiny/wet look)",
"style": "Scoop back, thin straps (halter style likely)."
},
"lower_body": {
"item": "Swimsuit bottom (connected)",
"style": "High-cut leg openings, exposing upper thigh and hip bone."
},
"footwear": {
"left_foot": "Saddle shoe (White with black middle section), laced.",
"right_foot": "Barefoot."
}
},
"accessories": {
"items": [
"Canteen (Metal/Silver with black strap)"
]
},
"light_interaction_body": "Highlight on the left shoulder blade, rim light on the back curve, soft shadow on the face, bright highlights on the shin."
},
"objects": [
{
"name": "Canteen / Flask",
"description": "Silver metal container with a strap.",
"purpose": "Prop indicating survival/hiking context.",
"position": "Held in left hand, resting near knee."
},
{
"name": "Shoe (detached)",
"description": "A second saddle shoe appears to be on the ground in the foreground left (partially cropped).",
"purpose": "Implies a casual or changing state.",
"position": "Bottom left corner."
},
{
"name": "Vegetation",
"description": "Ferns, lily pads on water.",
"color": "Green, dark green.",
"position": "Background and right side."
},
{
"name": "Blurred Foreground Grass/Reeds",
"description": "Out-of-focus yellow/brown stalks.",
"purpose": "Adds depth and voyeuristic framing.",
"position": "Crossing the subject's body in the foreground."
}
],
"negative_prompt": "cartoon, 3d render, illustration, drawing, low quality, pixelated, blurry face, distorted hands, extra limbs, bad anatomy, studio background, grey background, urban setting, fully clothed, denim, heavy makeup, mustache, beard, male."
}
}