Production-grade architectural patterns for Linear integrations. Covers simple, service-oriented, event-driven, and CQRS architectures.
| Pattern | Best For | Complexity |
|---|---|---|
| Simple Integration | Small teams, single app | Low |
| Service-Oriented | Medium teams, multiple apps | Medium |
| Event-Driven | Large teams, real-time needs | High |
| CQRS + Event Sourcing | Complex domains, audit needs | Very High |
See detailed implementation for full code examples of all four architecture patterns plus project structure.
| Error | Cause | Solution |
|---|---|---|
| Rate limit exceeded | Too many API calls | Implement gateway with rate limiter |
| Stale cache | TTL too long | Invalidate on webhook events |
| Event loss | Webhook failures | Use message queue with retries |
| Schema drift | API version changes | Pin SDK version, test upgrades |
import { LinearClient } from "@linear/sdk";
const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY! });
const teams = await client.teams();
console.log(teams.nodes.map(t => t.name));
Configure multi-environment setup with linear-multi-env-setup.