Index: backend/controllers/forumController.js
===================================================================
--- backend/controllers/forumController.js	(revision 5bfe774f9a487e2cc07c9012f5e22a33ab79ccda)
+++ backend/controllers/forumController.js	(revision c068f07d27ceff3fc17804c41ea3ec5eb9391502)
@@ -176,6 +176,7 @@
     const date = req.query.date || null;
     const commentSort = req.query.commentSort || null;
-    
-    console.log("Parsed parameters:", { page, limit, topic, sort, date, commentSort });
+    const search = req.query.search || null;
+    
+    console.log("Parsed parameters:", { page, limit, topic, sort, date, commentSort, search });
     
     const skip = page * limit;
@@ -261,4 +262,49 @@
       }
     }
+
+    // Filter by search text if provided
+    if (search && search.trim()) {
+      const searchTerm = search.trim();
+      console.log(`Filtering by search text: "${searchTerm}"`);
+      
+      // Use Prisma's OR condition to search in both title and content
+      // Case-insensitive search using contains with mode: 'insensitive'
+      const searchCondition = {
+        OR: [
+          {
+            title: {
+              contains: searchTerm,
+              mode: 'insensitive'
+            }
+          },
+          {
+            content: {
+              contains: searchTerm,
+              mode: 'insensitive'
+            }
+          }
+        ]
+      };
+      
+      // If we already have other conditions, combine them with AND
+      if (Object.keys(whereCondition).length > 0) {
+        whereCondition.AND = [
+          { ...whereCondition },
+          searchCondition
+        ];
+        
+        // Clear the original conditions since they're now in AND
+        Object.keys(whereCondition).forEach(key => {
+          if (key !== 'AND') {
+            delete whereCondition[key];
+          }
+        });
+      } else {
+        // If no other conditions, just use the search condition
+        Object.assign(whereCondition, searchCondition);
+      }
+      
+      console.log("Search condition applied:", JSON.stringify(searchCondition));
+    }
     
     console.log("Using where condition:", JSON.stringify(whereCondition));
Index: client/src/Dashboard/components/Forum.jsx
===================================================================
--- client/src/Dashboard/components/Forum.jsx	(revision 5bfe774f9a487e2cc07c9012f5e22a33ab79ccda)
+++ client/src/Dashboard/components/Forum.jsx	(revision c068f07d27ceff3fc17804c41ea3ec5eb9391502)
@@ -33,4 +33,5 @@
     selectedDate: null, // specific date filter
     commentSort: "none", // "none", "most-popular", "least-popular"
+    searchText: "", // text search in title and content
   };
 
@@ -257,5 +258,29 @@
       }
 
-      // 4. Apply date sorting if needed (and if comment sorting wasn't applied)
+      // 4. Apply text search filtering if needed
+      if (
+        filtersToApply.searchText &&
+        filtersToApply.searchText.trim() &&
+        data.length > 0
+      ) {
+        const searchTerm = filtersToApply.searchText.trim().toLowerCase();
+        console.log(`Applying client-side text search for: "${searchTerm}"`);
+
+        const beforeCount = data.length;
+        data = data.filter((post) => {
+          const titleMatch =
+            post.title && post.title.toLowerCase().includes(searchTerm);
+          const contentMatch =
+            post.content && post.content.toLowerCase().includes(searchTerm);
+          return titleMatch || contentMatch;
+        });
+
+        console.log(
+          `Client-side text search filtered: ${beforeCount} → ${data.length} posts`
+        );
+        appliedClientSideFiltering = true;
+      }
+
+      // 5. Apply date sorting if needed (and if comment sorting wasn't applied)
       if (
         filtersToApply.dateSort &&
@@ -449,5 +474,5 @@
         {/* Filter Navbar */}
         <div className="sticky top-[73px] z-10 bg-base-200 border-b border-base-300 shadow-sm">
-          <div className="p-3 sm:p-4 sm:pl-12 w-full max-w-7xl mx-auto">
+          <div className="p-3 sm:p-4 sm:pl-12 w-full max-w-full mx-auto">
             {/* Mobile Filter Toggle */}
             <div className="flex items-center justify-between mb-3 lg:hidden">
@@ -477,5 +502,21 @@
             {/* Filter Controls */}
             <div className={`${showFilters ? "block" : "hidden"} lg:block`}>
-              <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-6 gap-3 mb-3 max-w-6xl">
+              <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-6 xl:grid-cols-8 gap-3 mb-3 max-w-full">
+                {/* Search Filter - Takes 2 columns to be wider */}
+                <div className="flex flex-col gap-1 sm:col-span-2 lg:col-span-2">
+                  <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                    Search Posts
+                  </label>
+                  <input
+                    type="text"
+                    placeholder="Search titles and content..."
+                    value={filters.searchText}
+                    onChange={(e) =>
+                      setFilters({ ...filters, searchText: e.target.value })
+                    }
+                    className="input input-sm input-bordered w-full text-sm"
+                  />
+                </div>
+
                 {/* Topic Filter */}
                 <div className="flex flex-col gap-1">
@@ -577,12 +618,12 @@
 
                 {/* Clear Filters & Apply Buttons */}
-                <div className="flex flex-col gap-1 sm:col-span-2 lg:col-span-2">
+                <div className="flex flex-col gap-1">
                   <label className="text-xs font-medium text-gray-500 uppercase tracking-wide opacity-0">
                     Actions
                   </label>
-                  <div className="flex gap-2 max-w-md">
+                  <div className="flex gap-1">
                     <button
                       onClick={clearFilters}
-                      className="cursor-pointer px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 text-sm font-medium flex-1 max-w-32"
+                      className="cursor-pointer px-2 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 text-xs font-medium w-16"
                     >
                       Clear
@@ -590,7 +631,7 @@
                     <button
                       onClick={applyFilters}
-                      className="cursor-pointer px-4 py-2 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm font-medium flex-1 max-w-40"
+                      className="cursor-pointer px-2 py-2 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-xs font-medium w-16"
                     >
-                      Apply Filters
+                      Apply
                     </button>
                   </div>
@@ -606,4 +647,9 @@
                       ? "General"
                       : "Daily Challenge"}
+                  </span>
+                )}
+                {filters.searchText && filters.searchText.trim() && (
+                  <span className="badge badge-outline badge-sm">
+                    Search: "{filters.searchText.trim()}"
                   </span>
                 )}
Index: client/src/services/forumService.js
===================================================================
--- client/src/services/forumService.js	(revision 5bfe774f9a487e2cc07c9012f5e22a33ab79ccda)
+++ client/src/services/forumService.js	(revision c068f07d27ceff3fc17804c41ea3ec5eb9391502)
@@ -84,4 +84,20 @@
         console.log(`COMBINED FILTERS: Topic=${filters.topic} with ${filters.commentSort} sorting`);
         console.log(`Expected behavior: First filter by ${filters.topic}, then sort by comment count`);
+      }
+    }
+
+    // Add text search filter
+    if (filters.searchText && filters.searchText.trim()) {
+      const searchTerm = encodeURIComponent(filters.searchText.trim());
+      console.log(`Adding text search filter: "${filters.searchText.trim()}"`);
+      url += `&search=${searchTerm}`;
+      
+      // Log combined filter details when using search with other filters
+      if (filters.topic && filters.topic !== 'all') {
+        console.log(`COMBINED FILTERS: Topic=${filters.topic} with text search="${filters.searchText.trim()}"`);
+      }
+      
+      if (filters.selectedDate) {
+        console.log(`COMBINED FILTERS: Text search="${filters.searchText.trim()}" with specific date filtering`);
       }
     }
