cd /news/ai-products/real-time-apps-using-postbase-think-… · home topics ai-products article
[ARTICLE · art-22117] src=umrashrf.github.io pub= topic=ai-products verified=true sentiment=↑ positive

Real-Time Apps using Postbase (think Chat, Live Location Updates, Event Based) which uses Postgres pg_notify with WebSockets

A developer integrated live location updates into a two-sided marketplace app using Postbase, an open-source tool that combines Postgres pg_notify with WebSockets to enable real-time features like chat and event-based updates. The implementation uses onSnapshot() and add() functions to sync location data between users, replacing vendor-locked Firebase with self-hosted infrastructure running on Express.js, Node.js, and Nginx.

read1 min publishedJun 3, 2026

by a human - no AI was used

I just integrated live location updates in a two-sided marketplace app using Postbase and it’s so satisfying to watch the location updates just go through from one user to another in real-time! Knowing so many different parts are working all together behind the scenes to make that happen.

That is, Postgres < pg_notify < Web Sockets < Express.js/Node.js < Postbase < Nginx.

All you need is onSnapshot() function #

db.collection('location_updates')
    .where('datetime', '>=', Timestamp.now())
    .onSnapshot(location_docs => {
        update_ui(location_docs);
    });

And .add() function #

await db.collection('location_updates')
        .add({ latitude, longitude, heading, zoom });

Not to mention the Database Migrations using node-pg-migrate, the serializing and deserializing of JavaScript to SQL using Postbase integrating Web Sockets with them and making them run over HTTP using Nginx rewrites! And to put it in a user interface using React/Preact app.

Before Postbase, I was using Firebase which is a great product by Google but it is vendor locked. With the invention of Postbase, I am using it for all my open source and commercial projects and it feels really good to own your infrastructure and data. Postbase is also open source! So anyone can grab the copy and run their own infra on it.

Know what is Postbase? Find the link and post in the comments below. The right link will get a like and wrong link will get crickets.

── more in #ai-products 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/real-time-apps-using…] indexed:0 read:1min 2026-06-03 ·