A full-featured real-time chat app. This guide takes you from zero to live in ~15 minutes.
| Feature | Status |
|---|---|
| Sign up / Sign in / Forgot password | ✅ |
| Public channels (#general, #random, custom) | ✅ |
| Direct messages (1-on-1) | ✅ |
| Real-time messages (no refresh needed) | ✅ |
| Online / Away / Busy / Offline status | ✅ |
| Typing indicator | ✅ |
| Emoji picker | ✅ |
| Message reactions (👍❤️😂 etc.) | ✅ |
| File & image sharing | ✅ |
| Image lightbox viewer | ✅ |
| Drag-and-drop file upload | ✅ |
| Search messages in a chat | ✅ |
| Search chats in sidebar | ✅ |
| Unread message count badges | ✅ |
| Read receipts (DMs) | ✅ |
| Delete your own messages | ✅ |
| Quick reply (quote a message) | ✅ |
| Member list / profile panel | ✅ |
| Update display name & avatar | ✅ |
| Mobile-responsive (Android, iOS, any browser) | ✅ |
| Works on Windows, Mac, Linux browsers | ✅ |
| Dark theme, beautiful UI | ✅ |
chatapp/
├── index.html ← Login / Signup page
├── app.html ← Main chat page
├── css/
│ ├── auth.css ← Auth page styles
│ └── app.css ← Chat app styles
├── js/
│ ├── config.js ← ⚠️ YOU FILL THIS IN
│ ├── auth.js ← Auth logic
│ └── app.js ← Chat logic
├── supabase_setup.sql ← Run this in Supabase
└── README.md ← This file
- Go to supabase.com → Sign up (free)
- Click New Project
- Choose a name (e.g.
vibe-chat), set a strong database password, pick a region close to your users (e.g.ap-south-1for India) - Wait ~2 minutes for it to provision
- In your Supabase dashboard → SQL Editor → New Query
- Open
supabase_setup.sqlfrom this project - Paste the entire contents → Click Run
- You should see "Success" — all tables, policies, triggers, and storage buckets are created
- Supabase dashboard → Database → Replication
- Under Tables, toggle ON:
channel_messagesdirect_messagesprofiles
- Supabase dashboard → Settings (gear icon) → API
- Copy:
- Project URL → looks like
https://abcdefgh.supabase.co - anon / public key → long string starting with
eyJ...
- Project URL → looks like
Open js/config.js and replace the placeholder values:
constSUPABASE_URL='https://YOUR_PROJECT_ID.supabase.co';// ↑ paste your Project URL hereconstSUPABASE_ANON_KEY='YOUR_ANON_KEY_HERE';// ↑ paste your anon key hereSave the file.
- Supabase → Authentication → Providers
- Make sure Email is enabled
- For development: go to Authentication → Settings → turn OFF "Confirm email" (so users can sign in immediately without confirming)
- For production: leave email confirmation ON and configure your SMTP in Settings → Email
# In your project folder:
git init
git add .
git commit -m "Initial commit - Vibe Chat"# Create a new repo on github.com, then:
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git branch -M main
git push -u origin main- Your GitHub repo → Settings → Pages
- Under Source → select Deploy from a branch
- Branch:
main, Folder:/ (root) - Click Save
- Wait 1-2 minutes → your site is live at:
https://YOUR_USERNAME.github.io/YOUR_REPO/
- Supabase → Authentication → URL Configuration
- Site URL:
https://YOUR_USERNAME.github.io/YOUR_REPO - Redirect URLs: add
https://YOUR_USERNAME.github.io/YOUR_REPO/index.html
- Go to netlify.com → sign up
- Add new site → Import from Git → connect GitHub
- Select your repo
- Build settings: leave blank (it's plain HTML)
- Click Deploy site
- Get a free URL like
https://vibe-chat.netlify.app - In Supabase Auth settings, set Site URL to your Netlify URL
npm install -g vercel
cd chatapp
vercel
# Follow prompts — it's live in secondsThe app works great in mobile browsers. To make it installable:
Add this to the <head> of both index.html and app.html:
<linkrel="manifest" href="manifest.json" /><metaname="theme-color" content="#6c63ff" /><metaname="apple-mobile-web-app-capable" content="yes" />Create manifest.json:
{
"name": "Vibe Chat",
"short_name": "Vibe",
"start_url": "/index.html",
"display": "standalone",
"background_color": "#0d0e12",
"theme_color": "#6c63ff",
"icons": [
{ "src": "icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "icon-512.png", "sizes": "512x512", "type": "image/png" }
]
}Users on Android Chrome can then tap "Add to Home Screen" for an app-like experience.
- Never commit real API keys to a public GitHub repo
- The
anonkey is safe to expose in frontend code (Supabase designed it this way) — your Row Level Security policies protect the data - For extra security: in Supabase → Authentication → enable "Restrict sign-ups to certain email domains" if you only want your friends to join
| Problem | Fix |
|---|---|
| "Invalid API key" error | Check js/config.js — no extra spaces or quotes |
| Messages don't appear in real-time | Enable Realtime for tables in Supabase dashboard |
| Can't upload files | Check storage bucket policies in Supabase → Storage |
| Email confirmation loop | Disable email confirmation in Supabase → Auth → Settings |
| CORS error | Your Supabase URL might be wrong — check for typos |
| Blank page | Open browser Console (F12) and check for errors |
If you run into issues, open the browser console (F12 → Console tab) and check for red error messages — they'll tell you exactly what's wrong.
Happy chatting! 🎉