React + Vite public website with a Home-page-only inline CMS backed by Firebase.
npm install
npm run devnpm run lint
npm run buildCopy .env.example to .env.local for local testing. In Vercel, set the same variables in Project Settings.
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=
VITE_CLOUDINARY_CLOUD_NAME=
VITE_CLOUDINARY_API_KEY=The public website still renders hardcoded fallback content if Firebase variables are missing.
Open /admin/ and sign in with Google. The allowed emails are:
orevaorior@gmail.com
jovisamblue@gmail.com
Dashboard v1 contains only:
- Enquiries inbox.
- Edit Home Page launcher.
- Seed Home Fallback button.
Open /admin/?edit=home from the dashboard. The real Home page loads in locked edit mode. Click any outlined text, link, or image to edit it. Every save creates a revision backup before writing to sitePages/home.
Main Firestore paths:
sitePages/home
sitePageRevisions/home/items/{revisionId}
mediaAssets/{id}
enquiries/{id}
admins/{uid}
Image uploads use the callable Firebase Function createCloudinaryUploadSignature. The Cloudinary API secret must never be placed in Vite env vars.
Set Functions secrets before deploying functions:
firebase functions:secrets:set CLOUDINARY_CLOUD_NAME
firebase functions:secrets:set CLOUDINARY_API_KEY
firebase functions:secrets:set CLOUDINARY_API_SECRETRotate any Cloudinary API secret that was previously shared before production deployment.
Deploy Firestore rules and Functions after Firebase CLI login:
firebase deploy --only firestore:rules
firebase deploy --only functionsSeed current hardcoded Home content into Firestore from an authenticated machine:
$env:GOOGLE_APPLICATION_CREDENTIALS="C:\path\to\service-account.json"
$env:FIREBASE_PROJECT_ID="brahamlicia"
npm run seed:homeThe dashboard also has a Seed Home Fallback button for allowed admins.