diff --git a/admin/src/shared/Sidebar.jsx b/admin/src/shared/Sidebar.jsx
index 6de4698..4dab128 100644
--- a/admin/src/shared/Sidebar.jsx
+++ b/admin/src/shared/Sidebar.jsx
@@ -1,4 +1,3 @@
-
/*
Copyright 2024 Himanshu Dinkar
@@ -16,9 +15,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import { useState ,useContext} from "react";
+import { useState, useContext } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
-// import { ContextStore } from "../store/ContextStore";
+import { motion } from "framer-motion";
+import { Tooltip } from "@mui/material";
import Logo from "../components/Dashboard/Logo";
import Lottie from "lottie-react";
import loadingAnimation from "../assets/loading.json";
@@ -30,9 +30,9 @@ import EventNoteIcon from '@mui/icons-material/EventNote';
import QuizIcon from '@mui/icons-material/Quiz';
import AssignmentIcon from '@mui/icons-material/Assignment';
import Modal from "../components/Model";
+
const Sidebar = () => {
-
- const {userRole} = useContext(RoleContext);
+ const { userRole } = useContext(RoleContext);
const location = useLocation();
const [isModalOpen, setIsModalOpen] = useState(false);
const navigate = useNavigate();
@@ -40,163 +40,157 @@ const Sidebar = () => {
// Loader state
const [isLoading, setIsLoading] = useState(false);
-
const isActive = (path) => location.pathname === path;
-
const handleNavigation = (path) => {
if (location.pathname !== path) {
setIsLoading(true);
setTimeout(() => {
setIsLoading(false);
navigate(path);
- }, 1500);
+ }, 1500);
}
};
- return (
-
- {/* Sidebar */}
-
-
-
-
-
handleNavigation("/dashboard")}
- className={`list-style-none flex items-center gap-4 font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer hover:text-gray-700 transition-all duration-75 ${
- isActive("/dashboard")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
-
- Dashboard
-
+ const MenuItem = ({ path, icon: Icon, label, onClick, show = true }) => {
+ if (!show) return null;
+
+ return (
+
+
+
+
+ {label}
+
+
+ );
+ };
+ return (
+
+
+
+
+
-{userRole==='Director' && handleNavigation("/add-teachers")}
- className={`list-style-none font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/add-teachers")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
- Add Teachers
- }
-
-
- {userRole==='Registrar' && handleNavigation("/enroll-students")}
- className={`list-style-none font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/enroll-students")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
- Enroll Students
- }
-
- {(userRole==='Teacher'||userRole==='Director') && handleNavigation("/announcement")}
- className={`list-style-none flex items-center gap-2 font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/announcement")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
-
- Announcement
- }
-
-
- {userRole==='Teacher'&& handleNavigation("/timetable")}
- className={`list-style-none flex gap-4 items-center font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/timetable")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
-
- Time Table
- }
-
-
- {userRole ==='Teacher' && handleNavigation("/post-quiz")}
- className={`list-style-none flex items-center gap-4 font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/post-quiz")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
-
- Quiz
- }
-
-
- {userRole==='Teacher'&& handleNavigation("/post-assignment")}
- className={`list-style-none flex items-center gap-4 font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/post-assignment")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
-
- Assignment
- }
-
-
- {userRole === 'Registrar' && handleNavigation("/student-detail")}
- className={`list-style-none font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/admin-live")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
- Student Details
- }
-
- {userRole === 'Registrar' && handleNavigation("/teachers")}
- className={`list-style-none font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/admin-live")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
- Teacher Details
- }
-
- {(userRole === 'Teacher'|| userRole==='Director') &&
-
setIsModalOpen(true)}
- className={`list-style-none flex items-center gap-4 font-medium focus:bg-blue-400 p-3 w-[80%] cursor-pointer ${
- isActive("/admin-live")
- ? "bg-white text-black border rounded-md"
- : "text-white"
- }`}
- >
-
- Go Live Class
-
- }
-
-
-
+
+
+ handleNavigation("/dashboard")}
+ />
+
+ handleNavigation("/add-teachers")}
+ show={userRole === 'Director'}
+ />
+
+ handleNavigation("/enroll-students")}
+ show={userRole === 'Registrar'}
+ />
+
+ handleNavigation("/announcement")}
+ show={userRole === 'Teacher' || userRole === 'Director'}
+ />
+
+ handleNavigation("/timetable")}
+ show={userRole === 'Teacher'}
+ />
+
+ handleNavigation("/post-quiz")}
+ show={userRole === 'Teacher'}
+ />
+
+ handleNavigation("/post-assignment")}
+ show={userRole === 'Teacher'}
+ />
+
+ handleNavigation("/student-detail")}
+ show={userRole === 'Registrar'}
+ />
+
+ handleNavigation("/teachers")}
+ show={userRole === 'Registrar'}
+ />
+
+ {(userRole === 'Teacher' || userRole === 'Director') && (
+
+ setIsModalOpen(true)}
+ className="w-full flex items-center gap-3 px-4 py-3
+ bg-gradient-to-r from-blue-500 to-indigo-500
+ text-white rounded-xl shadow-lg hover:shadow-xl
+ transition-all duration-300"
+ >
+
+ Go Live Class
+
+
+ )}
+
+
+
setIsModalOpen(false)}
onSubmit={() => console.log("Handle Room Join")}
email=""
- setEmail={() => {}}
+ setEmail={() => { }}
roomId=""
- setRoomId={() => {}}
+ setRoomId={() => { }}
loading={false}
/>
@@ -208,7 +202,6 @@ const Sidebar = () => {
loop={true}
className="w-20 h-20"
/>
-
)}
diff --git a/client/package-lock.json b/client/package-lock.json
index 6c8ff42..dcbc461 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -16,6 +16,7 @@
"axios": "^1.7.7",
"clsx": "^2.1.1",
"dompurify": "^3.2.3",
+ "framer-motion": "^12.0.6",
"lucide-react": "^0.459.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -3469,6 +3470,33 @@
"url": "https://github.com/sponsors/rawify"
}
},
+ "node_modules/framer-motion": {
+ "version": "12.0.6",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.0.6.tgz",
+ "integrity": "sha512-LmrXbXF6Vv5WCNmb+O/zn891VPZrH7XbsZgRLBROw6kFiP+iTK49gxTv2Ur3F0Tbw6+sy9BVtSqnWfMUpH+6nA==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-dom": "^12.0.0",
+ "motion-utils": "^12.0.0",
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "@emotion/is-prop-valid": "*",
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@emotion/is-prop-valid": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@@ -4544,6 +4572,21 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/motion-dom": {
+ "version": "12.0.0",
+ "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.0.0.tgz",
+ "integrity": "sha512-CvYd15OeIR6kHgMdonCc1ihsaUG4MYh/wrkz8gZ3hBX/uamyZCXN9S9qJoYF03GqfTt7thTV/dxnHYX4+55vDg==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-utils": "^12.0.0"
+ }
+ },
+ "node_modules/motion-utils": {
+ "version": "12.0.0",
+ "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.0.0.tgz",
+ "integrity": "sha512-MNFiBKbbqnmvOjkPyOKgHUp3Q6oiokLkI1bEwm5QA28cxMZrv0CbbBGDNmhF6DIXsi1pCQBSs0dX8xjeER1tmA==",
+ "license": "MIT"
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -6055,6 +6098,12 @@
"dev": true,
"license": "Apache-2.0"
},
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD"
+ },
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
diff --git a/client/package.json b/client/package.json
index 4797c71..fa28a29 100644
--- a/client/package.json
+++ b/client/package.json
@@ -18,6 +18,7 @@
"axios": "^1.7.7",
"clsx": "^2.1.1",
"dompurify": "^3.2.3",
+ "framer-motion": "^12.0.6",
"lucide-react": "^0.459.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
diff --git a/client/public/images/myImage.jpeg b/client/public/images/myImage.jpeg
new file mode 100644
index 0000000..be2e0e3
Binary files /dev/null and b/client/public/images/myImage.jpeg differ
diff --git a/client/src/components/AI Powered Assistant/AiAssistent.jsx b/client/src/components/AI Powered Assistant/AiAssistent.jsx
index b3bc3c8..e9f14bc 100644
--- a/client/src/components/AI Powered Assistant/AiAssistent.jsx
+++ b/client/src/components/AI Powered Assistant/AiAssistent.jsx
@@ -22,6 +22,8 @@ import SendIcon from '@mui/icons-material/Send';
import AssistantIcon from '@mui/icons-material/AssistantOutlined';
import { FaSpinner } from 'react-icons/fa';
import DOMPurify from 'dompurify';
+import { motion, AnimatePresence } from "framer-motion";
+import { Sparkles, Brain, Copy, SendHorizontal } from 'lucide-react';
const AiAssistent = () => {
const [input, setInput] = useState("");
@@ -80,66 +82,106 @@ const AiAssistent = () => {
};
return (
-
-
-
-
-
- Classroom AI Assistant
+
+
+ {/* Header Section */}
+
+
+
+
+
+ AI Classroom Assistant
-
- Ask me anything about your course material, assignments, or schedule
+
+ Your intelligent learning companion. Ask questions about your courses, assignments, or any academic topic.
-
-
- {/* Response Container - Above Input */}
- {output && (
-
-
-
-
+
+
+
+ {/* Chat Container */}
+
+ {/* Response Display */}
+
+ {output && (
+
+
+
+
+
+
{
+ navigator.clipboard.writeText(output);
+ toast.success("Response copied to clipboard!");
+ }}
+ className="flex items-center gap-2 text-sm text-gray-400 hover:text-white transition-colors"
+ >
+
+ Copy response
+
+
+
+
+ )}
+
+
+ {/* Input Form */}
+
- )}
-
- {/* Input Form - Fixed at Bottom */}
-
-
- setInput(e.target.value)}
- placeholder="Type your question here..."
- className="w-full px-6 py-4 text-gray-900 bg-white rounded-xl shadow-sm border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none transition-all duration-200 placeholder-gray-500"
- rows="3"
- disabled={loading}
- />
-
-
- {loading ? (
- <>
-
- Generating Response...
- >
- ) : (
- <>
-
- Ask Question
- >
- )}
-
-
+
+ {loading ? (
+ <>
+
+ Processing your question...
+ >
+ ) : (
+ <>
+
+ Ask Question
+ >
+ )}
+
+
+
);
diff --git a/client/src/pages/About/AboutPage.tsx b/client/src/pages/About/AboutPage.tsx
index 848b8ae..5c4a3d4 100644
--- a/client/src/pages/About/AboutPage.tsx
+++ b/client/src/pages/About/AboutPage.tsx
@@ -25,33 +25,34 @@ import JourneySection from "./components/JourneySection";
import TeamSection from "./components/TeamSection";
import ServiceLayout from "../../layout/ServiceLayout";
-const AboutPage : React.FC = () => {
+const AboutPage: React.FC = () => {
return (
-
- {/* Previous sections remain unchanged */}
- {/* Hero Section */}
-
-
- {/* Stats Section */}
-
-
-
- {/* New Services Section */}
-
-
- {/* Mission Section */}
-
-
- {/* Journey Section */}
-
-
- {/* Team Section */}
-
-
-
-
- {/* Footer */}
- {/*
*/}
+
+
+ {/* Background gradient effects */}
+
+
+
+
);
};
diff --git a/client/src/pages/About/components/HeroSection.tsx b/client/src/pages/About/components/HeroSection.tsx
index 1a9f02e..0ab8ce5 100644
--- a/client/src/pages/About/components/HeroSection.tsx
+++ b/client/src/pages/About/components/HeroSection.tsx
@@ -1,19 +1,37 @@
import React from 'react';
+import { motion } from 'framer-motion';
const HeroSection = () => {
return (
-
-
-
-
- About EduMatrix
-
-
- We're on a mission to make quality education accessible to everyone through innovative technology and dedicated teaching.
-
+
+
+
+
+ Transforming Education Through Technology
+
+
+ Building the future of learning with innovative virtual classrooms and AI-powered education.
+
+
-
+
+
);
};
diff --git a/client/src/pages/About/components/JourneySection.tsx b/client/src/pages/About/components/JourneySection.tsx
index 3ecb20e..d120460 100644
--- a/client/src/pages/About/components/JourneySection.tsx
+++ b/client/src/pages/About/components/JourneySection.tsx
@@ -1,4 +1,5 @@
import React from 'react';
+import { motion } from 'framer-motion';
import milestones from "../utils/milestones.ts";
@@ -7,29 +8,47 @@ interface Milestone{
event:string;
}
-const JourneySection : React.FC = () => {
-
+const JourneySection: React.FC = () => {
return (
-
+
-
+
Our Journey
-
-
+
+
+
{milestones.map((milestone : Milestone, index : number) => (
-
-
-
+
+
-
-
-
- {milestone.event}
-
+
+
+
+ {milestone.event}
+
-
+
))}
diff --git a/client/src/pages/About/components/StatSection.tsx b/client/src/pages/About/components/StatSection.tsx
index 0f386b0..55a0eca 100644
--- a/client/src/pages/About/components/StatSection.tsx
+++ b/client/src/pages/About/components/StatSection.tsx
@@ -9,7 +9,7 @@ icon:ReactNode
const StatSection : React.FC = () => {
return (
-
+
{stats.map((stat : Stat, index:number) => (
diff --git a/client/src/pages/About/components/TeamSection.tsx b/client/src/pages/About/components/TeamSection.tsx
index e89cf66..ab5fd6e 100644
--- a/client/src/pages/About/components/TeamSection.tsx
+++ b/client/src/pages/About/components/TeamSection.tsx
@@ -1,29 +1,63 @@
import React from 'react';
+import { motion } from 'framer-motion';
-const TeamSection : React.FC = () => {
+const teamMembers = [
+ {
+ name: 'John Doe',
+ role: 'CEO & Founder',
+ image: '/path-to-image.jpg',
+ social: {
+ linkedin: '#',
+ twitter: '#'
+ }
+ },
+ // ...add more team members
+];
+
+const TeamSection: React.FC = () => {
return (
-
+
-
-
- Our Team
+
+
+ Meet Our Team
-
- We're a dedicated team of educators, technologists, and innovators working together to transform education.
+
+ Passionate educators and innovators dedicated to transforming the future of education
-
- {/* Placeholder for team members */}
-
- {[1, 2, 3].map((_, index:number) => (
-
+
+
+ {teamMembers.map((member, index) => (
+
-
- Team Member {index + 1}
- Role
-
+
+ {/* Member content */}
+
+
+
+
+
Himanshu Dinkar
+
{member.role}
+ {/* Add social links */}
+
+
+
))}
diff --git a/client/src/pages/Home/components/DashboardSection.jsx b/client/src/pages/Home/components/DashboardSection.jsx
index a09434e..0bb1cf4 100644
--- a/client/src/pages/Home/components/DashboardSection.jsx
+++ b/client/src/pages/Home/components/DashboardSection.jsx
@@ -15,44 +15,79 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import React from 'react'
-import '../CSS/HomePage.css'
+import React from 'react';
+import { motion } from 'framer-motion';
+import '../CSS/HomePage.css';
+
+const features = [
+ // { icon: "💎", text: "Role based Admin features" },
+ { icon: "💎", text: "Add teachers and students in your Virtual College" },
+ { icon: "💎", text: "Upload Assignment and Quizes for your Students" },
+ { icon: "💎", text: "Manage your College Timetable and Announcements" },
+ { icon: "💎", text: "View and Download your College Reports" },
+ { icon: "💎", text: "Go Live feature for teaching your Students" }
+];
const DashboardSection = () => {
return (
-
-
-
-
-
-
-
-
-
-
-
-
Interactive Admin Dashboard for College Faculty
-
- 💎 Role based Admin features
- 💎 Add teachers and students in your Virtual College
- 💎 Upload Assignment and Quizes for your Students
- 💎 Manage your College Timetable and Announcements
- 💎 View and Download your College Reports
- 💎 Go Live feature for teaching your Students
- {/* 💎 AI powered Smart Education System */}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Interactive Admin Dashboard for College Faculty
+
- {/*
+
+ {features.map((feature, index) => (
+
+ {feature.icon}
+ {feature.text}
+
+ ))}
+
+
+
+
+
+
- */}
-
+ {/* Background decorations */}
+
- )
-}
+ );
+};
-export default DashboardSection
+export default DashboardSection;
diff --git a/client/src/pages/Home/components/TestimonialCard.tsx b/client/src/pages/Home/components/TestimonialCard.tsx
index 76e8b17..762c13e 100644
--- a/client/src/pages/Home/components/TestimonialCard.tsx
+++ b/client/src/pages/Home/components/TestimonialCard.tsx
@@ -1,20 +1,63 @@
// TestimonialCard.tsx
import React from "react";
import { StarRating } from "./StarRating";
+import { motion } from "framer-motion" // You'll need to install framer-motion
+
interface TestimonialCardProps {
- quote: string;
- author: string;
- }
-
- export const TestimonialCard = ({ quote, author }: TestimonialCardProps) => (
-
-
-
{quote}
-
- {author}
+ quote: string;
+ author: string;
+ role?: string;
+ avatarUrl?: string;
+}
+
+export const TestimonialCard = ({
+ quote,
+ author,
+ role = "Student",
+ avatarUrl
+}: TestimonialCardProps) => (
+
+
+ {avatarUrl ? (
+
+ ) : (
+
+
+ {author.charAt(0)}
+
+
+ )}
+
- );
-
\ No newline at end of file
+
+
+
+
+
+);
diff --git a/client/src/pages/Home/components/VideoSection.jsx b/client/src/pages/Home/components/VideoSection.jsx
index aa551de..fbe049e 100644
--- a/client/src/pages/Home/components/VideoSection.jsx
+++ b/client/src/pages/Home/components/VideoSection.jsx
@@ -17,34 +17,72 @@ limitations under the License.
import React from "react";
+import { motion } from "framer-motion";
import '../CSS/HomePage.css'
const VideoSection = () => {
return (
-
-
-
-
- {" "}
- Supported Live Lecture And Live Chatting Features for Students and
- Teachers{" "}
-
-
- The platform enables live lecture streaming and interactive live chatting, promoting seamless communication between students and teachers for an enhanced, engaging, and collaborative learning experience in real time.
-
-
-
-
+
+
+
+
+ Interactive Live Learning Experience
+
+
+
+ Engage in real-time with interactive live lectures and dynamic chat features.
+ Experience seamless communication between students and teachers in our
+ state-of-the-art virtual classroom environment.
+
+
+
+
+ Try Live Class
+
+
+ Learn More
+
+
-
+
+
+
+
+
);
};
diff --git a/client/src/shared/Footer/Footer.css b/client/src/shared/Footer/Footer.css
index c6a13fd..fa70079 100644
--- a/client/src/shared/Footer/Footer.css
+++ b/client/src/shared/Footer/Footer.css
@@ -1 +1 @@
-.gradient-bg1 { background: radial-gradient(circle, #190043 30%, #000230); }
\ No newline at end of file
+.gradient-bg1 { background: radial-gradient(circle, #190043 30%, #000230); }
diff --git a/client/src/shared/Footer/Footer.jsx b/client/src/shared/Footer/Footer.jsx
index eb10f9b..a7cd373 100644
--- a/client/src/shared/Footer/Footer.jsx
+++ b/client/src/shared/Footer/Footer.jsx
@@ -15,73 +15,147 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import {Link} from 'react-router-dom'
+import { Link } from 'react-router-dom'
import React from 'react'
-import { useLocation } from 'react-router-dom'; // Import useLocation
+import { useLocation } from 'react-router-dom';
import './Footer.css'
-import { Mail, Phone, MapPin} from 'lucide-react';
+// Fix: Update imports from lucide-react
+import {
+ Mail,
+ Phone,
+ MapPin,
+ Facebook,
+ Twitter,
+ Linkedin, // Changed from LinkedIn to Linkedin
+ Instagram
+} from 'lucide-react';
+import { motion } from 'framer-motion';
+const FooterLink = ({ href, children }) => (
+
+
+ {children}
+
+
+);
+const SocialButton = ({ Icon, href }) => (
+
+
+
+);
const Footer = () => {
- const location = useLocation(); // Get the current path using useLocation
- const isContactPage = location.pathname === '/contacti'; // Check if the current path is "/contact"
+ const location = useLocation();
+ const isContactPage = location.pathname === '/contacti';
+
return (
-
-
-
-
-
-
-
EduMatrix
-
-
-
-
- support@edumatrix.com
-
-
-
- +91639886545
-
-
-
- 123 Education Street, Tech Valley
-
-
-
-
-
-
-
Company
-
+
+ {/* Background Pattern */}
+
+
+
+
+ {/* Brand Section */}
+
+
+
+
+ EduMatrix
+
+
+
+
+
+
+ support@edumatrix.com
+
+
+
+ +91 63988 86545
+
+
+
+ 123 Education Street, Tech Valley
+
+
+
+ {/* Social Links */}
+
+
+
+
+
+
+
+
+ {/* Resources Section */}
+
+
Resources
+
+ Documentation
+ Tutorials
+ Support Center
+ API Reference
+
+
+
+ {/* Company Section */}
+
+
Company
+
+ About Us
+ Careers
+ News & Blog
+ Contact Us
+
+
+
+ {/* Legal Section */}
+
+
Legal
+
+ Privacy Policy
+ Terms of Service
+ Security
+ Compliance
+
+
-
-
Legal
-
+
+ {/* Copyright Section */}
+
+
+
+ © {new Date().getFullYear()} EduMatrix. All rights reserved.
+
+
+ Empowering Education Through Technology
+
+
-
-
© 2024 EduMatrix. All rights reserved.
-
-
-
- )
-}
+
+ );
+};
-export default Footer
+export default Footer;
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..88e2a54
--- /dev/null
+++ b/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "motion": "^12.0.6"
+ }
+}
diff --git a/server/controllers/annoncementController.js b/server/controllers/annoncementController.js
index 60b6d58..65589ac 100644
--- a/server/controllers/annoncementController.js
+++ b/server/controllers/annoncementController.js
@@ -21,42 +21,67 @@ const announcement = async (req, res) => {
const { category, course, branch, description } = req.body;
try {
- const postAnnouncement = await Announcement.create({
+ // Input validation
+ if (!category || !course || !branch || !description) {
+ return res.status(400).json({
+ success: false,
+ message: "All fields are required",
+ details: {
+ category: !category ? "Category is required" : null,
+ course: !course ? "Course is required" : null,
+ branch: !branch ? "Branch is required" : null,
+ description: !description ? "Description is required" : null
+ }
+ });
+ }
+ const postAnnouncement = await Announcement.create({
category,
course,
branch,
- description
+ description,
+ createdAt: new Date(),
+ lastModified: new Date()
});
return res.status(201).json({
success: true,
- postAnnouncement,
- message: "Announcement Successfully posted"
+ data: postAnnouncement,
+ message: "Announcement successfully posted",
+ timestamp: new Date()
});
} catch (error) {
+ console.error('Announcement creation error:', error);
return res.status(500).json({
success: false,
- message: "Error Posting the Announcement"
+ message: "Error posting the announcement",
+ error: process.env.NODE_ENV === 'development' ? error.message : undefined
});
}
};
const displayAnnouncement = async (req, res) => {
try {
- const getAnnouncement = await Announcement.find();
+ const getAnnouncement = await Announcement.find()
+ .sort({ createdAt: -1 })
+ .select('-__v')
+ .lean();
return res.status(200).json({
success: true,
- getAnnouncement,
- message: "Announcement Successfully displayed"
+ count: getAnnouncement.length,
+ data: getAnnouncement,
+ message: "Announcements successfully retrieved",
+ timestamp: new Date()
});
} catch (error) {
+ console.error('Announcement retrieval error:', error);
return res.status(500).json({
success: false,
- message: "Some error occurred"
+ message: "Error retrieving announcements",
+ error: process.env.NODE_ENV === 'development' ? error.message : undefined
});
}
};
-module.exports = { announcement, displayAnnouncement };
+module.exports = { announcement, displayAnnouncement };