Official public speaking & Toastmasters club website for NIT Trichy. Built as a PWA with Firebase backend.
unscripted/
βββ index.html β Public landing page
βββ manifest.json β PWA manifest (app install)
βββ sw.js β Service Worker (offline + push notifications)
βββ vercel.json β Vercel deployment config
βββ icons/
β βββ logo.png β Unscripted club logo
βββ css/
β βββ style.css β All styles (orange + white brand)
βββ js/
β βββ firebase-config.js β π PUT YOUR FIREBASE KEYS HERE
β βββ nav.js β Navbar scroll, hamburger, animations
β βββ public-home.js β Loads events + gallery on homepage
βββ pages/
βββ login.html β Member login (NITT webmail @nitt.edu)
βββ dashboard.html β Member dashboard (progress, analysis, leaderboard, mentorship, attendance)
βββ admin.html β Core team admin panel
βββ events.html β Public events page (upcoming + past)
βββ gallery.html β Public photo gallery with lightbox
βββ members.html β Public member list with role filter
βββ videos.html β Public speech videos (YouTube embeds)
βββ contact.html β Social links + WhatsApp + contact form
- Go to https://console.firebase.google.com
- Create project β name it
unscripted-nitt - Register a Web App β copy config
Paste into js/firebase-config.js:
const firebaseConfig = {
apiKey: "...",
authDomain: "...",
projectId: "...",
storageBucket: "...",
messagingSenderId: "...",
appId: "..."
};Firebase Console β Authentication β Sign-in method β Email/Password β Enable
Firebase Console β Firestore Database β Create database β Start in test mode
Set security rules (Rules tab):
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /members/{doc} { allow read: if true; }
match /events/{doc} { allow read: if true; }
match /gallery/{doc} { allow read: if true; }
match /videos/{doc} { allow read: if true; }
match /leaderboard/{doc} { allow read: if true; }
match /users/{uid} {
allow read, write: if request.auth != null && request.auth.uid == uid;
}
match /meets/{doc} { allow read: if request.auth != null; }
match /messages/{doc} { allow create: if true; }
match /notifications/{doc} {
allow read: if request.auth != null;
allow write: if request.auth != null;
}
}
}
Firebase Console β Storage β Get started
Firebase Console β Project Settings β Cloud Messaging β Generate VAPID key
Replace YOUR_VAPID_KEY in dashboard.html where getToken is called.
- Push this folder to GitHub
- Go to https://vercel.com β New Project β Import from GitHub
- Set Root Directory to
unscripted(or root if it's already at root) - Framework preset: Other (it's static HTML)
- Deploy β done!
Your site: https://your-project.vercel.app
- Make yourself an admin: In Firestore β
users/{your-uid}β setrole: "core" - Go to
/pages/admin.html - Use "Add Member" form:
- Fill name, NITT email (
rollnumber@nitt.edu), temp password, dept, year, role, pathway - They log in at
/pages/login.htmlwith their NITT email + the temp password
- Fill name, NITT email (
- They can change password via Firebase Auth (add forgot password flow if needed)
| Collection | Access | Purpose |
|---|---|---|
users/{uid} |
Private (auth only) | Full member data, speeches, attendance, points |
members/{uid} |
Public | Name, dept, role for public member list |
events/{id} |
Public | Upcoming & past events |
gallery/{id} |
Public | Photo URLs + captions |
videos/{id} |
Public | YouTube video links + metadata |
leaderboard/{uid} |
Public | Points, speech count, level |
meets/{id} |
Auth only | Attendance records per meet |
notifications/{id} |
Auth only | Push notification queue |
messages/{id} |
Write-only public | Contact form submissions |
{
"name": "Ravi Kumar",
"email": "ra123@nitt.edu",
"dept": "CSE",
"year": 2,
"role": "member", // "member" | "mentor" | "core" | "admin"
"pathway": "L1", // "L1" | "L2" | "L3K" | "L3H"
"mentor": "uid-of-mentor",
"mentees": ["uid1", "uid2"],
"points": 25,
"speeches": [
{ "id": "ice-breaker", "title": "Ice Breaker", "status": "done", "date": "2025-01-15", "feedback": "Great energy!" }
],
"attendance": [
{ "meetId": "meet-id-1", "date": "2025-01-10", "present": true }
],
"skills": {
"delivery": 4, "structure": 3, "vocal": 4,
"eyeContact": 5, "confidence": 3, "persuasion": 4
}
}The site installs as a native-like app:
- Android/Chrome: Chrome prompts "Add to Home Screen"
- iOS/Safari: Share β Add to Home Screen (iOS 16.4+ for push notifications)
- Desktop: Install button in browser address bar
Push notifications fire when you add to notifications collection in Firestore.
Deploy this to Firebase Functions to auto-trigger notifications:
// functions/index.js
const admin = require('firebase-admin');
const functions = require('firebase-functions');
admin.initializeApp();
exports.sendPushNotification = functions.firestore
.document('notifications/{id}')
.onCreate(async (snap) => {
const data = snap.data();
if (data.sent) return;
await admin.messaging().send({
topic: 'all-members',
notification: { title: data.title, body: data.body },
webpush: {
notification: { icon: '/icons/logo.png' },
fcmOptions: { link: data.url || '/' }
}
});
await snap.ref.update({ sent: true });
});To make a user admin:
- Find their UID in Firebase Auth console
- In Firestore β
users/{uid}β setrole: "core"or"admin" - They access
/pages/admin.html
In pages/contact.html and index.html, replace:
https://chat.whatsapp.com/YOUR_WHATSAPP_LINK
with your actual WhatsApp community invite link.
Made with β€οΈ for Unscripted NIT Trichy π€