feat: Integrate Electric SQL for real-time notifications and enhance PostgreSQL configuration

- Added Electric SQL service to docker-compose for real-time data synchronization.
- Introduced PostgreSQL configuration for logical replication and performance tuning.
- Created scripts for initializing Electric SQL user and electrifying tables.
- Implemented notification model and service in the backend.
- Developed ElectricProvider and useNotifications hook in the frontend for managing notifications.
- Updated environment variables and package dependencies for Electric SQL integration.
This commit is contained in:
Anish Sarkar 2026-01-12 12:47:00 +05:30
parent 383592ce63
commit 82c6dd0221
18 changed files with 1844 additions and 6 deletions

View file

@ -0,0 +1,11 @@
-- Electrify tables for Electric SQL sync
-- This tells Electric SQL which tables to sync
-- Run this after running migrations
-- Electrify notifications table
ALTER TABLE notifications ENABLE ELECTRIC;
-- You can electrify other tables as needed:
-- ALTER TABLE documents ENABLE ELECTRIC;
-- ALTER TABLE logs ENABLE ELECTRIC;