Notifications
How CareNova's notification system works — what triggers notifications, how to view and manage them, and the notification drawer.
Written By Dev010
Last updated 19 days ago
CareNova includes a notification system that keeps clinic staff informed of important activity across the platform. Notifications appear in a slide-in drawer accessible from the top header bar — no separate page or navigation required.
Accessing Notifications
Click the bell icon in the top right of the dashboard header bar to open the notifications drawer.
The bell icon displays a badge with the count of unread notifications when new ones arrive.
Dashboard Header Bar
┌─────────────────────────────────┬─────┬──────┐
│ CareNova │ 🔔3 │ 👤 │
└─────────────────────────────────┴─────┴──────┘
↓
Opens notification
drawer →The drawer slides in from the right side of the screen without navigating away from the current page.
Notification Drawer
The notification drawer shows a scrollable list of all notifications for the currently logged-in user.
Each notification displays:
Notification title
Message body
Timestamp (e.g. "2 minutes ago", "Yesterday at 3:00 PM")
Read / unread indicator
Optional link to the relevant module or record
Unread notifications are visually distinguished from read ones — typically with a highlighted background or bold title.
Marking Notifications as Read
Notifications can be marked as read in two ways:
Mark individually: Click a notification to open its linked page — the notification is automatically marked as read.
Mark all as read: Click the Mark all as read button at the top of the drawer to clear all unread notifications at once.
Once marked as read, the bell icon badge count decreases accordingly.
Notification Types
CareNova creates notifications for the following system events:
Notification delivery depends on how your clinic uses the system. Not all event types may generate notifications in every workflow — notifications are created programmatically by server actions when relevant events occur.
Notification Links
Many notifications include a direct link to the relevant record or module. Clicking the notification navigates directly to the linked page — for example:
Low stock alert → Sidebar → Inventory
Pending approval → Dashboard → Pending Approval
New appointment → Appointment detail page
Overdue invoice → Invoice detail page
If a notification has no link, clicking it simply marks it as read.
Notification Scope
Notifications are per-user — each staff member only sees notifications relevant to them. A doctor's notification drawer shows only events related to their patients and appointments. An admin sees clinic-wide alerts.
Notifications are stored in the notifications table linked to user_id — they are never shared across accounts.
Database Schema Reference
notifications
Indexes are set on user_id and is_read for fast per-user unread count queries.
Viewing Notifications in the Database
To review all notifications for a specific user directly:
SELECT n.title, n.message,
n.type, n.is_read,
n.link, n.created_at
FROM notifications n
JOIN users u ON n.user_id = u.id
WHERE u.email = 'staff@yourdomain.com'
ORDER BY n.created_at DESC
LIMIT 50;To count unread notifications per user:
SELECT u.email, u.role,
COUNT(n.id) as unread_count
FROM users u
LEFT JOIN notifications n
ON n.user_id = u.id
AND n.is_read = false
GROUP BY u.id, u.email, u.role
ORDER BY unread_count DESC;Troubleshooting
Bell icon showing no badge despite recent activity:
Notifications are created server-side when specific events occur — confirm the triggering action was performed
Hard refresh the browser — the badge count is loaded server-side on page load
Check Supabase → Table Editor → notifications to confirm records exist for your user ID
Notification drawer is empty:
Confirm you are logged in with the correct account — notifications are user-specific
If the system was recently installed without demo data, the notifications table may be empty — run
npm run db:seedto populate example notifications
Clicking a notification does not navigate anywhere:
The notification may not have a
linkvalue setThis is expected for general informational notifications with no associated record
Cannot dismiss or delete individual notifications:
CareNova's notification drawer supports marking as read but does not currently support deleting individual notifications from the UI
To clear all notifications for a user, run in SQL Editor:
DELETE FROM notifications
WHERE user_id = 'paste-user-uuid-here';Next Step
Continue to the Blog & News module guide to learn how to create and manage public-facing clinic blog posts in CareNova.