Molten‑forge themed, AI‑tempered idea evaluation platform for RVCE coding events. Submit your pitch and get near‑instant rubric scoring + actionable feedback from Gemini AI with a live, privacy‑respecting leaderboard.
-
AI Rubric Evaluation (5 Dimensions):
aiRelevance · creativity · impact · clarity · funFactor
(0–100 each) with server‑computed aggregatetotalScore
-
Queue-Based Burst Handling: Async submission endpoint prevents model bottlenecks during event spikes
-
Multi-Key Gemini Load Balancing: Optional round‑robin across
GEMINI_API_KEYS
for higher throughput; safe deterministic fallback if AI unavailable -
Live Leaderboard: Light polling with secure backend‑only Firestore writes
-
Molten Forge Theme: Ember orange glow accents over deep obsidian / charcoal gradient surfaces
-
Mobile-First UX: Prioritized for phones; responsive grid scales to large displays
-
Secure Google Auth: Firebase Authentication (Google Sign-In)
-
Private Feedback Storage: Detailed per‑criterion scores + narrative feedback stored only at
users/{uid}.lastEvaluation
(not in public leaderboard) -
Resilient Fallback Mode: If Gemini fails, a clearly marked synthetic evaluation still returns structure (never blocks submissions)
-
Extensible Core: Modular FastAPI services (
ai_service
,firebase_service
,evaluation_queue
) and clean React component architecture
Frontend (React/Vite/Tailwind) → FastAPI API → Gemini → Firestore (public + private slices)
- Frontend: React + Vite + Tailwind (single page, sectioned panels, molten gradient surfaces)
- Backend: FastAPI service with simplified single-path AI evaluation pipeline, queue worker, multi-key Gemini client (round-robin)
- AI: Google Gemini 2.5 Flash (JSON constrained prompt) + deterministic synthetic fallback
- Data: Firestore (public leaderboard subset + private user
lastEvaluation
) - Auth: Firebase Auth (Google Sign-In, ID token verified client-side; backend currently trusts provided UID for event context – future: token verification middleware)
- Deployment: Vercel (frontend) + Render (backend)
cd frontend
npm install
npm run dev
Visit http://localhost:5173
to see the application.
cd backend
pip install -r requirements.txt
python main.py
API default: http://localhost:8000
Primary async submission flow:
- POST
/ideas/submit_async
→{ jobId, status: "queued" }
- Poll GET
/ideas/status/{jobId}
untilstatus: completed
with evaluation payload
The legacy direct sync path can be added if needed, but async queue is recommended under load.
For more details, see:
- Frontend guide:
frontend/README.md
- Backend guide:
backend/README.md
Forged interface inspired by molten metal cooling:
- Color Palette: Deep charcoal / onyx bases (
#0b0604
–#1b0f0a
) with ember accents (#ff6b00
,#ff9f40
) and subtle radial glows - Glow & Depth: Layered gradients + thin semi‑transparent borders (
border-[#3a2516]
) for card edges - Micro Interactions: Animated fact bar, pulsing status dots, smooth opacity transitions
- Mobile First: Sticky navbar + stacked panels; expands to multi-column on widescreens
- Accessibility: High contrast text, focus‑safe color choices, reduced motion friendly defaults
Frontend (frontend/.env
):
VITE_FIREBASE_API_KEY=...
VITE_FIREBASE_AUTH_DOMAIN=...firebaseapp.com
VITE_FIREBASE_PROJECT_ID=...
VITE_FIREBASE_STORAGE_BUCKET=...
VITE_FIREBASE_MESSAGING_SENDER_ID=...
VITE_FIREBASE_APP_ID=...
VITE_FIREBASE_MEASUREMENT_ID=...
VITE_API_BASE_URL=http://localhost:8000
# Production: VITE_API_BASE_URL=https://<your-backend>.onrender.com
Backend (backend/.env
): (choose ONE credential style)
DEBUG=true
# Gemini (single or multi-key)
GEMINI_API_KEY=sk-...
# Optional comma-separated list to enable round-robin load balancing
GEMINI_API_KEYS=sk-1,sk-2,sk-3
# CORS
CORS_ORIGINS=http://localhost:5173,https://your-frontend.vercel.app
# Optional wildcard for preview deployments
# CORS_ALLOW_ORIGIN_REGEX=^https:\/\/.*vercel\.app$
# Firebase (split secret form – preferred for Render dashboard)
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_PRIVATE_KEY_ID=...
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=...
FIREBASE_CLIENT_ID=...
FIREBASE_CLIENT_X509_CERT_URL=...
# (OR) Single JSON file approach
# FIREBASE_SERVICE_ACCOUNT_KEY=./firebase_admin_sdk.json
Deprecated (agentic mode removed – no longer required):
GOOGLE_CSE_API_KEY=...
GOOGLE_CSE_CX=...
- Auth: User signs in with Google (Firebase Auth)
- Profile Setup: User supplies branch + rollNumber (stored in Firestore user doc)
- Async Submission: Client POSTs idea →
/ideas/submit_async
(guard: one submission per UID) - Queue & AI Eval: Worker dequeues → Gemini evaluation (enhanced prompt instructs model self-grounding) → parses & validates → computes
totalScore
(synthetic fallback only if Gemini unreachable) - Persistence:
- Public slice
{uid, name, branch, score: totalScore}
→leaderboard
collection - Private full
EvaluationResponse
→users/{uid}.lastEvaluation
- Public slice
- Client Polls:
/ideas/status/{jobId}
untilstatus=completed
then displays feedback (also cached locally for UX) - Leaderboard Polling: Lightweight periodic fetch; future: Server‑Sent Events
- Public:
name
,branch
,totalScore
- Private: All per‑criterion scores + narrative feedback + evaluatedAt timestamp
- No Overexposure: No raw ideas or detailed feedback stored in public collections
- Backend Gatekeeping: Only backend holds Firestore Admin; frontend never writes Firestore directly
- Resilience: Fallback evaluation clearly labeled; prevents denial of service if AI limits hit
- Future Hardening: Planned ID token verification & rate limiting per UID/IP
- Connect repo → Vercel
- Add env vars (all
VITE_...
+VITE_API_BASE_URL
) - Trigger build (auto on push)
- New Web Service → Python / FastAPI
- Add env vars (Gemini keys, Firebase split creds, CORS)
- Start service (configure autoscaling if high submission bursts expected)
- Monitor logs for AI fallback warnings (indicates key exhaustion / quota)
Frontend: React 19 · Vite · Tailwind · Firebase Auth · Lucide Icons Backend: FastAPI · Gemini 2.5 Flash · Firebase Admin SDK · Pydantic Infra: Firestore · Vercel (UI) · Render (API) Support: Optional Google CSE (search enrichment), multi-key Gem usage
© 2025 RVCE Coding Club. Built for educational purposes.
Ready to temper innovation? Drop your idea into the forge. 🔥