Skip to content

Phoenix-Feder/PrepPulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ PrepPulse — Deployment Guide

Complete step-by-step instructions to deploy PrepPulse with login, dual AI, and email reminders.


📁 Project Structure

preppulse/
├── api/
│   ├── ai.js            ← Dual AI proxy (Gemini + Groq)
│   └── reminder.js      ← Daily email reminder cron job
├── src/
│   ├── main.jsx         ← React entry point
│   ├── App.jsx          ← Auth routing
│   ├── Login.jsx        ← Login / Signup page
│   ├── Dashboard.jsx    ← Main tracker app
│   ├── firebase.js      ← Firebase config
│   └── data/
│       └── exams.js     ← All exam subjects & topics
├── index.html
├── vite.config.js
├── vercel.json          ← Cron job config
├── package.json
├── .env.example         ← Copy this to .env.local
└── .gitignore           ← Protects your keys

🔑 STEP 1 — Get All Free API Keys

1A. Firebase (Login + Database)

  1. Go to https://console.firebase.google.com
  2. Click "Add project" → name it "preppulse" → Create
  3. In the project dashboard, click "</> Web" to add a web app → name it "preppulse"
  4. Copy the config values shown (apiKey, authDomain, etc.)
  5. In Firebase console, go to AuthenticationSign-in method → Enable Email/Password
  6. Go to Firestore DatabaseCreate database → Start in test mode → Choose a region

1B. Gemini AI (Free: 1500 requests/day)

  1. Go to https://aistudio.google.com
  2. Sign in with Google
  3. Click "Get API Key""Create API key"
  4. Copy the key

1C. Groq AI (Free: 14,400 requests/day — very fast)

  1. Go to https://console.groq.com
  2. Sign up with Google/email
  3. Go to API Keys"Create API Key"
  4. Copy the key

1D. Resend (Free email: 100 emails/day)

  1. Go to https://resend.com
  2. Sign up → Verify your email
  3. Go to API Keys"Create API Key"
  4. Copy the key
  5. Go to Domains → Add your domain OR use the test email for now

1E. Make a CRON_SECRET

  • Just make up any long random string yourself
  • Example: mySecretCron2024PrepPulse!
  • You'll use this exact string in Vercel

🔑 STEP 2 — Firebase Admin Keys (for email reminders)

  1. In Firebase Console → Project Settings (gear icon) → Service Accounts
  2. Click "Generate new private key" → Download the JSON file
  3. Open the JSON file — you need 3 values:
    • project_id → this is your FIREBASE_ADMIN_PROJECT_ID
    • client_email → this is your FIREBASE_ADMIN_CLIENT_EMAIL
    • private_key → this is your FIREBASE_ADMIN_PRIVATE_KEY (long string starting with -----BEGIN)

💻 STEP 3 — Set Up Locally

# 1. Install Node.js from nodejs.org if you haven't

# 2. Clone or download this project folder

# 3. Install dependencies
npm install

# 4. Copy the env template
cp .env.example .env.local

# 5. Fill in your keys in .env.local (open with any text editor)
# See .env.example for what each value means

# 6. Run locally to test
npm run dev
# Opens at http://localhost:5173

📤 STEP 4 — Push to GitHub

# 1. Create a free account at github.com

# 2. Create a new repository called "preppulse" (make it Private)

# 3. In your project folder, run:
git init
git add .
git commit -m "Initial PrepPulse build"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/preppulse.git
git push -u origin main

⚠️ Make sure .gitignore includes .env.local — it does by default in this project.


🚀 STEP 5 — Deploy on Vercel

  1. Go to https://vercel.com → Sign up with GitHub (free)
  2. Click "Add New Project" → Import your preppulse repo
  3. Framework: Vite (Vercel auto-detects this)
  4. Click "Environment Variables" and add ALL of these:
VITE_FIREBASE_API_KEY           = (from Firebase web config)
VITE_FIREBASE_AUTH_DOMAIN       = (from Firebase web config)
VITE_FIREBASE_PROJECT_ID        = (from Firebase web config)
VITE_FIREBASE_STORAGE_BUCKET    = (from Firebase web config)
VITE_FIREBASE_MESSAGING_SENDER_ID = (from Firebase web config)
VITE_FIREBASE_APP_ID            = (from Firebase web config)

GEMINI_API_KEY                  = (from aistudio.google.com)
GROQ_API_KEY                    = (from console.groq.com)
RESEND_API_KEY                  = (from resend.com)
CRON_SECRET                     = (the random string you made up)

FIREBASE_ADMIN_PROJECT_ID       = (from Firebase service account JSON)
FIREBASE_ADMIN_CLIENT_EMAIL     = (from Firebase service account JSON)
FIREBASE_ADMIN_PRIVATE_KEY      = (from Firebase service account JSON — paste the full -----BEGIN... string)
  1. Click Deploy → Wait 2-3 minutes
  2. Your app is live at https://preppulse.vercel.app (or similar URL) 🎉

📧 STEP 6 — Set Up Email Domain (for real emails)

After deploying:

  1. In Resend dashboard → DomainsAdd Domain
  2. Add your domain (e.g., yourdomain.com)
  3. Follow Resend's DNS instructions to verify it
  4. Update the from: address in api/reminder.js:
    from: "PrepPulse <reminders@yourdomain.com>"
  5. Redeploy: git push (Vercel auto-redeploys)

No custom domain yet? You can use Resend's test mode — emails go to your own inbox only until you verify a domain. That's fine for testing!


✅ Final Checklist

Step Done?
Firebase project created with Email auth + Firestore
Gemini API key from aistudio.google.com
Groq API key from console.groq.com
Resend API key from resend.com
Firebase Admin service account JSON downloaded
.env.local filled in locally
npm run dev works locally
Code pushed to GitHub
All env vars added in Vercel
Deployed on Vercel

🛠 Troubleshooting

"Firebase: No Firebase App" error → Check that all VITE_FIREBASE_* env vars are set in Vercel and start with VITE_

AI not working → Check GEMINI_API_KEY and GROQ_API_KEY are set in Vercel (not in .env.local for production)

Emails not sending → Check RESEND_API_KEY is set. Check the from: email uses a verified Resend domain.

Login not working → Make sure Email/Password auth is enabled in Firebase Console → Authentication

Data not saving → Make sure Firestore is created in Firebase Console and started in test mode


💡 Tips

  • Push any code change with git push → Vercel auto-redeploys in ~1 minute
  • View cron job logs in Vercel Dashboard → Your Project → Functions tab
  • View Firestore data in Firebase Console → Firestore Database
  • Monitor AI usage: Gemini at aistudio.google.com, Groq at console.groq.com

About

AI-powered exam preparation tracker with Firebase authentication, dual AI (Gemini + Groq), and automated email reminders. Built with Vite and deployed on Vercel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors