Simple Supabase-backed chat app with a Go server that serves static pages and exposes config to the client. Includes Vercel-compatible serverless entry (api/index.go).
- Go 1.24 HTTP server serving
/,/app,/admin, and static assets under/static/ /api/configreturnsSUPABASE_URLandSUPABASE_ANON_KEYfor the frontend- Frontend lives in
static/with basic auth, messaging, and admin pages - SQL helpers for provisioning Supabase tables, storage, and admin flags
- Go 1.24+
- Supabase project (URL + anon key)
- Install deps:
go mod download - Create a
.envfile with:SUPABASE_URL=your-supabase-url SUPABASE_ANON_KEY=your-supabase-anon-key PORT=8080
- Run the server:
go run main.go - Visit
http://localhost:8080(use/appfor the app,/adminfor the admin page).
- Vercel uses
api/index.goas the entrypoint; ensure env varsSUPABASE_URLandSUPABASE_ANON_KEYare set in the project.
- SQL setup scripts live in the repo (e.g.,
complete_database_setup.sql,setup_profile_features.sql,create_avatar_storage.sql,grant_admin.sql). Apply them in Supabase SQL editor as needed for auth, profiles, messaging, avatars, and admin roles.