This repo now runs as a static site with a single dev command, Supabase auth, realtime updates, and QR camera scanning with cleanup.
npm install
npm run devOpen:
http://localhost:5173/http://localhost:5173/cal-sailing-club-website/members-login.htmlhttp://localhost:5173/cal-sailing-club-website/dashboard-embedded.html
Cloudflare:
npm run tunnel:cloudflarengrok:
npm run tunnel:ngrokShare the generated HTTPS URL plus /cal-sailing-club-website/members-login.html.
Apply migrations in order:
/Users/cmunoz/Desktop/Website/supabase/migrations/20260209120000_csc_supabase_foundation.sql/Users/cmunoz/Desktop/Website/supabase/migrations/20260209153000_csc_roles_claims.sql/Users/cmunoz/Desktop/Website/supabase/migrations/20260209154000_csc_policy_tweaks.sql
Then run seed SQL:
/Users/cmunoz/Desktop/Website/supabase/seed/csc_demo_users.sql
Expected auth emails already created in Supabase Auth:
nonrated@csc.orgnovice@csc.orgjunior@csc.orgsenior@csc.orgdayleader@csc.orgexcom@csc.orgadmin@csc.org
- Device A: open members login and sign in as
dayleader@csc.org. - Device B: open members login and sign in as
nonrated@csc.org(ornovice@csc.org). - Device B: create a lesson request from Instructor Availability.
- Device A: verify request appears within 1–2 seconds in lesson requests.
- Device A: approve/deny; Device B sees live status update.
- Device A: create an announcement.
- Device B: verify announcement appears live without refresh.
- Device B: report a fleet issue.
- Device A: resolve issue; Device B sees fleet state update live.
- Device A: start manifest session, add/remove member, end session; ops views update live.
Run with npm run dev and verify:
curl -I http://127.0.0.1:5173/csc-dashboard-v6.preview.jsxreturnsContent-type: text/javascript.- In browser console on login/dashboard pages:
window.__CSC_ENVis defined.window.CSCSupabaseClient && typeof window.CSCSupabaseClient.client === "function"istrue.window.CSCSupabaseClient && typeof window.CSCSupabaseClient.signIn === "function"istrue.
- On dashboard page:
- no
Cannot access ... before initializationerrors. - no false
Supabase not configuredbanner when config and Supabase script are present. - nav/profile dropdown click handlers open/close.
- no
tools/dev_server.pyserves.jsxas executable JS MIME and disables cache.config.jsnow exports canonicalwindow.__CSC_ENVplus compatibility aliases.src/supabaseClient.jsand/supabaseClient.jsexpose:client()getSession()signIn(email, password)signOut()
- Dashboard auth gate now redirects to login if no session before mounting app.
- QR scanner stops media tracks on close, unmount, page hide, hash/popstate changes, and tab hide.