projection-patterns

Create read models and projections from event streams in Python.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/drgaciw/academic-compliance-hub-glm --skill projection-patterns-drgaciw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: projection-patterns
Source: https://github.com/drgaciw/academic-compliance-hub-glm/tree/main/agents/plugins/backend-development/skills/projection-patterns
Command: npx skills add https://github.com/drgaciw/academic-compliance-hub-glm --skill projection-patterns-drgaciw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires asyncpg, elasticsearch, and includes references (resource) components.

What problem does it solve?

This Skill provides a structured approach to building efficient read models and projections from event streams, crucial for optimizing query performance in event-sourced systems.

Core Features & Use Cases

  • CQRS Read Models: Implement the read side of Command Query Responsibility Segregation.
  • Materialized Views: Create and maintain denormalized views of data for faster querying.
  • Real-time Dashboards: Power live dashboards by projecting events into queryable formats.
  • Search Indexing: Populate search engines like Elasticsearch with relevant data from events.

Quick Start

Use the projection-patterns skill to create a basic projector that handles OrderCreated and OrderCompleted events.

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 Python?

You build read models from event streams by using projection templates that handle event data and populate queryable data stores like PostgreSQL or Elasticsearch. This Skill provides structured templates for creating live, catchup, persistent, and inline projectors.

What is the best way to implement CQRS read side projections?

The best way to implement CQRS read side projections is to use structured projector patterns that process event streams and populate denormalized materialized views. This Skill provides templates for various data stores to optimize query performance.

Does this projection approach work with Elasticsearch and PostgreSQL?

Yes, this projection approach works with Elasticsearch and PostgreSQL by providing specific templates for both data stores. You can populate search engines or relational databases based on your event-driven architecture requirements.

How do I create real-time dashboards using event sourcing projections?

You create real-time dashboards by configuring live projections that continuously process event streams and update queryable formats. This ensures your dashboard reflects the latest state by projecting events into optimized read models.

What are the differences between live, catchup, and persistent projections?

Live projections process events in real-time, catchup projections rebuild read models from historical event streams, and persistent projections maintain state continuously. This Skill implements these patterns to address various event-driven architecture needs.

When should I not use inline projections in an event-driven architecture?

You should avoid inline projections when query performance optimization requires decoupled processing, as inline projections process events within the write operation. For scalable event-sourced systems, persistent or catchup projections offer better isolation.