A Prisma generator (v1.0.0) that transforms your Postgres database into a realtime database by generating SQL migrations (triggers, functions, publication) and a type-safe Prisma client extension for subscribing to row-level changes. It integrates with Prisma's `$extends` pattern and node-postgres (`pg`) for LISTEN/NOTIFY. Unlike raw pg subscriptions or Supabase Realtime, this keeps everything inside Prisma's type system, generates migrations automatically, and supports per-model filtering via optional config. Release cadence: initial release, active development.
npm install prisma-generator-postgres-realtimeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows full setup: schema generator config, generate+migrate command, and type-safe subscription usage with PrismaClient $extends.
Run: npm install pg
Always run 'prisma migrate dev' after generation to apply new migrations; ensure no manual edits to generated migrations.
Do not delete or ignore prismaRealtimeStatus.json; include it in version control.
Avoid logging entire event object in production; redact dbUser if necessary.
N/A
Install pg: npm install pg
Check schema.prisma for model name; if using includeModels/excludeModels in config, ensure the model is included.
Use: .$extends(prismaRealtimeExtension) — note the function call if applicable (check generated extension structure)