Kheris Hichem/realtime-chat-supabase-react
Built by Metorial, the integration platform for agentic AI.
Kheris Hichem/realtime-chat-supabase-react
Server Summary
Real-time messaging
User authentication
Database management
Frontend development with React
Environment configuration
Integration with Supabase
npm install
to setup dependencies
Create a .env
file with VITE_SUPABASE_URL
and VITE_SUPABASE_KEY
(see env.example)
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
);
Note: If you're using Supabase interface, don't forget to tick Enable Realtime
setting after you created the table.
Follow instrunction here
npm run dev
to run server on port 3000
npm run build
to build the react client
https://random-chat.netlify.app