Overview
Supachat is a real-time chat app built using Svelte and Supabase. The app allows users to engage in real-time chat conversations. This product analysis will provide an overview of the key features, installation guide, and a summary of the application.
Features
- Real-time chat: Users can engage in real-time chat conversations with other users.
- Supabase integration: The app utilizes Supabase, providing a database backend for storing chat messages and user information.
- Simple table structure: The tables used in the Supabase project are straightforward, avoiding complex joins to ensure efficient data retrieval.
Installation
To install Supachat, follow these steps:
- Run
npm installto initialize all dependencies. - Set up Supabase:
- Create a
.envfile with variablesVITE_PUBLIC_SUPABASE_URLandVITE_PUBLIC_SUPABASE_ANON_KEY. - Retrieve these values from your Supabase project under Settings > API.
- Create a
- Create necessary tables in the Supabase project:
- For the “Global chat” table:
- Fields:
id(primary key) of typeint8usernameof typevarcharcreated_atof typetimestampzwith default valuenow()messageof typetextreplied_to_idof typeint2replied_to_usernameof typevarcharreplied_to_messageof typetext
- Fields:
- For the “users” table:
- Fields:
id(primary key) of typeint8created_atof typetimestampzwith default valuenow()usernameof typevarchar
- Fields:
- For the “Global chat” table:
- Start development server with
npm run devand build withnpm run build.
Summary
Supachat is a real-time chat app that utilizes Svelte and Supabase. It offers real-time chat functionality, seamless integration with Supabase for data storage, and a straightforward table structure for efficient data retrieval. Installing the app involves setting up dependencies, configuring Supabase, and creating the necessary database tables. With Supachat, users can enjoy real-time chat conversations in a user-friendly environment.