Codeblue99 / realtime-chat-supabase-react

A fork of the react chat app from supabase

Home Page:https://random-chat.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Full-stack real-time chat

Install

npm install to setup dependencies

Supabase variables

Create a .env file with VITE_SUPABASE_URL and VITE_SUPABASE_KEY (see env.example)

Setup your Supabase project

The following database table is required:

Field Type
id BIGINT
username VARCHAR
text TEXT
country VARCHAR
is_authenticated BOOLEAN
timestamp timestamp

SQL query if not using the Supabase interface:

CREATE TABLE messages (
  id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
  username VARCHAR NOT NULL,
  text TEXT NOT NULL,
  country VARCHAR,
  is_authenticated BOOLEAN DEFAULT FALSE,
  timestamp timestamp default now() NOT NULL
);

Setup GitHub authentication (optional)

Follow instrunction here

Dev

npm run dev to run server on port 3000

Build

npm run build to build the react client

Demo

https://random-chat.netlify.app

'demo'

About

A fork of the react chat app from supabase

https://random-chat.netlify.app/

License:Apache License 2.0


Languages

Language:JavaScript 92.2%Language:HTML 6.3%Language:CSS 1.6%