- Home
- Skills
- APIs & Backend
- Backend Architect Scalable APIs
Works with the AI Agents you already use
Backend Architect Scalable APIs
Production-ready backend system architect skill for scalable API design, microservices boundaries, distributed transaction patterns, and resilience engineering.
$6.99
Backend Architect Scalable APIs
Example session with this skill installed
Design the backend service boundaries, database schema, and idempotent order placement API endpoint for a high-volume flash-sale e-commerce platform handling 10,000 requests per second.
- Read your context and instructions
- Compiled the backend architect scalable
Flash-Sale Backend Architecture Spec
1. Architectural Strategy & Boundary Definition
- Order Processing Service: Decoupled from payment execution via transactional outbox pattern.
- Inventory Allocation Engine: Redis cluster with Lua scripting for atomic stock decrements.
- Database: PostgreSQL with row-level locks avoided via optimistic locking and Redis token buckets.
2. Idempotent Order API Contract
POST /api/v1/orders
Idempotency-Key: 7b2d5f84-18e3-4c92-a1f9-9134a62e08a1
Content-Type: application/json
{
"user_id": "usr_99812",
"item_id": "itm_flash_rtx5090",
"quantity": 1,
"max_price_cents": 159900
}
3. High-Throughput TypeScript Implementation
import { Request, Response } from 'express';
import { redisClient, dbPool } from './infrastructure';
export async function placeOrderHandler(req: Request, res: Response) {
const idempotencyKey = req.header('Idempotency-Key');
if (!idempotencyKey) {
return res.status(400).json({ error: 'Missing Idempotency-Key header' });
}
const cachedResponse = await redisClient.get(`idemp:${idempotencyKey}`);
if (cachedResponse) {
return res.status(200).json(JSON.parse(cachedResponse));
}
const { user_id, item_id, quantity, max_price_cents } = req.body;
const luaDeductStock = `
local current = redis.call('GET', KEYS[1])
if not current or tonumber(current) < tonumber(ARGV[1]) then
return -1
end
return redis.call('DECRBY', KEYS[1], ARGV[1])
`;
const remainingStock = await redisClient.eval(luaDeductStock, 1, `stock:${item_id}`, quantity);
if (remainingStock === -1) {
return res.status(409).json({ error: 'Item sold out or insufficient stock' });
}
const client = await dbPool.connect();
try {
await client.query('BEGIN');
const orderResult = await client.query(
`INSERT INTO orders (id, user_id, item_id, quantity, status, created_at)
VALUES (gen_random_uuid(), $1, $2, $3, 'PENDING_PAYMENT', NOW())
RETURNING id, status, created_at`,
[user_id, item_id, quantity]
);
const order = orderResult.rows[0];
await client.query(
`INSERT INTO outbox_events (event_type, payload)
VALUES ('OrderCreated', $1)`,
[JSON.stringify({ order_id: order.id, user_id, amount_cents: max_price_cents })]
);
await client.query('COMMIT');
const responsePayload = { order_id: order.id, status: order.status };
await redisClient.setex(`idemp:${idempotencyKey}`, 86400, JSON.stringify(responsePayload));
return res.status(201).json(responsePayload);
} catch (err) {
await client.query('ROLLBACK');
await redisClient.incrby(`stock:${item_id}`, quantity);
return res.status(500).json({ error: 'Internal order placement failure' });
} finally {
client.release();
}
}
Connects securely to your tools. The creator never sees your data.
About this skill
Backend systems often fail under load or become unmaintainable due to tangled service boundaries and fragile API contracts. This skill provides the architectural rigor needed to design scalable, resilient distributed systems from day one. It focuses on practical implementation details like circuit breakers, event-driven patterns, and observability rather than just abstract diagrams.
What it does
- API Design: Creates detailed REST, GraphQL, or gRPC contracts with versioning, pagination, and HATEOAS controls.
- Service Orchestration: Defines microservice boundaries using Domain-Driven Design and plans inter-service communication.
- Resilience Engineering: Implements fault-tolerance patterns including circuit breakers, retries with jitter, and bulkhead isolation.
- Event-Driven Architecture: Designs message-driven systems using Kafka, RabbitMQ, or Pub/Sub with exactly-once delivery guarantees.
- Security & Auth: Architectures OAuth 2.0, OIDC, and mTLS flows alongside rate limiting and zero-trust policies.
How it works
- Requirements Gathering: You provide the business domain, scale expectations, and non-functional requirements.
- System Decomposition: The agent defines service boundaries, bounded contexts, and data ownership.
- Contract Definition: It generates OpenAPI specs, GraphQL schemas, or Protobuf definitions.
- Resilience & Observability Planning: The agent specifies the monitoring, logging, and fault-tolerance stack for the proposed services.
Frameworks & tools
Expertise across Node.js (NestJS), Python (FastAPI), Go, and Java (Spring Boot). Specialized in distributed tools like Redis, Kafka, Kubernetes, and OpenTelemetry.
Why this beats prompting it yourself
Generic prompts often miss critical distributed system pitfalls like split-brain scenarios or cascading failures. This skill enforces Architectural Decision Records (ADRs) and ensures every design includes concrete resilience and observability patterns that most LLMs ignore by default.
Use cases
- Migrating a monolithic application to microservices using the Strangler pattern.
- Designing a high-throughput webhook delivery system with signature verification and idempotency.
- Architecting a real-time collaborative platform using WebSockets and Redis Pub/Sub.
- Building a multi-tenant SaaS backend with complex RBAC/ABAC requirements.
Known limitations
Does not perform low-level code bug fixes or frontend/UX design. Database schema design is deferred to specialized data architects.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Does not perform low-level code bug fixes or frontend/UX design. Database schema design is deferred to specialized data architects.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 7 days ago