Hackathon teammate matching platform — React frontend + Express backend + Supabase PostgreSQL.
Create a free project at supabase.com, then give yourself these values in backend/.env:
| Variable | Where to find it |
|---|---|
DATABASE_URL |
Project Settings → Database → Connection string → URI (use Session pooler for production, Direct for local dev) |
JWT_SECRET |
Generate any long random string (e.g. openssl rand -hex 32) |
CORS_ORIGIN |
Your frontend URL, e.g. http://localhost:5173 |
Optional (for future Supabase Auth / Storage / Realtime):
| Variable | Where to find it |
|---|---|
SUPABASE_URL |
Project Settings → API → Project URL |
SUPABASE_SERVICE_ROLE_KEY |
Project Settings → API → service_role (keep secret, server-only) |
-
Copy env files:
cp backend/.env.example backend/.env cp react-frontend/.env.example react-frontend/.env
-
Paste your
DATABASE_URLintobackend/.env. -
Run the schema (either way):
- Auto: Start the backend — it runs
schema.sqlon boot. - Manual: Paste
supabase/migrations/00001_init.sqlinto Supabase SQL Editor → Run.
- Auto: Start the backend — it runs
-
Seed demo users (optional):
cd backend && npm run seed
Log in with
alice@example.com/password123. -
Run dev:
make dev
Before encrypted chat opens, both teammates must submit a valid solution to the same coding challenge (picked per connection). Challenges include:
- Return True, Sum Two Numbers, Reverse String, FizzBuzz, First Element, Is Even
Users can click Reveal Answer to see the reference solution if stuck.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | Supabase PostgreSQL connection URI |
JWT_SECRET |
Yes | Token signing secret |
CORS_ORIGIN |
Yes | Frontend origin |
PORT |
No | Default 5000 |
DATABASE_SSL |
No | Default true |
| Variable | Description |
|---|---|
VITE_API_URL |
Backend URL, e.g. http://localhost:5000 |
- Backend: Railway, Render, Fly.io (set
DATABASE_URL+ env vars) - Frontend: Vercel (
VITE_API_URL→ your API)