A React + Vite frontend for athlete performance tracking.
- Node.js 18+
- npm 8+
-
Navigate to the frontend app:
cd Frontend/ProTech -
Install dependencies:
npm install
-
Create a
.envfile inFrontend/ProTechwith your Supabase credentials:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
- Do not include a trailing
/on the URL. - Use the anon key (not the service role key) for frontend.
- Do not include a trailing
-
Start the dev server:
npm run dev
The app will be available at
http://localhost:5173.
-
Build for production:
npm run build
-
Preview the production build locally:
npm run preview
- Storage bucket name for images:
athlete-images. - Uploaded images are stored at paths like
/<athleteId>/<year>.jpg. - Ensure the bucket has public read access or generate signed URLs for private buckets.
- TypeError: Load failed
- Remove any trailing
/fromVITE_SUPABASE_URL. - Ensure
.envexists inFrontend/ProTechand you restartednpm run devafter changes. - Reinstall deps:
rm -rf node_modules package-lock.json && npm install.
- Remove any trailing
Frontend/ProTech/– React + Vite appsrc/utils/supabase.js– Supabase clientsrc/components/– UI componentssrc/pages/– Routes and pages
Data/– Data scripts and CSVs