FacultyConnect AI — Hackathon Story 🎓
💡 Inspiration
It started with a moment every college student knows too well.
I walked to my professor's office to ask about an assignment extension. I stood outside the door for 10 minutes — not sure if she was inside, in a meeting, or teaching a class somewhere. I knocked. No answer. I walked back to my hostel, opened my laptop, and spent another 20 minutes staring at a blank email draft — not knowing if I was being too casual, too formal, or just plain annoying.
That frustration became FacultyConnect AI.
Every student faces three invisible walls every single day:
- Wall 1 — Is my professor even free right now?
- Wall 2 — How do I write this email without sounding wrong?
- Wall 3 — I raised a complaint last week — what happened to it?
We built the tool that tears down all three.
⚙️ How We Built It
The entire app is a single HTML file — no frameworks, no backend, no deployment complexity. Just pure HTML, CSS, and JavaScript running entirely in the browser.
The AI layer is powered by Google Gemini 2.5 Flash via the REST API. The key insight was giving each faculty member their own custom system prompt — injecting their real schedule, subjects, room number, and personality into every conversation. So when a student chats with Dr. Priya Mehta, the AI is strict and precise. When they chat with Prof. Arjun Tiwari, the AI is warm and encouraging. Same model, completely different experience.
The email generator uses a structured prompt that tells Gemini the purpose, faculty details, student context, and desired tone — and asks it to return a SUBJECT: and BODY: in a parseable format. If the AI is unavailable, it falls back to handcrafted templates silently.
For reliability, we built an automatic model fallback chain:
$$\text{gemini-2.5-flash} \xrightarrow{\text{quota hit}} \text{gemini-2.0-flash} \xrightarrow{\text{quota hit}} \text{gemini-2.0-flash-lite}$$
This means the app never breaks during a demo — it just quietly switches models.
🧠 What We Learned
1. Prompt engineering is product design. The difference between a generic chatbot and a faculty-specific AI assistant is entirely in the system prompt. We spent more time crafting and refining prompts than writing UI code.
2. Single-file apps are underrated. No build step, no npm install, no server. Open the file, enter an API key, and the entire product works. For a college deployment, this means zero IT overhead.
3. Emotion drives engagement. The confetti animation when a meeting is booked, the WhatsApp-style notification popup, the animated splash screen — none of these add functionality. But they make students feel something. That feeling is what makes people come back.
4. Free tiers are powerful enough. Gemini 2.5 Flash's free tier handles 1,500 requests per day. For a college with 500 students sending an average of 3 messages per day:
$$\text{Daily requests} = 500 \times 3 = 1500 \text{ req/day}$$
That's exactly at the free tier limit — and with the fallback chain, effectively $3 \times 1500 = 4500$ requests before any cost is incurred.
🚧 Challenges We Faced
CORS and API integration was the biggest technical wall. Raw fetch() calls to the Gemini REST API were being blocked by the browser's CORS policy when running from a local HTML file. We tried the official Google AI JavaScript SDK loaded from CDN — but that SDK is built for Node.js, not browsers, and failed silently. The fix was switching to the correct v1beta endpoint with proper headers, and using the exact model IDs returned by the /models list endpoint.
Model naming caused hours of confusion. gemini-2.5-flash-preview-05-20 looked valid but returned a truncated error. The correct name — confirmed by hitting the /models API directly — was simply gemini-2.5-flash. One hyphen's difference, hours of debugging.
Conversation history format for multi-turn chat required careful structuring. Gemini's REST API expects alternating user and model roles — inserting a system prompt as the first user message with an immediate model acknowledgement as a "fake first exchange" was the pattern that made context-aware faculty responses work correctly.
Keeping it one file while adding features like modals, confetti, WhatsApp popups, a timetable view, dark mode, and a full analytics dashboard required disciplined CSS variable architecture and careful JS state management — all without a single import or external dependency.
🔮 What's Next
- Real WhatsApp notifications via the Twilio API
- A college admin panel for faculty to update their own availability
- PWA support so students can install it like an app
- Hindi language toggle for broader accessibility
- Integration with existing college timetable and ERP systems
🏁 Final Thought
FacultyConnect AI isn't just a hackathon project. It's the tool I wish existed when I was standing outside that professor's door.
"Stop guessing. Start connecting."
Log in or sign up for Devpost to join the conversation.