---
title: "Making a Real-Time Chat App with Supabase on Replit"
description: "A real-time public chat app can be built with a Vue 3 and Tailwind CSS frontend on Replit backed by Supabase's hosted Postgres."
url: "https://swe.quest/articles/making-a-real-time-chat-app-with-supabase-on-replit-0a77c4de25e9cc9d"
canonical: "https://replit.com/blog/making-real-time-chat-app-with-supabase-on-replit"
source: "Replit"
published: "2022-03-23"
difficulty: "medium"
kind: "How-to"
reading_minutes: 8
tags: ["realtime","frontend","javascript","postgres"]
---

# Making a Real-Time Chat App with Supabase on Replit

A post on [Replit](https://swe.quest/sources/replit.md), published 2022-03-23, 8 min read, How-to. Original: [https://replit.com/blog/making-real-time-chat-app-with-supabase-on-replit](https://replit.com/blog/making-real-time-chat-app-with-supabase-on-replit)

## Summary

A real-time public chat app can be built with a Vue 3 and Tailwind CSS frontend on Replit backed by Supabase's hosted Postgres. The walkthrough creates a messages table via SQL, enables replication-based real-time events, and wraps the supabase-js client in a Vue composable. That composable handles paginated message loading by range, INSERT subscriptions for live updates, and inserts for sending. Users are identified only by a random username stored in localStorage, and older messages load when the list is scrolled to the top.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- Vue Composition API
- JavaScript async/await ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- basic SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

Supabase, Replit, Vue 3, Tailwind CSS, supabase-js, Firebase

## Related posts

- [Flutter Tutorial: building a Flutter chat app](https://swe.quest/articles/flutter-tutorial-building-a-flutter-chat-app-942d133b45bb7fa6.md): Supabase · 2022-06-30 · Medium · 19 min read · Mobile, Real-time systems, PostgreSQL, Communications
  A real-time single-room chat app can be built with Flutter on the frontend and Supabase as the entire backend, using the supabase\_flutter SDK instead of a custom API.
- [Postgres Realtime location sharing with MapLibre](https://swe.quest/articles/postgres-realtime-location-sharing-with-maplibre-f6d03ffa8efe5716.md): Supabase · 2024-07-04 · Medium · 5 min read · Real-time systems, Maps & geospatial, PostgreSQL, React, Serverless
  Live location sharing is built by having a Telegram bot running in a Supabase Edge Function (grammY on Deno) capture edited-location updates and write them to Postgres through a PL/pgSQL RPC.
- [Realtime: Multiplayer Edition](https://swe.quest/articles/realtime-multiplayer-edition-cca475e0a0be51ab.md): Supabase · 2022-08-18 · Medium · 8 min read · Real-time systems, Elixir & Erlang, PostgreSQL, JavaScript
  Supabase Realtime's Broadcast and Presence features are now generally available, with every feature organized around Channels that also carry Postgres change events.
- [Cal.com launches Expert Marketplace built with Next.js and Supabase.](https://swe.quest/articles/cal-com-launches-expert-marketplace-built-with-next-js-and-supabase-2659e9baa272f3f6.md): Supabase · 2024-06-18 · Medium · 5 min read · PostgreSQL, Frontend, Serverless, Storage systems
  Cal.com's open-source Platform Starter Kit for building expert marketplaces runs on Next.js and Supabase, having switched from SQLite to Postgres via Prisma shortly before launch once file storage was needed.
- [Building a Realtime Trello Board with Supabase and Angular](https://swe.quest/articles/building-a-realtime-trello-board-with-supabase-and-angular-8c67e5fbd416633e.md): Supabase · 2022-08-24 · Medium · 30 min read · PostgreSQL, Identity & auth, Real-time systems, Frontend, TypeScript
  A Trello-style board clone built on Supabase, Angular and Tailwind, with boards, lists and cards stored in Postgres tables.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
