Monorepo with a Node/Express API (server) and a React app powered by Vite (client).
cd server
cp env.example .env
# set:
# PORT=4000
# MONGO_URI=your-mongodb-uri
npm install
npm run dev
connected to db and listening on port 4000.Quick test
curl http://localhost:4000/api/clubs
Troubleshooting
PORT in server/.env (e.g., 5000) or free the port with lsof -i :4000.cd ../client
npm install
npm run dev
http://localhost:5173.Notes
client/src/main.jsx; HTML is client/index.html.@mui/material and @mui/icons-material.server/.env (ignored by git). Never commit real credentials.Verification emails are sent using SMTP creds (do not commit secrets).
EMAIL_USER= EMAIL_PASS=
Step 1 — Log into the Gmail Step 2 — Turn on 2-Step Verification (required) Step 3 — Manage Google Account Step 4 — Search “App Password” Step 5 - Name “UCLA Club Finder App” Step 6 - Type Password in EMAIL_PASS Step 7 - Type Email in EMAIL_USER
Restart/redeploy the backend so the new variables take effect.
Server
cd server
npm run dev # start API with nodemon
Client
cd client
npm run dev # start Vite dev server
npm run build # production build
npm run preview # preview production build
client/src/components/CardGrid.jsx.