AI-powered campus utilities: Lost & Found matching + Notes sharing. Fully serverless — React frontend + Vercel Serverless Functions + Firebase + Gemini AI.
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite + Tailwind CSS |
| Auth | Firebase Auth (Google Sign-In) |
| Database | Firebase Firestore |
| AI | Gemini 2.0 Flash (via REST API) |
| Backend | Vercel Serverless Functions (Node.js 20) |
| Hosting | Vercel |
git init
git add .
git commit -m "campusconnect vercel edition"
git remote add origin https://github.com/YOUR_USERNAME/campusconnect.git
git push -u origin main- Go to vercel.com → New Project → Import from GitHub
- Select your repo
- Leave all settings as default (Vercel auto-detects Vite)
- Click Deploy — it will fail on first deploy because env vars aren't set yet, that's fine
Go to your project on Vercel → Settings → Environment Variables, add:
| Variable | Value |
|---|---|
GEMINI_API_KEY |
Your key from aistudio.google.com/app/apikey |
FIREBASE_SERVICE_ACCOUNT |
The full service account JSON as a single-line string |
How to get FIREBASE_SERVICE_ACCOUNT:
- Firebase Console → Project Settings → Service Accounts → Generate new private key
- Download the JSON file
- Open it in a text editor, select all, copy — paste the entire JSON into the Vercel env var field
- Vercel stores it as-is; the app handles parsing
⚠️ Never commit the service account JSON to git..gitignorealready excludes it.
Vercel → your project → Deployments → click the latest → Redeploy.
Or push any commit and it auto-redeploys.
npm install
npm install -g vercel
# Create .env.local
echo 'GEMINI_API_KEY=your_key_here' >> .env.local
echo 'FIREBASE_SERVICE_ACCOUNT={"type":"service_account",...paste full json...}' >> .env.local
# Run locally (emulates serverless functions)
vercel dev
# Opens on http://localhost:3000- Firestore Database enabled (test mode for dev)
- Authentication → Google Sign-In enabled
-
localhostadded to Authorized Domains in Firebase Auth - Your Vercel deployment URL added to Authorized Domains after deploy
| Collection | Key Fields |
|---|---|
lost_found |
id, type, description, location, contact, category, status, created_at |
notes |
id, title, subject, uploader_name, raw_text, summary, tags, downloads, created_at |
No composite indexes needed — filtering is done in application code.