diff --git a/public/campus-video.mp4 b/public/campus-video.mp4
new file mode 100644
index 0000000..7cbb7ff
Binary files /dev/null and b/public/campus-video.mp4 differ
diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx
new file mode 100644
index 0000000..2876494
--- /dev/null
+++ b/src/components/Header/Header.tsx
@@ -0,0 +1,135 @@
+import { useState, useEffect } from 'react';
+import { useNavigate } from 'react-router-dom';
+import { Search, Bell, Menu, Sparkles, User, Calendar, ShieldCheck, LogIn } from 'lucide-react';
+import { useAuth } from '@/context/AuthContext';
+
+interface HeaderProps {
+ onToggleSidebar: () => void;
+}
+
+export default function Header({ onToggleSidebar }: HeaderProps) {
+ const [searchQuery, setSearchQuery] = useState('');
+ const [currentDate, setCurrentDate] = useState('');
+ const navigate = useNavigate();
+ const { user, isAuthenticated, isVerifiedStudent, loginWithGoogle } = useAuth();
+
+ useEffect(() => {
+ const now = new Date();
+ const formatted = now.toLocaleDateString('en-US', {
+ weekday: 'short',
+ month: 'short',
+ day: 'numeric',
+ year: 'numeric',
+ });
+ setCurrentDate(formatted);
+ }, []);
+
+ const handleSearch = (e: React.FormEvent) => {
+ e.preventDefault();
+ if (!searchQuery.trim()) return;
+ const q = searchQuery.toLowerCase();
+ if (q.includes('note') || q.includes('pyq') || q.includes('syllabus')) {
+ navigate('/notes');
+ } else if (q.includes('bus') || q.includes('route')) {
+ navigate('/bus-routes');
+ } else if (q.includes('faculty') || q.includes('teacher') || q.includes('prof')) {
+ navigate('/faculty');
+ } else if (q.includes('club') || q.includes('event')) {
+ navigate('/events');
+ } else if (q.includes('ai') || q.includes('chat') || q.includes('bot')) {
+ navigate('/ai-assistant');
+ } else if (q.includes('community') || q.includes('qa') || q.includes('question')) {
+ navigate('/community');
+ } else if (q.includes('collab') || q.includes('dev')) {
+ navigate('/collab');
+ } else if (q.includes('raise') || q.includes('incubator') || q.includes('pitch')) {
+ navigate('/raise');
+ } else {
+ navigate(`/notes?search=${encodeURIComponent(searchQuery)}`);
+ }
+ };
+
+ return (
+
+
+ {/* Mobile Toggle */}
+
+
+
+
+ {/* Global Search Bar */}
+
+
+
+ {/* Right Header Status Bar */}
+
+ {/* Date Display Badge */}
+
+
+ {currentDate}
+
+
+ {/* Notifications Icon */}
+
+
+
+
+
+ {/* User Auth Quick Badge */}
+ {isAuthenticated && user ? (
+
+ {user.pictureUrl ? (
+
+ ) : (
+
+ {user.name.charAt(0)}
+
+ )}
+
+
+ {user.name}
+
+
+ {isVerifiedStudent ? 'Verified Student' : 'RIT Account'}
+
+
+
+ ) : (
+
+
+ Sign In
+
+ )}
+
+
+ );
+}
diff --git a/src/components/Sidebar/Sidebar.tsx b/src/components/Sidebar/Sidebar.tsx
new file mode 100644
index 0000000..2fe921b
--- /dev/null
+++ b/src/components/Sidebar/Sidebar.tsx
@@ -0,0 +1,281 @@
+import { useState, useEffect } from 'react';
+import { Link, useLocation, useNavigate } from 'react-router-dom';
+import { motion, AnimatePresence } from 'framer-motion';
+import {
+ LayoutDashboard,
+ BookOpen,
+ Wrench,
+ Bot,
+ MapPin,
+ Bus,
+ Users,
+ Calendar,
+ MessageSquare,
+ Code2,
+ Trophy,
+ Rocket,
+ ShieldAlert,
+ LogOut,
+ LogIn,
+ ShieldCheck,
+ ChevronRight,
+ Sparkles,
+ Menu,
+ X
+} from 'lucide-react';
+import { useAuth } from '@/context/AuthContext';
+
+interface SidebarProps {
+ isOpen: boolean;
+ onToggle: () => void;
+}
+
+interface NavItem {
+ label: string;
+ path: string;
+ icon: any;
+ badge?: string;
+ highlight?: boolean;
+}
+
+interface NavGroup {
+ title: string;
+ items: NavItem[];
+}
+
+export default function Sidebar({ isOpen, onToggle }: SidebarProps) {
+ const location = useLocation();
+ const navigate = useNavigate();
+ const { user, isAuthenticated, isVerifiedStudent, loginWithGoogle, logout } = useAuth();
+
+ const checkIsActive = (linkPath: string) => {
+ const [pathName, searchString] = linkPath.split('?');
+ if (location.pathname !== pathName) return false;
+
+ if (pathName === '/notes') {
+ const params = new URLSearchParams(location.search);
+ const hasToolkit = params.has('toolkit') || params.get('section') === 'toolkit';
+ if (searchString) {
+ return hasToolkit;
+ } else {
+ return !hasToolkit;
+ }
+ }
+
+ return true;
+ };
+
+ const navGroups: NavGroup[] = [
+ {
+ title: 'ACADEMICS & PORTAL',
+ items: [
+ { label: 'Dashboard', path: '/', icon: LayoutDashboard },
+ { label: 'Notes & PYQs', path: '/notes', icon: BookOpen },
+ { label: 'Student Toolkit', path: '/notes?section=toolkit', icon: Wrench },
+ { label: 'RIT AI Chatbot', path: '/ai-assistant', icon: Bot, badge: 'AI' },
+ ],
+ },
+ {
+ title: 'CAMPUS & UTILITIES',
+ items: [
+ { label: 'Bus Tracker', path: '/bus-routes', icon: Bus },
+ { label: 'Campus Map', path: '/campus', icon: MapPin },
+ { label: 'Faculty Directory', path: '/faculty', icon: Users },
+ { label: 'Student Clubs', path: '/events', icon: Calendar },
+ ],
+ },
+ {
+ title: 'COMMUNITY & DEV',
+ items: [
+ { label: 'Freshers Q&A', path: '/community', icon: MessageSquare },
+ { label: 'Dev Collab Hub', path: '/collab', icon: Code2 },
+ { label: 'LeetCode Board', path: '/leetcode', icon: Trophy },
+ { label: 'RAISE Incubator', path: '/raise', icon: Rocket, highlight: true },
+ ],
+ },
+ ];
+
+ return (
+ <>
+ {/* Mobile Backdrop Overlay */}
+
+ {isOpen && (
+
+ )}
+
+
+ {/* Main Sidebar Container */}
+
+ {/* Top Header & Branding */}
+
+
+
+
+
+
+
+
+
+ RIT Portal
+
+
+ v2.0
+
+
+
+ Rajalakshmi Tech
+
+
+
+
+
+
+
+
+
+ {/* Quick Pitch CTA inside Sidebar */}
+
+
+
+
+
+
+
+ RAISE Incubator
+
+ Pitch Startup Idea
+
+
+
+
+
+ {/* Navigation Groups */}
+
+ {navGroups.map((group) => (
+
+
+ {group.title}
+
+
+ {group.items.map((item) => {
+ const isActive = checkIsActive(item.path);
+ const Icon = item.icon;
+
+ return (
+
+
+
+ {item.label}
+
+
+ {item.badge && (
+
+ {item.badge}
+
+ )}
+
+ {item.highlight && !isActive && (
+
+ )}
+
+ );
+ })}
+
+ ))}
+
+
+
+ {/* Footer User Profile & Auth Section */}
+
+ {isAuthenticated && user ? (
+
+
+ {user.pictureUrl ? (
+
+ ) : (
+
+ {user.name.charAt(0).toUpperCase()}
+
+ )}
+
+
+ {user.name}
+
+
+ {isVerifiedStudent ? (
+
+ Verified Student
+
+ ) : (
+ RIT Account
+ )}
+
+
+
+
+
+
+
+
+ ) : (
+
+
+ Student Sign In
+
+ )}
+
+
+ >
+ );
+}
diff --git a/src/layouts/MainLayout.tsx b/src/layouts/MainLayout.tsx
index efe61ee..7e3f9f2 100644
--- a/src/layouts/MainLayout.tsx
+++ b/src/layouts/MainLayout.tsx
@@ -1,6 +1,8 @@
-import { Outlet, useSearchParams, useLocation } from 'react-router-dom';
+import { useState } from 'react';
+import { Outlet, useLocation } from 'react-router-dom';
import { motion, AnimatePresence } from 'framer-motion';
-import Navbar from '@/components/Navbar/Navbar';
+import Sidebar from '@/components/Sidebar/Sidebar';
+import Header from '@/components/Header/Header';
import Footer from '@/components/Footer/Footer';
const pageVariants = {
@@ -10,26 +12,41 @@ const pageVariants = {
};
export default function MainLayout() {
+ const [isSidebarOpen, setIsSidebarOpen] = useState(false);
const location = useLocation();
- const [searchParams] = useSearchParams();
- const hideFooter = location.pathname === '/notes' && searchParams.has('toolkit');
+
+ const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);
return (
-
-
-
-
-
-
-
- {!hideFooter &&
}
+
+ {/* Left Sidebar Navigation */}
+
+
+ {/* Main Right Viewport Wrapper */}
+
+ {/* Top Header */}
+
+
+ {/* Dynamic Page Content */}
+
+
+ {/* Global Footer */}
+
+
);
}
diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx
index d8d0482..872454d 100644
--- a/src/pages/Home/Home.tsx
+++ b/src/pages/Home/Home.tsx
@@ -1,248 +1,400 @@
-import { motion, useScroll, useTransform } from 'framer-motion';
+import { useState, useRef } from 'react';
import { Link } from 'react-router-dom';
+import { motion } from 'framer-motion';
import {
- ArrowRight, BookOpen, Bot, GraduationCap,
- CheckCircle, Zap, Shield, Trophy, Award, Cpu, Users, MapPin, Sparkles
+ BookOpen,
+ Bot,
+ Bus,
+ Users,
+ Trophy,
+ Rocket,
+ Code2,
+ MapPin,
+ Sparkles,
+ ArrowRight,
+ Play,
+ Pause,
+ Volume2,
+ VolumeX,
+ FileText,
+ Clock,
+ ShieldCheck,
+ CheckCircle2,
+ ExternalLink,
+ ChevronRight,
+ Bell,
+ GraduationCap
} from 'lucide-react';
-import SectionTitle from '@/components/SectionTitle/SectionTitle';
-import FeatureCard from '@/components/FeatureCard/FeatureCard';
-import { StaggerContainer, StaggerItem } from '@/components/AnimatedContainer/AnimatedContainer';
-import AnimatedContainer from '@/components/AnimatedContainer/AnimatedContainer';
-import { FEATURES, CAMPUS_LOCATIONS } from '@/constants';
-import * as LucideIcons from 'lucide-react';
-
-import LazyVideoHero from '@/components/LazyVideoHero/LazyVideoHero';
+import { FEATURES, FACULTY_DATA, BUS_ROUTES } from '@/constants';
+import { useAuth } from '@/context/AuthContext';
export default function Home() {
- const { scrollY } = useScroll();
- const heroOpacity = useTransform(scrollY, [0, 450], [1, 0]);
- const heroY = useTransform(scrollY, [0, 450], [0, -60]);
+ const { user, isAuthenticated } = useAuth();
+ const [isPlaying, setIsPlaying] = useState(true);
+ const [isMuted, setIsMuted] = useState(true);
+ const videoRef = useRef
(null);
+
+ const togglePlay = () => {
+ if (videoRef.current) {
+ if (isPlaying) {
+ videoRef.current.pause();
+ } else {
+ videoRef.current.play();
+ }
+ setIsPlaying(!isPlaying);
+ }
+ };
+
+ const toggleMute = () => {
+ if (videoRef.current) {
+ videoRef.current.muted = !isMuted;
+ setIsMuted(!isMuted);
+ }
+ };
+
+ const dailyNotices = [
+ {
+ id: '1',
+ title: 'Official Moodle Notes & PYQs Updated',
+ date: 'Aug 12, 2026',
+ category: 'Academics',
+ desc: '1st to 8th semester course notes and previous year question papers are live on Moodle portal.',
+ color: '#8B5CF6',
+ },
+ {
+ id: '2',
+ title: 'RAISE Incubator Pitching Registration Open',
+ date: 'Aug 15, 2026',
+ category: 'Innovation',
+ desc: 'Submit your startup ideation proposals to win prototyping grants up to ₹2 Lakhs.',
+ color: '#EC4899',
+ },
+ {
+ id: '3',
+ title: 'RIT Code Fest 24-Hour Hackathon',
+ date: 'Aug 20, 2026',
+ category: 'Events',
+ desc: 'Annual coding hackathon hosted by CSE Department. Cash prizes & internship opportunities.',
+ color: '#F97316',
+ },
+ ];
return (
-
- {/* ─── Hero Section with IntersectionObserver Lazy Video ─────────────────── */}
-
-
-
- {/* Heading */}
-
- Welcome to
-
+
+ {/* ─── 1. Welcome Hero Banner with Video Playback ─────────────────── */}
+
+ {/* Subtle Decorative Background Glows */}
+
+
-
- RIT Freshers Hub
-
+
+ {/* Left Text & CTAs */}
+
+
+
+ {new Date().toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' })}
+
-
- Your centralized gateway to campus life at Rajalakshmi Institute of Technology — academic notes, AI assistant, bus routes, faculty directory, and campus navigation.
-
+
+ Welcome back,{' '}
+
+ {isAuthenticated && user ? user.name.split(' ')[0] : 'Student'}!
+
+
- {/* Call to Actions */}
-
-
-
-
- Explore Hub
-
-
-
+
+ Always stay updated with semester notes, live bus routes, AI chatbot assistant, community Q&A, and startup incubation pitching.
+
-
-
+
-
- Ask Assistant
-
-
+
+ Launch Moodle Notes
+
+
-
-
-
- Pitch your Idea - RAISE
-
-
-
-
-
-
-
+
+
Ask AI Chatbot
+
- {/* Sleek Stats Card Section */}
-
-
-
-
- {[
- { value: '20+', label: 'SPORTS', icon: Trophy },
- { value: '100+', label: 'FACULTY', icon: GraduationCap },
- { value: '18', label: 'CLUBS', icon: Award },
- { value: '24/7', label: 'ASSISTANT', icon: Cpu },
- { value: '5000+', label: 'STUDENTS', icon: Users },
- ].map((stat, i) => (
-
-
-
+
+
+ RAISE Incubator
+
+
+
+
+ {/* Right Video Playback & Preview Showcase */}
+
+
+
+
+ {/* Video Overlay Controls */}
+
+
+
+ Campus Tour Video
+
+
+ {isMuted ? : }
+
+
+
+
+
+
+ RIT Campus Infrastructure
+
+ Official Rajalakshmi Institute of Technology Overview
-
+
+
+
+
+
+
+ {/* ─── 2. Enterprise Quick Metrics Grid ────────────────────────────── */}
+
+
+
+
+ Academic Notes
+
+
+ 1st – 8th Sem
+
+
+ Moodle Verified
+
+
+
+
+
+
+
+
+
+
+ Bus Routes
+
+
+ {BUS_ROUTES.length} Active Routes
+
+
+ 7:00 AM Departures
+
+
+
+
+
+
+
+
+
+
+ AI Assistant
+
+
+ 24/7 Live
+
+
+ Instant Answers
+
+
+
+
+
+
+
+
+
+
+ Community Q&A
+
+
+ Senior Helpers
+
+
+ Verified Answers
+
+
+
+
+
+
+
+
+ {/* ─── 3. Main Dashboard Layout (Two Columns: Courses Grid + Right Widgets) ────── */}
+
+ {/* Left 8 Cols: Enrolled Modules / Quick Access */}
+
+
+
+
+ Academic Modules & Tools
+
+
Quick access to all essential student portal tools
+
+
+
+
+ {FEATURES.map((feature) => {
+ return (
+
+
+
+
+
+
+
+ Official Module
+
+
+
+
+ {feature.title}
+
+
+
+ {feature.description}
+
+
+
+
- {stat.value}
+
Launch Module
+
+
+
+ );
+ })}
+
+
+
+ {/* Right 4 Cols: Faculty Spotlight & Daily Notices Widget */}
+
+ {/* Featured Instructors / Faculty */}
+
+
+
+ Course Instructors
+
+
+ See all
+
+
+
+
+ {FACULTY_DATA.slice(0, 4).map((prof) => (
+
+
+ {prof.name.replace('Dr. ', '').replace('Prof. ', '').charAt(0)}
-
+
+ {prof.name}
+
+ {prof.department}
+
+
- {stat.label}
-
+
+
))}
-
-
-
+
- {/* ─── Features Section ─────────────────────────────────────────────────── */}
-
-
-
-
-
- {FEATURES.map((feature) => (
-
-
-
- ))}
-
-
-
-
- {/* ─── Campus Quick Nav ─────────────────────────────────────────────────── */}
-
-
-
-
-
-
- {/* Map Teaser Header */}
-
-
-
-
-
-
-
-
- Interactive Campus Map
-
-
- Locate all major campus blocks, labs, library & amenities.
-
-
-
- Open Full Map
-
-
-
-
-
- {/* Quick Nav Grid */}
-
- {CAMPUS_LOCATIONS.map((loc) => {
- const Icon = (LucideIcons as unknown as Record
>)[loc.icon];
- return (
-
-
-
- {Icon && }
-
-
- {loc.name}
-
-
-
- );
- })}
+ {/* Daily Notices & Announcements */}
+
+
+
+
+
+ Daily Campus Notices
+
+
+ Live Feed
+
-
+
+
+ {dailyNotices.map((notice) => (
+
+
+
+ {notice.category}
+
+ {notice.date}
+
+
+
+ {notice.title}
+
+
+
+ {notice.desc}
+
+
+ ))}
+
+
-
+
);
}