API gateway with microservices
Edge API gateway routing to a microservice fleet with shared identity, async messaging, and per-service databases.
The prompt
API gateway architecture for a microservices system. Edge: CloudFront and WAF route to an API Gateway. The gateway authenticates requests via a shared identity service (OAuth/OIDC). Behind the gateway: five microservices — users, products, orders, payments, notifications. Each service has its own database (database-per-service pattern): users in PostgreSQL, products in DynamoDB, orders in PostgreSQL, payments in PostgreSQL with PCI scope, notifications stateless. Services communicate synchronously via REST through service discovery, and asynchronously via Kafka topics. Show the BFF (backend-for-frontend) pattern with separate gateways for web and mobile.
What it generates
A diagram showing the edge, gateway, identity service, microservice fleet, per-service databases, and messaging backbone.
When to use it
When designing or documenting a microservices system from scratch — captures the canonical pattern before specialising.
Generate this diagram in seconds
Copy the prompt above, sign in for free, and paste it into the generator.
Related microservices templates
Saga pattern (orchestration)
Orchestrator-coordinated saga with compensating actions for a multi-service order placement transaction.
Event sourcing + CQRS
Event-sourced write side with append-only event store, plus separate read models materialised from event stream.
Strangler fig monolith migration
Gradual migration from monolith to microservices using an API gateway to route traffic to new services as they're built.