projection-patterns

Create read models and projections from event streams for event-sourced systems.

2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/yashvinthan/DuskSpendr --skill projection-patterns-yashvinthan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: projection-patterns
Source: https://github.com/yashvinthan/DuskSpendr/tree/main/.agents/skills/projection-patterns
Command: npx skills add https://github.com/yashvinthan/DuskSpendr --skill projection-patterns-yashvinthan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of efficiently building and maintaining read models and projections from event streams, crucial for optimizing query performance in event-sourced systems.

Core Features & Use Cases

  • CQRS Read Sides: Implement the read side of Command Query Responsibility Segregation.
  • Materialized Views: Create and update denormalized views of data for faster querying.
  • Performance Optimization: Improve query speed by pre-calculating and storing aggregated data.
  • Use Case: When building a dashboard that displays real-time order summaries, this Skill can process OrderCreated and OrderCompleted events to maintain an up-to-date summary table.

Quick Start

Use the projection-patterns skill to build a live projection for order summaries.

Frequently Asked Questions about projection-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build read models from event streams in a CQRS architecture?

You can build read models from event streams by applying transformations to event types, such as OrderCreated, to update materialized views or database tables for optimized query performance. This Skill facilitates creating those CQRS read sides.

What is the best way to optimize query performance for event-sourced systems?

Optimizing query performance in event-sourced systems involves creating projections that pre-calculate and store aggregated data. This Skill generates denormalized materialized views from event streams, enabling faster querying without replaying the entire event log.

What projection patterns are available for processing event streams?

Available projection patterns for processing event streams include live, catchup, and persistent projections. These patterns handle event types and apply transformations to update read models, accommodating various data consistency and synchronization requirements.

Can I use projections to maintain real-time summary tables for dashboards?

Yes, you can maintain real-time summary tables for dashboards by processing events like OrderCreated and OrderCompleted. This Skill applies transformations to update read models, keeping aggregated dashboard data up-to-date through live projections.

Do I need a separate database to store materialized views created from event streams?

Creating materialized views from event streams often involves database interactions or search index updates to store the read models. You need a destination data store to persist the denormalized views generated by the projection transformations.

When should I avoid using projections for CQRS read sides?

You should avoid using projections when your system cannot handle eventual consistency between the event stream and the read model. Building read models requires applying transformations to events, meaning the materialized views may lag behind the source event stream.