klaviyo-reference-architecture
Installation
SKILL.md
Klaviyo Reference Architecture
Overview
Production-ready architecture for Klaviyo integrations: a layered project structure, service patterns, event-driven sync, and the klaviyo-api SDK wired into a real application. SKILL.md gives you the four-layer contract and the skeleton you scaffold from; the deep material lives in references/ so you pull code only when you reach that layer.
- Layout & layering (full directory tree, layer contract, data flow): architecture.md
- Working code for every layer (config, profile sync, event tracker): implementation.md
Prerequisites
- TypeScript project with
klaviyo-apiinstalled - Understanding of layered architecture
- Redis (for caching/queuing) and database (for audit/sync state)
Instructions
Use Write to scaffold the directory tree, then fill each layer bottom-up. The four layers and their one-way call rule: