Campus Connect is not just another student directory β it is a high-performance, real-time, campus-exclusive social ecosystem engineered for university students to discover peers, collaborate on research, participate in campus events, check in via QR tokens, and communicate securely.
Designed with modern glassmorphic aesthetics, WebGL shader lighting, real-time Firestore listeners, dynamic location density mapping, and a strict two-tier verification model.
- β¨ Key Features
- ποΈ System Architecture & Flowcharts
- ποΈ Database Schema & Data Models
- π οΈ Tech Stack
- π Security & Access Control
- π¦ Getting Started & Setup Guide
- π Project Directory Structure
- π§ͺ Roadmap & Future Vision
- π€ Contributing
- π License
-
π‘οΈ Campus Gatekeeper & ID Card Verification
Restricted access strictly bound to verified university registration numbers invalid_studentscombined with Student ID Card photo verification to prevent unauthorized external sign-ups. -
β‘ Real-Time Admin Session Kill Switch
Integrated Firestore listener instantly revokes active student sessions and logs out users in real time if access status is modified by campus administration. -
π± QR-Code Physical Event Check-In Engine
Club leaders generate time-boxed check-in QR codes (checkins/{activityId}). Volunteers scan the code via live camera scanner to convert tentative sign-ups into verified event attendance. -
π Community Volunteer Leaderboard & Duty Reviews
Real-time leaderboard ranking student volunteers by verified completed operations (completedOps). Includes mission assignment, task review submission, and lead approval workflows. -
πΊοΈ Adaptive Location Density Mapping
Real-time interactive map (LocationTracking.jsx) with dynamic auto-centering and zoom calculations aligned towards active student density on campus. -
π Seniority Filtering (Junior vs Senior)
Smart student directory filtering by batch, department, and academic seniority (Senior vs Junior levels). -
π« College-Wise Campus Ecosystem Scoping
Multi-campus ecosystem isolation enabling students to experience their distinct college culture while enabling discovery. -
π Interactive Discovery Stack
Swipeable card stack supporting dual discovery modes:- Social Mode: Swipe to discover peers filtered by department, batch, and interest tags.
- Volunteer Mode: Explore and volunteer for campus activities, community events, and drives.
-
π¬ Real-Time Direct & Ephemeral Group Chat Engine
Instant 1-on-1 private messaging and temporary group chat rooms with 1-hour automated expiration logic and online presence indicators (isOnline&lastSeen). -
π© Campus Moderation & Reporting Shield
Comprehensive safety suite allowing users to block or report toxic behavior, persisting directly into Firestorereportsandblockscollections. -
π Futuristic Glassmorphic WebGL UI
Ultra-dark futuristic design featuring OGL / Three.js light ray shaders, responsive drawer navigation, custom cursors, and liquid transitions.
graph TD
User(["Student / User Browser"]) -->|"HTTP / WebGL"| Frontend["React + Vite Frontend"]
subgraph FrontendApp ["Frontend Application Layer"]
Frontend --> Router["React Router v6"]
Router --> Context["Auth & Main Context API"]
Context --> UIComponents["Pages & Glassmorphic UI Components"]
UIComponents --> Shaders["WebGL LightRays / Three.js Engine"]
UIComponents --> QRScanner["HTML5 QR Camera Scanner"]
end
subgraph FirebaseInfra ["Firebase Cloud Infrastructure"]
Context -->|"Auth API"| FBAuth["Firebase Authentication"]
Context -->|"Real-Time Listeners & CRUD"| Firestore[("Cloud Firestore NoSQL")]
UIComponents -->|"Asset & ID Card Storage"| FBStorage["Firebase Storage"]
end
subgraph SecurityLayer ["Security & Access Layer"]
Firestore --> SecurityRules["Firestore Rules v2"]
SecurityRules -->|"Validation"| ValidStudents[("valid_students Collection")]
SecurityRules -->|"QR Verification"| CheckinsCol[("checkins Collection")]
end
sequenceDiagram
autonumber
actor Student as Student Client
participant AuthUI as Login / Signup UI
participant Service as AuthService
participant Firestore as Cloud Firestore
participant FBAuth as Firebase Auth
participant Admin as Admin / Listener
Student->>AuthUI: Enters Email, Password, RegNo & Uploads ID Card
AuthUI->>Service: registerStudent(email, password, regNo, idCard)
Service->>Firestore: Check valid_students record for RegNo
alt RegNo Not Found or Linked to Different Email
Firestore-->>Service: Invalid / Unauthorized
Service-->>AuthUI: Throw Registration Error
AuthUI-->>Student: Display Error Notification
else RegNo Validated
Service->>FBAuth: createUserWithEmailAndPassword()
FBAuth-->>Service: Auth Tokens & User Credential
Service->>Firestore: Update valid_students: is_registered = true
Service->>Firestore: Create user profile with ID Card & initial status
Service-->>AuthUI: Auth Success
AuthUI-->>Student: Redirect to /discover
end
note over Student, Firestore: Real-Time Session Kill Switch Listener
Admin->>Firestore: Set valid_students record is_registered = false
Firestore-->>Student: Real-time onSnapshot Triggered
Student->>Student: Display "Session Revoked by Admin!" Banner
Student->>FBAuth: Trigger automatic logout & Redirect to /login
sequenceDiagram
autonumber
actor Leader as Club Leader
actor Volunteer as Student Volunteer
participant Dashboard as ClubLeadDashboard
participant Discovery as Discovery Page
participant Firestore as Cloud Firestore
Leader->>Dashboard: Click "Generate Check-in QR"
Dashboard->>Firestore: Create checkins/{activityId} (token, expiresAt)
Dashboard-->>Leader: Render visual QR Code (token URL)
Volunteer->>Discovery: Open "Scan Check-In QR" Modal
Volunteer->>Discovery: Scan QR Code via Live Camera
Discovery->>Firestore: Read checkins/{activityId} & validate token
alt Token Expired or Invalid
Firestore-->>Discovery: Token Invalid / Expired
Discovery-->>Volunteer: Show Error: "Check-in expired or invalid"
else Token Validated
Firestore->>Firestore: Add Volunteer UID to activities.verified_attendees
Firestore->>Firestore: Increment User completedOps count (+1)
Firestore-->>Discovery: Check-in Verified!
Discovery-->>Volunteer: Display "Attendance Verified (+1 Op)" Badge
end
flowchart LR
subgraph ClientA ["Student A"]
A1["Select Peer / Group"] --> A2["Send Message"]
end
subgraph FirestoreBackend ["Firestore Backend"]
B1[("chats Collection")]
B2[("chats/chatId/messages Subcollection")]
end
subgraph ClientB ["Student B"]
C1["Live onSnapshot Listener"] --> C2["Render Chat Bubble & Presence"]
end
subgraph ExpiryWorker ["Expiry Worker"]
E1["Check expiresAt Timestamp"] -->|"If Current Time > expiresAt"| E2["Filter / Purge Ephemeral Room"]
end
A2 -->|"sendMessage service"| B2
A2 -->|"updateDoc lastMessage"| B1
B2 -->|"Real-Time Push"| C1
B1 --> ExpiryWorker
Campus Connect operates under a two-tier security model in Cloud Firestore:
{
"registrationNumber": "241001001218",
"email": "student@university.edu",
"is_registered": true,
"lastLogin": "Timestamp"
}{
"uid": "firebase_auth_uid",
"name": "Anirban Sarkar",
"regNo": "241001001218",
"branch": "CSE",
"batch": "2024-28",
"seniority": "Senior",
"college": "Institute of Engineering & Management",
"bio": "Coder / Innovator / Troubleshooter",
"interests": ["Coding", "AI-ML", "Physics"],
"role": "student",
"photoUrl": "https://...",
"idCardUrl": "https://...",
"completedOps": 5,
"isOnline": true,
"lastSeen": "Timestamp",
"location": {
"lat": 22.5726,
"lng": 88.4337
},
"updatedAt": "Timestamp"
}{
"token": "a8f9c2d1-e4b5-4a6c-9d8e-1f2a3b4c5d6e",
"expiresAt": "Timestamp (Event end time or +2 hours)",
"createdBy": "lead_uid",
"activityId": "activity_document_id"
}{
"activityId": "auto_generated_id",
"event_title": "Campus AI Hackathon",
"community_name": "Coding Club",
"description": "Building next-gen AI tools",
"event_date": "2026-10-15",
"image_url": "https://...",
"volunteer_list": ["uidA", "uidB"],
"verified_attendees": ["uidA"],
"created_by": "lead_uid"
}{
"chatId": "uidA_uidB",
"type": "group | ephemeral_group",
"groupName": "Hackathon Squad",
"users": ["uidA", "uidB", "uidC"],
"createdBy": "uidA",
"admins": ["uidA"],
"lastMessage": "Let's meet at 5 PM!",
"createdAt": "Timestamp",
"updatedAt": "Timestamp",
"expiresAt": "Timestamp (1 Hour from creation)"
}{
"messageId": "auto_generated_id",
"senderId": "uidA",
"text": "Hey everyone!",
"createdAt": "Timestamp"
}// reports/{reportId}
{
"reporterId": "uidA",
"reportedUserId": "uidB",
"reason": "Harassment / Spam",
"details": "Inappropriate messages in group chat",
"createdAt": "Timestamp"
}
// blocks/{blockId}
{
"blockerId": "uidA",
"blockedUserId": "uidB",
"createdAt": "Timestamp"
}- βοΈ React 18.3 β Functional components, custom hooks, and Context API architecture.
- β‘ Vite 7.2 β Instant Hot Module Replacement (HMR) and optimized ESbuild pipelines.
- π¦ React Router v6 β Declarative client-side routing & protected route wrappers.
- π¨ Tailwind CSS v4 β Utility-first engine with high-performance CSS
@themevariables. - π« Framer Motion 12 β Smooth layout transitions and interactive card animations.
- π¨ Lucide React β Crisp icon library.
- π· HTML5-QRCode β Web-based live camera scanner for QR verification.
- π§ Three.js β 3D graphics rendering engine.
- β‘ OGL (Minimal WebGL) β Custom GPU light ray background shader (
LightRays.jsx).
- π₯ Firebase Authentication β Secure email/password auth.
- π¦ Cloud Firestore β Real-time NoSQL document store with live snapshot sync.
- πΎ Supabase JS Client β Auxiliary database integration option.
- π FastAPI / Python Admin SDK β Python backend environment for batch verification & administrative scripts.
Firestore enforcement is governed by firestore.rules (rules version 2):
- Campus Gatekeeper:
valid_studentscollection readable by clients for auth validation. - Profile Ownership:
users/{userId}documents are only writable by the authenticated owner (request.auth.uid == userId). - QR Attendance Verification:
checkins/{activityId}documents readable by authenticated volunteers;activitiesverified attendee updates allowed for signed-in users. - Private Messaging Shield: Chat threads (
chats/{chatId}) and nested messages (messages/{messageId}) are accessible only to users explicitly included in theresource.data.usersarray. - Moderation Safety:
reportsandblockscollections writeable by reporting users.
- Node.js:
v18.0.0or higher - npm or yarn
git clone https://github.com/your-username/campusConnect.git
cd campusConnectcd frontend
npm installVerify or update your Firebase configuration parameters in frontend/src/conf/firebase.js:
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.appspot.com",
messagingSenderId: "YOUR_SENDER_ID",
appId: "YOUR_APP_ID"
};
const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
export const db = getFirestore(app);
export const storage = getStorage(app);npm run devOpen your browser at http://localhost:5173.
# In the repository root
pip install -r requirements.txtcampusConnect/
βββ firestore.rules # Security rules for Cloud Firestore (v2)
βββ db.json # Local seed / mock database reference
βββ requirements.txt # Python dependencies for admin tools
βββ LICENSE # MIT License
βββ frontend/
βββ package.json # Node.js dependencies and scripts
βββ vite.config.js # Vite build configuration
βββ index.html # Main HTML document entrypoint
βββ src/
βββ main.jsx # App entrypoint
βββ App.jsx # Routes definition & Protected Route wrapper
βββ index.css # Global CSS, theme variables & WebGL canvas reset
βββ conf/
β βββ firebase.js # Firebase SDK initialization
β βββ supabase.js # Supabase client setup
βββ context/
β βββ mainContext.jsx # Auth state, profile listener & Kill-Switch logic
βββ services/
β βββ Authservice.js # Login, signup, logout & online status services
β βββ chatService.js # Direct, group, ephemeral chat & real-time listeners
β βββ profileService.js # Profile fetch & update methods
βββ components/
β βββ Layout.jsx # Responsive Navbar & Sidebar shell
β βββ Loading.jsx # Futuristic loading screen
β βββ NotificationsPopup.jsx # Real-time alert notifications
β βββ BrandLogo.jsx # Animated brand logo component
β βββ LightPillar.jsx # Dynamic visual effect backdrop pillar
β βββ Cards/
β β βββ CardStack.jsx # Swipeable card container logic
β β βββ ProfileCard.jsx # Student profile card rendering
β β βββ VolunteerCard.jsx# Activity/Volunteer card rendering
β βββ auth/
β β βββ LoginUI.jsx # Login interface
β β βββ SignUpUI.jsx # Registration interface with ID Card upload
β βββ effects/
β βββ LightRays.jsx # WebGL GPU Light Rays shader canvas
β βββ LightRays.css # Shader layout styling
βββ pages/
βββ LandingPage.jsx # Hero landing page with multi-college ecosystem picker
βββ Login.jsx # Auth entry page
βββ Discovery.jsx # Swipe card discovery & live QR Scanner
βββ Community.jsx # Campus feed & Community Club Groups tab
βββ Chat.jsx # Real-time direct & group chat interface
βββ Find.jsx # Student search with Seniority & Department filters
βββ LocationTracking.jsx # Adaptive campus location map with user clustering
βββ Requests.jsx # Connection / Friend request management
βββ Profile.jsx # Student profile view & verified ops stats
βββ EditProfile.jsx # Profile editor
βββ ClubHub.jsx # Campus clubs catalog
βββ ClubLeadDashboard.jsx# Leader dashboard with QR Check-In Token Generator
βββ Feedback.jsx # Campus user feedback submission
- Campus Gatekeeper Verification
- Real-Time Admin Kill-Switch
- Student Profile Management
- Friend Request Handshake Engine
- Direct & Ephemeral Group Chat
- WebGL Light Rays Background Shaders
- QR-Code Physical Event Check-In System
- Community Club Groups & Leaderboard
- Adaptive Location Density Mapping
- Seniority (Junior / Senior) Filtering
- ID Card Verification Onboarding
- π€ AI Matchmaker: ML-driven student pairing based on project goals & interests.
- π± Mobile Native: React Native mobile app build for iOS & Android.
- π End-to-End Encrypted Chat: Client-side payload encryption for private messages.
Contributions make the campus community thrive! To contribute:
- Fork the Repository.
- Create a Feature Branch:
git checkout -b feature/CoolCampusFeature - Commit your Changes:
git commit -m 'Add CoolCampusFeature' - Push to the Branch:
git push origin feature/CoolCampusFeature - Open a Pull Request.
Distributed under the MIT License. See LICENSE for details.
Built with β€οΈ for students, by students. If you find Campus Connect helpful, give it a β on GitHub!