diff --git a/client/src/App.jsx b/client/src/App.jsx
index 29f7760a..cc753dc7 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -15,6 +15,7 @@ import LandingPage from "./pages/LandingPage";
import FeaturesPage from "./pages/FeaturesPage";
import AboutPage from "./pages/AboutPage";
import ContactPage from "./pages/ContactPage";
+import FAQPage from "./pages/FAQPage"; // FIX 1: Import add kiya
import VerificationPending from "./pages/VerificationPending";
import AdminPanel from "./pages/AdminPanel";
import ForgotPassword from "./pages/ForgotPassword";
@@ -36,7 +37,7 @@ const PrivateRoute = ({ children }) => {
return ;
}
- if (user.role === 'admin' && location.pathname === '/dashboard') {
+ if (user.role === "admin" && location.pathname === "/dashboard") {
return ;
}
@@ -49,7 +50,7 @@ const PublicRoute = ({ children }) => {
if (token) {
if (user.isVerified) {
- if (user.role === 'admin') {
+ if (user.role === "admin") {
return ;
}
return ;
@@ -97,8 +98,12 @@ const AppLayout = () => {
} />
} />
} />
-
} />
+ {/* FIX 2: /faq route add kiya, duplicate /contact remove kiya */}
+ } />
+ } />
+ } />
+
{
/>
} />
-
-
diff --git a/client/src/pages/FAQPage.jsx b/client/src/pages/FAQPage.jsx
new file mode 100644
index 00000000..30e67c4a
--- /dev/null
+++ b/client/src/pages/FAQPage.jsx
@@ -0,0 +1,414 @@
+import React, { useState } from "react";
+import { Link } from "react-router-dom"; // FIX: internal links ke liye Link import
+import { FiSearch } from "react-icons/fi"; // FIX 3 & 4: react-icons se search icon
+
+export default function FAQPage() {
+ const [openIndex, setOpenIndex] = useState(null);
+ const [activeCategory, setActiveCategory] = useState("all");
+ const [searchQuery, setSearchQuery] = useState("");
+
+ const faqData = [
+ {
+ id: "qs-1",
+ category: "getting-started",
+ categoryLabel: "Getting Started",
+ question: "How do I create a whiteboard session?",
+ answer: (
+ <>
+ Creating a whiteboard session is simple:
+
+
Sign up or log in to your Eduboard account.
+
Click Dashboard from the navbar.
+
Click New Board, give it a name and choose your subject.
+
Your infinite canvas is ready - start drawing, annotating, or uploading!
+
+ As a teacher you'll also get a unique Room Code that students can use to join instantly.
+ >
+ ),
+ },
+ {
+ id: "qs-2",
+ category: "getting-started",
+ categoryLabel: "Getting Started",
+ question: "Do students join a session with a room code?",
+ answer: (
+ <>
+ Students don't need to create a board from scratch:
+
+
Sign up or log in as a Student.
+
On the dashboard, click Join a Board.
+
Enter the Room Code shared by your teacher.
+
You'll instantly enter the live collaborative whiteboard.
+
+ Room codes are case-insensitive and expire when the teacher ends the session.
+ >
+ ),
+ },
+ {
+ id: "qs-3",
+ category: "getting-started",
+ categoryLabel: "Getting Started",
+ question: "Is Eduboard free to use?",
+ answer: (
+ <>
+ Yes! Eduboard offers a free plan for both teachers and students with access to core features - infinite canvas, real-time collaboration, drawing tools, and room codes. Premium features (advanced admin controls, export options, etc.) may be available in future plans.
+ >
+ ),
+ },
+ {
+ id: "collab-1",
+ category: "collaboration",
+ categoryLabel: "Collaboration",
+ question: "How does real-time collaboration work?",
+ answer: (
+ <>
+ Eduboard uses WebSockets for real-time, bidirectional communication. Here's what that means for you:
+
+
Every stroke, shape, or sticky note you draw appears on all participants' screens in milliseconds.
+
You can see live cursors of all active users on the canvas.
+
Changes sync automatically - no need to refresh the page.
+
+ You need a stable internet connection for the best experience, though minor disconnections are handled gracefully.
+ >
+ ),
+ },
+ {
+ id: "collab-2",
+ category: "collaboration",
+ categoryLabel: "Collaboration",
+ question: "How many students can join a single board?",
+ answer: (
+ <>
+ Eduboard supports unlimited participants on a single board. Whether it's a small group of 5 or a large class of 100+, everyone can collaborate simultaneously. Performance may vary based on your device and network speed with very large groups.
+ >
+ ),
+ },
+ {
+ id: "collab-3",
+ category: "collaboration",
+ categoryLabel: "Collaboration",
+ question: "Can teachers control what students can do on the board?",
+ answer: (
+ <>
+ Absolutely. Eduboard has a role-based access system:
+
+
Teachers have full control - draw, erase, lock sections, manage permissions.
+
Students can draw and collaborate by default, but teachers can set boards to view-only mode for presentations.
+
Teachers can monitor student activity and participation in real time.
+
+ >
+ ),
+ },
+ {
+ id: "boards-1",
+ category: "boards",
+ categoryLabel: "Boards & Saving",
+ question: "How do I save my whiteboard?",
+ answer: (
+ <>
+ Eduboard auto-saves your board as you work - no manual save needed. You can also:
+
+
Access all your boards anytime from the Dashboard.
+
Use the Export option (teacher accounts) to download the board as an image.
+
Share a board link directly with others for view access.
+
+ Boards are tied to your account and stored securely in the cloud.
+ >
+ ),
+ },
+ {
+ id: "boards-2",
+ category: "boards",
+ categoryLabel: "Boards & Saving",
+ question: "Can I reuse a board from a previous session?",
+ answer: (
+ <>
+ Yes! All your past boards are saved in your Dashboard. You can:
+
+
Open and edit any saved board at any time.
+
Use a board as a template for future lessons.
+
Organize boards by class or subject for easy access.
+
+ >
+ ),
+ },
+ {
+ id: "boards-3",
+ category: "boards",
+ categoryLabel: "Boards & Saving",
+ question: "How do I share a board with others?",
+ answer: (
+ <>
+ There are two ways to share:
+
+
Room Code: Share the code with students so they can join the live session.
+
Share Link: Generate a read-only link from the board settings and send it via email or chat.
+
+ Export options (Image/PDF) are also available for offline sharing.
+ >
+ ),
+ },
+ {
+ id: "devices-1",
+ category: "devices",
+ categoryLabel: "Devices & Access",
+ question: "What devices and browsers does Eduboard support?",
+ answer: (
+ <>
+ Eduboard is fully responsive and works on:
+
+ For the best drawing experience, we recommend using a stylus or drawing tablet/display on a desktop or iPad. No app download needed - it runs entirely in the browser.
+ >
+ ),
+ },
+ {
+ id: "devices-2",
+ category: "devices",
+ categoryLabel: "Devices & Access",
+ question: "Can I access my boards offline?",
+ answer: (
+ <>
+ Real-time collaboration requires an active internet connection. However, previously saved boards can be viewed in limited offline mode if your browser has cached them. For reliable offline access, use the Export feature to download a snapshot of your board.
+ >
+ ),
+ },
+ {
+ id: "account-1",
+ category: "account",
+ categoryLabel: "Account & Password",
+ question: "How do I reset my password?",
+ answer: (
+ <>
+ To reset your password:
+
+
Click "Sign In" on the Eduboard homepage.
+
Select "Forgot Password?" below the login form.
+
Enter your registered email address.
+
Check your inbox for a password reset link (valid for 24 hours).
+
Click the link and set a new password.
+
+ If you don't receive the email, check your spam folder or contact our{" "}
+ support team.
+ >
+ ),
+ },
+ {
+ id: "account-2",
+ category: "account",
+ categoryLabel: "Account & Password",
+ question: "Can I change my username or email address?",
+ answer: (
+ <>
+ Yes. Go to your Profile Settings (click your avatar in the dashboard) to update your username or email. Changes to your email require a verification link sent to the new address before they take effect.
+ >
+ ),
+ },
+ {
+ id: "account-3",
+ category: "account",
+ categoryLabel: "Account & Password",
+ question: "How do I delete my account?",
+ answer: (
+ <>
+ You can delete your account from Profile Settings > Danger Zone > Delete Account. This action is permanent and will remove all your boards and data. We recommend exporting important boards before deletion. For assistance, contact our{" "}
+ support team.
+ >
+ ),
+ },
+ {
+ id: "account-4",
+ category: "account",
+ categoryLabel: "Account & Password",
+ question: "Is my data secure on Eduboard?",
+ answer: (
+ <>
+ Yes. Eduboard takes data privacy seriously:
+
+
All data is transmitted over HTTPS.
+
Passwords are hashed - never stored in plain text.
+
Boards are private to your account by default.
+
We comply with standard data protection practices.