Use when adding a common architecture pattern such as an external integration, queue/worker flow, caching layer, webhook callback, or standard web/API/data stack and you need a safe LikeC4 starting structure.
Give a safe starter structure quickly, then tell the user what to substitute with the exact kinds and names from the active workspace.
These are starter scaffolds, not copy-paste truth.
lookup-element-kindscreate-elementcreate-relationshipparent, exact kinds, names, tech)| Pattern | Minimal relationship shape |
|---|---|
| External integration | api -[calls]-> externalService |
| Async queue/worker | api -[async]-> queue + worker -[async]-> queue |
| Cache + source of truth | api -[reads]-> cache + api -[reads]-> database |
| Web/API/data stack | webapp -[calls]-> api + api -[reads/writes]-> database |
| Notification flow | api -[async]-> queue + worker -[calls]-> provider |
externalService = System_External 'Third-Party API' {
technology 'HTTPS API'
description 'External service used by the platform.'
}
api -[calls]-> externalService 'Processes request' {
technology 'HTTPS'
}
queue = Container_Queue 'Job Queue' {
technology 'RabbitMQ'
description 'Buffers asynchronous work.'
}
api -[async]-> queue 'Publishes job' {
technology 'AMQP'
}
worker -[async]-> queue 'Consumes job' {
technology 'AMQP'
}
cache = Container 'Redis Cache' {
technology 'Redis'
description 'Hot-data cache.'
}
api -[reads]-> cache 'Checks cache'
api -[reads]-> database 'Fetches on cache miss'
api -[writes]-> cache 'Refreshes cache'
api -[writes]-> database 'Persists source-of-truth changes'
Use a more specific declared cache/container kind if the workspace provides one.
webapp = Container_Webapp 'Web App' {
technology 'React'
description 'User interface.'
}
api = Container_Api 'API' {
technology 'Node.js'
description 'Business logic.'
}
database = Container_Database 'Database' {
technology 'PostgreSQL'
description 'Canonical data store.'
}
webapp -[calls]-> api 'Sends API requests'
api -[reads]-> database 'Queries data'
api -[writes]-> database 'Persists changes'
notificationQueue = Container_Queue 'Notification Queue' {
technology 'RabbitMQ'
description 'Queues outbound notifications.'
}
notificationWorker = Container 'Notification Worker' {
technology 'Worker runtime'
description 'Delivers queued notifications.'
}
provider = System_External 'Notification Provider' {
technology 'HTTPS API'
description 'External delivery provider.'
}
api -[async]-> notificationQueue 'Publishes notification job' {
technology 'AMQP'
}
notificationWorker -[async]-> notificationQueue 'Consumes notification job' {
technology 'AMQP'
}
notificationWorker -[calls]-> provider 'Delivers notification' {
technology 'HTTPS'
}
create-sequence-viewUse the local shared specs and model files to choose the nearest declared kinds, then provide the scaffold immediately. List the exact substitutions to verify later when tooling is back.
lookup-element-kindscreate-elementcreate-relationshipcreate-sequence-view