Visual notification for unread messages in a topic

Hello everyone!

I would like to create a notification system for my forum that tells each user when there is a new topic, or a new one in a topic that they have not yet viewed.

My forum operates with two levels. Exactly like on this forum = on the left each “category” is marked with a blue dot if new topics/messages are present in the category. Then this blue dot is found next to the subject titles.

I have absolutely no idea where to start… Has anyone already created a forum with this type of notifications?

I use xano as backend.

Do not hesitate to ask me for any necessary information!

Has anyone ever created a system like this?

If anyone knows of any documentation for creating this, that’s great too!

Thanks :slight_smile:

Hi Romain :waving_hand:

A notification system is quite complex.

The majority of the logic will happen on your backEnd.

Here are a couple posts of members trying to figure out a solution:

Using a third party service:

Other than that I tried asking ChatGpt on how you could start to create this system and this is what it came up with:

ChatGPT Answer

:brain: How to build a Discourse-like notification system with Xano + WeWeb

To build a forum notification system like Discourse (blue dots for new topics or unread replies), you’ll need:


1. Backend data model (Xano)

Make sure you have:

Users table
Topics table
Posts table (each topic can have multiple posts)
UserTopicView table (logs when a user last viewed a topic)
UserCategoryView table (optional, for category-level dots)


2. Logic to check unread content

When user loads the app, run a query:

• For each topic in a category → check if the last_post_date is after the last_viewed_date in UserTopicView
• If yes → mark as unread
• Sum up unread topics to show a blue dot on category
• For each topic → show a dot if there are unread posts


3. On topic visit

• When user visits a topic, call a Xano function that updates or inserts the UserTopicView record with the current timestamp


4. In WeWeb

Use conditional logic:

• Show the :blue_circle: icon if topic.last_post_date > user_view.last_viewed_date
• You can use a custom query that fetches both the topic list and the user views (via Xano joins or post-processed logic)


5. Performance tip

For scale, avoid calculating everything in real-time on the frontend. You can:

• Precompute unread status in Xano responses
• Or store a boolean has_unread_posts in your UserTopicView, updated via backend workflows or CRONs


:toolbox: Bonus: Starter logic for Xano functions

  • GET unread topics: Join Topics with UserTopicView using user_id. Return only where Topics.last_post_date > UserTopicView.last_viewed_date OR UserTopicView record doesn’t exist.
  • Mark topic as read: On topic page load, send a POST to update or insert the UserTopicView.
1 Like

Hi Augustin, and thank you for these links! I will investigate on this base, and if i’m stuck on something more specific i’ll be back here to reach some help ! :slightly_smiling_face:

1 Like

Hello everyone !

Here’s just a quick update that might be useful to someone else. I finally succeeded, and indeed it was “quite complex” for a beginner like me.

The hardest part was creating the query that retrieves the information on the last visit of a subject, to then compare it to the date of the last message posted and return to “unread” if this is the case.

In the same query I also counted the “unread” subjects for each category to return the categories to “notify”.

I share this request if it can help someone later…

It was difficult, but I learned a lot. Thanks for the initial help!

1 Like

Hi Romain!

I’m glad you managed to solve it and also that you came back to update us. :folded_hands:

I’m sure this will be super useful for others trying to achieve the same notification system.

1 Like