LogoClawIndex
CasesSkillsAbout
LogoClawIndex

state-view-slice - Build State View Slices from Event Models

Creates read model projections that consume events and project them into queryable PostgreSQL database tables.

Tags

Updated: 2026-06-30

Capabilities

Typical Inputs

Typical Outputs

What this skill does

  • create projection handler file
  • create database migration file
  • create query API endpoint
  • write projection tests
  • register projection in event store
  • generate slice JSON metadata
  • perform upsert on conflict
  • update database records
  • delete database records

Inputs

  • Event model definitions
  • Event types
  • PostgreSQL connection string
  • Supabase client
  • Slice configuration

Outputs

  • Projection handler TypeScript files
  • Database migration SQL files
  • Query API route files
  • Projection test files
  • Slice JSON metadata file
  • Queryable database tables

Requirements

  • PostgreSQL database
  • Node.js runtime
  • Knex.js library
  • @event-driven-io/emmett-postgresql package
  • @testcontainers/postgresql for testing
  • Flyway for database migrations
  • Express.js for API routes
  • Supabase client
  • All database tables must include restaurant_id column

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.
event sourcing
read model
projection
PostgreSQL
CQRS
Supabase
database migration
state view
create projection handler file
create database migration file
create query API endpoint
write projection tests
Event model definitions
Event types
PostgreSQL connection string
Projection handler TypeScript files
Database migration SQL files
Query API route files