Bolt realtime

Live Notifications Not Working in Bolt App

Your Bolt.new application has a notification system that stores notifications in the database, but users only see them after refreshing the page. The notification bell or badge doesn't update in real-time, so users miss time-sensitive alerts like new orders, messages, or system warnings.

Live notifications are essential for any interactive application. When a user receives a new message, a buyer places an order, or a system event requires attention, the user needs to know immediately without manually checking. A notification system that requires page refreshes defeats its entire purpose.

Bolt typically generates the notification storage and display components but misses the real-time delivery mechanism. The notifications exist in the database but the frontend has no way to know about new ones until it re-fetches the list.

Error Messages You Might See

Realtime subscription error: table not in publication TypeError: Cannot read property 'length' of undefined (notification list) Channel subscription timeout Error: notification_changes channel already exists
Realtime subscription error: table not in publicationTypeError: Cannot read property 'length' of undefined (notification list)Channel subscription timeoutError: notification_changes channel already exists

Common Causes

  • Polling not implemented — No mechanism to periodically check for new notifications or receive them in real-time
  • Supabase Realtime subscription missing — Notifications are stored in a table but there's no subscription listening for new inserts
  • Notification count not updating — The badge shows the count from initial page load and never recalculates when new notifications arrive
  • Global state not connected — The notification listener runs in one component but the badge count is managed in a separate component without shared state
  • User filter not applied — The Realtime subscription listens for all notifications instead of filtering for the current user's notifications

How to Fix It

  1. Create a notification provider — Build a React context that wraps your app and manages notification state globally, so all components can access the notification count and list
  2. Subscribe to user-specific notifications — Add a Realtime subscription filtered to the current user: supabase.channel('notifications').on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'notifications', filter: `user_id=eq.${userId}` }, handleNewNotification).subscribe()
  3. Update badge count reactively — When a new notification arrives, increment the unread count: setUnreadCount(prev => prev + 1) and add the notification to the list
  4. Show toast for important notifications — Display a temporary toast notification for high-priority items using a library like react-hot-toast or sonner
  5. Mark as read on view — When the user opens the notification panel, mark visible notifications as read: await supabase.from('notifications').update({ read: true }).eq('user_id', userId).eq('read', false)

Real developers can help you.

Bastien Labelle Bastien Labelle Full stack dev w/ 20+ years of experience Basel Issmail Basel Issmail ’m a Senior Full-Stack Developer and Tech Lead with experience designing and building scalable web platforms. I work across the full development lifecycle, from translating business requirements into technical architecture to delivering reliable production systems. My work focuses on modern web technologies, including TypeScript, Angular, Node.js, and cloud-based architectures. I enjoy solving complex technical problems and helping teams turn product ideas and prototypes into working platforms that can grow and scale. In addition to development, I often collaborate closely with product managers, business analysts, designers, and QA teams to ensure that solutions align with both technical and business goals. I enjoy working with startups and product teams where I can contribute both as a hands-on engineer and as a technical partner in designing and delivering impactful software. Simon A. Simon A. I'm a backend developer building APIs, emulators, and interactive game systems. Professionally, I've developed Java/Spring reporting solutions, managed relational and NoSQL databases, and implemented CI/CD workflows. Krishna Sai Kuncha Krishna Sai Kuncha Experienced Professional Full stack Developer with 8+ years of experience across react, python, js, ts, golang and react-native. Developed inhouse websearch tooling for AI before websearch was solved : ) Matthew Jordan Matthew Jordan I've been working at a large software company named Kainos for 2 years, and mainly specialise in Platform Engineering. I regularly enjoy working on software products outside of work, and I'm a huge fan of game development using Unity. I personally enjoy Python & C# in my spare time, but I also specialise in multiple different platform-related technologies from my day job. Nam Tran Nam Tran 10 years as fullstack developer prajwalfullstack prajwalfullstack Hi Im a full stack developer, a vibe coded MVP to Market ready product, I'm here to help Omar Faruk Omar Faruk As a Product Engineer at Klasio, I contributed to end-to-end product development, focusing on scalability, performance, and user experience. My work spanned building and refining core features, developing dynamic website templates, integrating secure and reliable payment gateways, and optimizing the overall system architecture. I played a key role in creating a scalable and maintainable platform to support educators and learners globally. I'm enthusiastic about embracing new challenges and making meaningful contributions. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. hanson1014 hanson1014 Full-stack developer experienced in fixing and deploying AI-generated apps from Lovable, Bolt.new, Cursor, and Replit. I specialize in debugging Supabase integration issues (auth flows, RLS policies, database connections), fixing broken deployments, resolving routing/blank screen problems, and cleaning up messy React/Vite codebases. I also build production apps with the Claude API and have shipped a Mac desktop dev tool (Nexterm from scratch. Based in Hong Kong, fast turnaround.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Should I use polling or WebSocket for notifications?

Use Supabase Realtime (WebSocket) for instant delivery. Polling every few seconds creates unnecessary load and still has delays. Supabase Realtime pushes new rows to the client within milliseconds of database insertion.

How do I handle notifications when the user is offline?

Store all notifications in the database with a 'read' boolean field. When the user reconnects, fetch all unread notifications: supabase.from('notifications').select().eq('user_id', userId).eq('read', false). The Realtime subscription only handles new notifications while connected.

Related Bolt Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help