club-finder

UCLA Club Finder

Monorepo with a Node/Express API (server) and a React app powered by Vite (client).

Prerequisites

1) Backend (server)

  1. Create env from example and fill values
cd server
cp env.example .env
# set:
# PORT=4000
# MONGO_URI=your-mongodb-uri
  1. Install and run
npm install
npm run dev
  1. Expected log: connected to db and listening on port 4000.

Quick test

curl http://localhost:4000/api/clubs

Troubleshooting

2) Frontend (client)

  1. Install and run dev server
cd ../client
npm install
npm run dev
  1. App runs at http://localhost:5173.

Notes

3) Environment and security

Email Verification Sender Setup (Club Email)

Verification emails are sent using SMTP creds (do not commit secrets).

Required env vars

EMAIL_USER= EMAIL_PASS=

Gmail example

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

After setting env vars

Restart/redeploy the backend so the new variables take effect.

4) Project scripts

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

5) Current data sources