Index: backend/controllers/forumController.js
===================================================================
--- backend/controllers/forumController.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/controllers/forumController.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -15,6 +15,6 @@
 } = require("../services/emailService");
 const createForumPost = async (req, res) => {
-  const { title, content, authorId, authorName } = req.body;
-  if (!title || !content || !authorId || !authorName) {
+  const { title, content, authorId, authorName, topic, challengeId } = req.body;
+  if (!title || !content || !authorId || !authorName || !topic) {
     return res.status(400).json({
       error: "Title, content, authorId, and authorName are required",
@@ -29,5 +29,5 @@
     const postCheckCounter = user.postCheckCounter;
 
-    if (postCounter >= 1) {
+    if (postCounter >= -11) {
       const post = new ForumPost({
         title,
@@ -36,4 +36,6 @@
         authorName,
         dateCreated: new Date(),
+        topic: topic,
+        challengeId: challengeId || null,
       });
 
@@ -94,6 +96,17 @@
         }
       }
+      const { author_id, challenge_id, ...data } = post;
+
+      //Connect must be used becase multiple relations were introduced
       const savedPost = await prisma.forum_posts.create({
-        data: post,
+        data: {
+          ...data,
+          users: {
+            connect: { id: author_id },
+          },
+          challenges: challenge_id
+            ? { connect: { id: challenge_id } }
+            : undefined,
+        },
       });
 
@@ -149,28 +162,55 @@
 const getForumPosts = async (req, res) => {
   try {
-    const page = parseInt(req.query.page) || 0;
-    const limit = parseInt(req.query.limit) || 5;
-    const skip = page * limit;
-
-    const posts = await prisma.forum_posts.findMany({
-      skip,
-      take: limit,
-      orderBy: {
-        date_created: "desc",
-      },
-    });
-
-    const forumPosts = posts.map(
-      (post) =>
-        new ForumPost({
-          id: post.id,
-          title: post.title,
-          content: post.content,
-          authorName: post.author_name,
-          authorId: post.author_id,
-          dateCreated: post.date_created,
-          commentCount: post.comment_count,
-        })
-    );
+    const fiveDaysAgo = new Date();
+    fiveDaysAgo.setDate(fiveDaysAgo.getDate() - 5);
+
+    const generalPosts = await prisma.forum_posts.findMany({
+      where: {
+        topic: "general",
+        date_created: {
+          gte: fiveDaysAgo,
+        },
+      },
+      take: 5,
+      orderBy: [{ comment_count: "desc" }, { date_created: "desc" }],
+      include: {
+        challenges: {
+          select: {
+            id: true,
+            title: true,
+          },
+        },
+      },
+    });
+
+    const challengePosts = await prisma.forum_posts.findMany({
+      where: {
+        topic: "daily-challenge",
+        date_created: {
+          gte: fiveDaysAgo,
+        },
+      },
+      take: 5,
+      orderBy: [{ comment_count: "desc" }, { date_created: "desc" }],
+      include: {
+        challenges: {
+          select: {
+            id: true,
+            title: true,
+          },
+        },
+      },
+    });
+    const forumPosts = [
+      ...generalPosts.map((post) => ({
+        ...post,
+        topic: "general",
+      })),
+      ...challengePosts.map((post) => ({
+        ...post,
+        topic: "daily-challenge",
+        challengeTitle: post.challenges.title,
+      })),
+    ];
 
     res.status(200).json(forumPosts);
Index: backend/controllers/reviewController.js
===================================================================
--- backend/controllers/reviewController.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/controllers/reviewController.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -13,5 +13,5 @@
 
 const createReviewPost = async (req, res) => {
-  const { title, content, authorId, authorName } = req.body;
+  const { title, content, authorId, authorName, topic, challengeId } = req.body;
 
   try {
@@ -22,7 +22,19 @@
       authorName,
       dateCreated: new Date(),
-    });
+      topic,
+      challengeId,
+    });
+    const { author_id, challenge_id, ...data } = post;
+
     await prisma.to_be_reviewed.create({
-      data: post,
+      data: {
+        ...data,
+        users: {
+          connect: { id: author_id },
+        },
+        challenges: challenge_id
+          ? { connect: { id: challenge_id } }
+          : undefined,
+      },
     });
 
@@ -70,5 +82,4 @@
 const getReviewPosts = async (req, res) => {
   try {
-    console.log("called getREviewPosts");
     const { page = 0, limit = 5, search = "", date = "" } = req.query;
     const skip = parseInt(page) * parseInt(limit);
@@ -122,5 +133,4 @@
 
       const totalPages = Math.ceil(totalPosts / parseInt(limit));
-      console.log(posts);
 
       res.status(200).json({ posts, totalPages });
@@ -231,4 +241,6 @@
       dateCreated: postToApprove.created_at,
       commentCount: postToApprove.comment_count || 0,
+      topic: postToApprove.topic,
+      challengeId: postToApprove.challenge_id,
     });
 
Index: backend/controllers/taskController.js
===================================================================
--- backend/controllers/taskController.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/controllers/taskController.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -4,4 +4,20 @@
 const Challenge = require("../models/challenge");
 const { at } = require("../filters/macedonianProfanity");
+
+//Helper functions
+const safeSerialize = (data) => {
+  return JSON.parse(
+    JSON.stringify(data, (key, value) => {
+      if (value instanceof Date) {
+        return value.toISOString();
+      }
+      if (typeof value === "bigint") {
+        return value.toString();
+      }
+      return value;
+    })
+  );
+};
+
 const getAllTasks = async (req, res) => {
   const userId = req.user.sub;
@@ -24,18 +40,4 @@
       prisma.challenges.count(),
     ]);
-
-    const safeSerialize = (data) => {
-      return JSON.parse(
-        JSON.stringify(data, (key, value) => {
-          if (value instanceof Date) {
-            return value.toISOString();
-          }
-          if (typeof value === "bigint") {
-            return value.toString();
-          }
-          return value;
-        })
-      );
-    };
 
     const processedChallenges = challenges.map((challenge) => {
@@ -105,18 +107,4 @@
     }
 
-    const safeSerialize = (data) => {
-      return JSON.parse(
-        JSON.stringify(data, (key, value) => {
-          if (value instanceof Date) {
-            return value.toISOString();
-          }
-          if (typeof value === "bigint") {
-            return value.toString();
-          }
-          return value;
-        })
-      );
-    };
-
     const processedTasks = tasks.map((task) => {
       const safeTask = safeSerialize(task);
@@ -147,4 +135,52 @@
 };
 
+const getTasksForForumPost = async (req, res) => {
+  try {
+    console.log("Called");
+    const now = new Date();
+    const today = new Date(
+      Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate())
+    );
+
+    const startOfRange = new Date(today);
+    startOfRange.setUTCDate(startOfRange.getUTCDate() - 2);
+
+    const endOfRange = new Date(today);
+    endOfRange.setUTCDate(endOfRange.getUTCDate() + 1);
+
+    const challenges = await prisma.challenges.findMany({
+      where: {
+        solving_date: {
+          gte: startOfRange,
+          lt: endOfRange,
+        },
+      },
+      orderBy: { solving_date: "desc" },
+    });
+
+    const processedChallenges = challenges.map((challenge) => {
+      const safeChallenge = safeSerialize(challenge);
+      if (safeChallenge.test_cases) {
+        safeChallenge.test_cases = safeChallenge.test_cases.map((testCase) => ({
+          id: testCase.id,
+          input: testCase.input,
+          output: testCase.output,
+          challenge_id: testCase.challenge_id,
+        }));
+      }
+      return safeChallenge;
+    });
+
+    res.status(200).json(processedChallenges);
+  } catch (err) {
+    console.error("Error fetching tasks for forum post:", err);
+    res.status(500).json({
+      message: "Internal server error",
+      error: err.message,
+      stack: process.env.NODE_ENV === "development" ? err.stack : undefined,
+    });
+  }
+};
+
 const fetchTestCaseForToday = async (req, res) => {
   const { id } = req.params;
@@ -197,17 +233,5 @@
       return res.status(404).json({ message: "No tasks found for this date" });
     }
-    const safeSerialize = (data) => {
-      return JSON.parse(
-        JSON.stringify(data, (key, value) => {
-          if (value instanceof Date) {
-            return value.toISOString();
-          }
-          if (typeof value === "bigint") {
-            return value.toString();
-          }
-          return value;
-        })
-      );
-    };
+
     const parsedChallenges = challenges.map((task) => {
       const safeTask = safeSerialize(task);
@@ -654,3 +678,4 @@
   deleteTask,
   createNewTask,
-};
+  getTasksForForumPost,
+};
Index: backend/models/ForumPost.js
===================================================================
--- backend/models/ForumPost.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/models/ForumPost.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -8,4 +8,6 @@
     commentCount,
     dateCreated,
+    topic,
+    challengeId,
   }) {
     this.id = id;
@@ -16,4 +18,6 @@
     this.author_id = authorId;
     this.author_name = authorName;
+    this.topic = topic;
+    this.challenge_id = challengeId;
   }
 }
Index: backend/models/ToBeReviewedPost.js
===================================================================
--- backend/models/ToBeReviewedPost.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/models/ToBeReviewedPost.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -8,4 +8,6 @@
     commentCount,
     dateCreated,
+    topic,
+    challengeId,
   }) {
     this.id = id;
@@ -16,4 +18,6 @@
     this.author_id = authorId;
     this.author_name = authorName;
+    this.topic = topic;
+    this.challenge_id = challengeId;
   }
 }
Index: backend/prisma/schema.prisma
===================================================================
--- backend/prisma/schema.prisma	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/prisma/schema.prisma	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -22,12 +22,15 @@
 
 model to_be_reviewed {
-  id            String   @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
+  id            String      @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
   title         String?
-  created_at    DateTime @default(now()) @db.Timestamptz(6)
+  created_at    DateTime    @default(now()) @db.Timestamptz(6)
   content       String?
-  author_id     String?  @default(dbgenerated("gen_random_uuid()")) @db.Uuid
+  author_id     String?     @default(dbgenerated("gen_random_uuid()")) @db.Uuid
   author_name   String?
-  comment_count Int?     @default(0) @db.SmallInt
-  users         users?   @relation(fields: [author_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "to_be_reviewed_author_id_fkey")
+  comment_count Int?        @default(0) @db.SmallInt
+  topic         String?
+  challenge_id  String?     @db.Uuid
+  users         users?      @relation(fields: [author_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "to_be_reviewed_author_id_fkey")
+  challenges    challenges? @relation(fields: [challenge_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
 
   @@index([author_id])
@@ -36,13 +39,18 @@
 /// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info.
 model forum_posts {
-  id            String     @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
-  title         String     @default("")
-  content       String?    @default("")
-  author_id     String?    @default(dbgenerated("gen_random_uuid()")) @db.Uuid
+  id            String      @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
+  title         String      @default("")
+  content       String?     @default("")
+  author_id     String?     @default(dbgenerated("gen_random_uuid()")) @db.Uuid
   author_name   String?
-  date_created  DateTime?  @default(now()) @db.Date
-  comment_count Int        @default(0)
+  date_created  DateTime?   @default(now()) @db.Date
+  comment_count Int         @default(0)
+  topic         String?
+  challenge_id  String?     @db.Uuid
   comments      comments[]
-  users         users?     @relation(fields: [author_id], references: [id], onDelete: Restrict, onUpdate: Restrict, map: "forum_posts_author_id_fkey")
+  users         users?      @relation(fields: [author_id], references: [id], onDelete: Restrict, onUpdate: Restrict, map: "forum_posts_author_id_fkey")
+  challenges    challenges? @relation(fields: [challenge_id], references: [id], onUpdate: NoAction)
+
+  @@index([challenge_id], map: "idx_forum_posts_challenge_id")
 }
 
@@ -71,15 +79,17 @@
 /// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info.
 model challenges {
-  id           String       @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
-  solving_date DateTime     @db.Date
-  title        String?
-  content      String?
-  attempted_by Int?         @db.SmallInt
-  solved_by    Int?         @db.SmallInt
-  expired      Boolean?
-  examples     Json?
-  output_type  String?
-  difficulty   String?
-  test_cases   test_cases[]
+  id             String           @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
+  solving_date   DateTime         @db.Date
+  title          String?
+  content        String?
+  attempted_by   Int?             @db.SmallInt
+  solved_by      Int?             @db.SmallInt
+  expired        Boolean?
+  examples       Json?
+  output_type    String?
+  difficulty     String?
+  forum_posts    forum_posts[]
+  test_cases     test_cases[]
+  to_be_reviewed to_be_reviewed[]
 }
 
Index: backend/routers/taskRouter.js
===================================================================
--- backend/routers/taskRouter.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ backend/routers/taskRouter.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -5,4 +5,5 @@
 router.get("/all", taskController.getAllTasks);
 router.get("/", taskController.getTaskByDate);
+router.get("/forum-post", taskController.getTasksForForumPost);
 router.get("/:id/test-case", taskController.fetchTestCaseForToday);
 router.get("/:id/test-cases", taskController.getAllTestCasesForTask);
Index: client/src/CreatePost/CreatePost.jsx
===================================================================
--- client/src/CreatePost/CreatePost.jsx	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ client/src/CreatePost/CreatePost.jsx	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -4,4 +4,5 @@
 import { useAuth } from "@/contexts/AuthContext";
 import { createApprovalForumPost } from "@/services/reviewService";
+import { getTasksForForumPost } from "@/services/taskService";
 const CreatePost = () => {
   const [title, setTitle] = useState("");
@@ -10,4 +11,7 @@
   const [isSubmitting, setIsSubmitting] = useState(false);
   const [pendingModerator, setPendingModerator] = useState(false);
+  const [selectedChallengeId, setSelectedChallengeId] = useState(0);
+  const [challenges, setChallenges] = useState([]);
+  const [topic, setTopic] = useState("general");
   const [modal, setModal] = useState({ isOpen: false, message: "", type: "" });
   const navigate = useNavigate();
@@ -37,4 +41,26 @@
   };
 
+  const handleTopicChange = async (e) => {
+    const selectedTopic = e.target.value;
+    setTopic(selectedTopic);
+
+    if (selectedTopic === "daily-challenge") {
+      console.log(challenges);
+      if (!challenges || challenges.length === 0) {
+        try {
+          const response = await getTasksForForumPost();
+          setChallenges(response);
+        } catch (error) {
+          setChallenges([]);
+          console.error("Error fetching challenges:", error);
+          showModal(
+            "Failed to load challenges. Please try again later.",
+            "error"
+          );
+        }
+      }
+    }
+  };
+
   const handleSubmit = async (e) => {
     e.preventDefault();
@@ -53,4 +79,9 @@
         authorId: user.id,
         authorName: user.username,
+        topic,
+        challengeId:
+          topic === "daily-challenge" && challenges.length > 0
+            ? challenges[selectedChallengeId]?.id || null
+            : null,
       };
       const res = await createForumPost(postData);
@@ -122,4 +153,9 @@
     }
   };
+  useEffect(() => {
+    if (topic === "daily-challenge" && challenges.length > 0) {
+      setSelectedChallengeId(0);
+    }
+  }, [topic, challenges]);
 
   return (
@@ -229,4 +265,153 @@
           <div className="card-body p-4 sm:p-6 lg:p-8">
             <div className="space-y-6 sm:space-y-8">
+              <div className="form-control w-full">
+                <label className="label mb-1.5">
+                  <span className="label-text text-base sm:text-lg font-medium">
+                    Topic
+                  </span>
+                </label>
+                <select
+                  value={topic}
+                  onChange={(e) => {
+                    setTopic(e.target.value);
+                    handleTopicChange(e);
+                  }}
+                  className="select select-bordered w-full"
+                  required
+                  disabled={isSubmitting}
+                >
+                  <option value="general">General Programming</option>
+                  <option value="daily-challenge">Daily Challenge</option>
+                </select>
+              </div>
+              {topic === "daily-challenge" &&
+                challenges.length > 0 &&
+                typeof selectedChallengeId === "number" && (
+                  <div className="form-control w-full">
+                    <label className="label mb-1.5">
+                      <span className="label-text text-base sm:text-lg font-medium">
+                        Select Challenge
+                      </span>
+                    </label>
+
+                    <div className="card bg-base-300 shadow-md border border-base-300">
+                      <div className="card-body p-4 sm:p-6">
+                        <div className="flex items-center justify-between gap-3 sm:gap-4">
+                          <button
+                            type="button"
+                            className="btn btn-circle btn-sm sm:btn-md btn-outline hover:btn-primary transition-all duration-200"
+                            onClick={() =>
+                              setSelectedChallengeId((i) =>
+                                Math.min(i + 1, challenges.length - 1)
+                              )
+                            }
+                            disabled={
+                              selectedChallengeId === challenges.length - 1
+                            }
+                            aria-label="Previous Challenge"
+                          >
+                            <svg
+                              width="20"
+                              height="20"
+                              fill="none"
+                              viewBox="0 0 24 24"
+                              className="w-4 h-4 sm:w-5 sm:h-5"
+                            >
+                              <path
+                                d="M15 19l-7-7 7-7"
+                                stroke="currentColor"
+                                strokeWidth="2"
+                                strokeLinecap="round"
+                                strokeLinejoin="round"
+                              />
+                            </svg>
+                          </button>
+
+                          <div className="flex-1 text-center px-2">
+                            <h3 className="font-semibold text-base sm:text-lg text-base-content leading-tight">
+                              {challenges[selectedChallengeId]?.title
+                                .split("-")
+                                .map(
+                                  (word) =>
+                                    word.charAt(0).toUpperCase() + word.slice(1)
+                                )
+                                .join(" ") || "No challenge title"}
+                            </h3>
+                            {challenges[selectedChallengeId]?.solving_date &&
+                              selectedChallengeId > 0 && (
+                                <p className="text-xs sm:text-sm text-base-content/70 mt-1">
+                                  This challenge was available on:{" "}
+                                  <span className="underline">
+                                    {new Date(
+                                      challenges[
+                                        selectedChallengeId
+                                      ].solving_date
+                                    ).toLocaleDateString("en-GB", {
+                                      day: "2-digit",
+                                      month: "short",
+                                      year: "numeric",
+                                    })}
+                                  </span>
+                                </p>
+                              )}
+                          </div>
+
+                          <button
+                            type="button"
+                            className="btn btn-circle btn-sm sm:btn-md btn-outline hover:btn-primary transition-all duration-200"
+                            onClick={() =>
+                              setSelectedChallengeId((i) => Math.max(i - 1, 0))
+                            }
+                            disabled={selectedChallengeId === 0}
+                            aria-label="Next Challenge"
+                          >
+                            <svg
+                              width="20"
+                              height="20"
+                              fill="none"
+                              viewBox="0 0 24 24"
+                              className="w-4 h-4 sm:w-5 sm:h-5"
+                            >
+                              <path
+                                d="M9 5l7 7-7 7"
+                                stroke="currentColor"
+                                strokeWidth="2"
+                                strokeLinecap="round"
+                                strokeLinejoin="round"
+                              />
+                            </svg>
+                          </button>
+                        </div>
+
+                        <div className="mt-3 sm:mt-4">
+                          <div className="flex items-center justify-center gap-2">
+                            <span className="text-xs sm:text-sm text-base-content/60">
+                              This post will be linked to the selected challenge
+                            </span>
+                            <div
+                              className="tooltip tooltip-top"
+                              data-tip="Your post will appear in the challenge's discussion thread"
+                            >
+                              <svg
+                                xmlns="http://www.w3.org/2000/svg"
+                                className="w-4 h-4 text-base-content/40 cursor-help"
+                                fill="none"
+                                viewBox="0 0 24 24"
+                                stroke="currentColor"
+                              >
+                                <path
+                                  strokeLinecap="round"
+                                  strokeLinejoin="round"
+                                  strokeWidth="2"
+                                  d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
+                                />
+                              </svg>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                )}
               <div className="form-control w-full">
                 <label className="label mb-1.5">
Index: client/src/Dashboard/components/Forum.jsx
===================================================================
--- client/src/Dashboard/components/Forum.jsx	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ client/src/Dashboard/components/Forum.jsx	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -88,139 +88,361 @@
     }
   };
-  const handleLoadMore = () => {
-    setPage((prevPage) => prevPage + 1);
-  };
 
   return (
     <div data-theme="luxury" className="min-h-screen bg-base-100">
-      <div className="p-4 sm:p-6 sm:pl-12 w-full">
-        {/* Header section with title and create post button */}
-        <div className="flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4 mb-6 lg:mb-10">
-          <h1 className="text-2xl sm:text-3xl lg:text-4xl font-bold text-center lg:text-left">
-            Forum Posts
-          </h1>
-          <div className="flex flex-col sm:flex-row gap-2 sm:gap-3 lg:gap-4 w-full lg:w-auto">
-            <button
-              onClick={() => {
-                navigate("/dashboard/create-post");
-              }}
-              className="cursor-pointer px-4 py-2 sm:px-6 sm:py-3 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm sm:text-base font-medium w-full lg:w-auto lg:whitespace-nowrap"
-            >
-              Create a Post
-            </button>
-            <button
-              onClick={() => {
-                navigate("/dashboard/user-posts");
-              }}
-              className="cursor-pointer px-4 py-2 sm:px-6 sm:py-3 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm sm:text-base font-medium w-full lg:w-auto lg:whitespace-nowrap"
-            >
-              Your posts
-            </button>
+      <div className="flex flex-col h-screen">
+        {/* Sticky Header Section */}
+        <div className="sticky top-0 z-10 bg-base-100 border-b border-base-300 shadow-sm">
+          <div className="p-4 sm:p-6 sm:pl-12 w-full">
+            <div className="flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4">
+              <h1 className="text-2xl sm:text-3xl lg:text-4xl font-bold text-center lg:text-left">
+                Forum Posts
+              </h1>
+              <div className="flex flex-col sm:flex-row gap-2 sm:gap-3 lg:gap-4 w-full lg:w-auto">
+                <button
+                  onClick={() => {
+                    navigate("/dashboard/create-post");
+                  }}
+                  className="cursor-pointer px-4 py-2 sm:px-6 sm:py-3 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm sm:text-base font-medium w-full lg:w-auto lg:whitespace-nowrap"
+                >
+                  Create a Post
+                </button>
+                <button
+                  onClick={() => {
+                    navigate("/dashboard/user-posts");
+                  }}
+                  className="cursor-pointer px-4 py-2 sm:px-6 sm:py-3 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm sm:text-base font-medium w-full lg:w-auto lg:whitespace-nowrap"
+                >
+                  Your posts
+                </button>
+              </div>
+            </div>
           </div>
         </div>
 
-        {loading ? (
-          <div className="flex justify-center items-center h-32 sm:h-48 lg:h-64">
-            <span className="loading loading-spinner loading-md sm:loading-lg"></span>
-          </div>
-        ) : (
-          <>
-            <div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-4 sm:gap-6 pb-6 sm:pb-8">
-              {posts.map((post) => (
-                <div
-                  key={post.id}
-                  className="p-3 sm:p-4 lg:p-6 border rounded-lg shadow-sm hover:shadow-md transition relative bg-base-200 h-full flex flex-col"
-                >
-                  {(post.author_name === user.name ||
-                    post.author_name === user.username ||
-                    user.isModerator) && (
-                    <button
-                      className="absolute top-2 right-2 p-1.5 cursor-pointer rounded-full hover:bg-gray-600 transition-colors"
-                      onClick={(e) => {
-                        e.stopPropagation();
-                        showModal(
-                          "Are you sure you want to delete this post? This action cannot be undone.",
-                          "confirm",
-                          post.id
-                        );
-                      }}
+        {/* Main Content Area */}
+        <div className="flex-1 ">
+          {loading ? (
+            <div className="flex justify-center items-center h-full">
+              <span className="loading loading-spinner loading-md sm:loading-lg"></span>
+            </div>
+          ) : (
+            <div className="h-full">
+              {/* Sticky Column Headers */}
+              <div className="sticky top-0 z-10 bg-base-100  border-base-300 shadow-sm">
+                <div className="p-4 sm:p-6 sm:pl-12 w-full">
+                  <div className="grid grid-cols-1 xl:grid-cols-2 gap-6 sm:gap-8">
+                    {/* General Programming Header */}
+                    <div
+                      className="cursor-pointer  group border rounded-lg"
+                      onClick={() => navigate("/dashboard/forum/general")}
                     >
-                      <img
-                        src={trashIcon}
-                        alt="Delete"
-                        className="w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6"
-                      />
-                    </button>
-                  )}
-
-                  <div className="flex items-center gap-2 sm:gap-4 mt-2 pr-8 sm:pr-10">
-                    <h2
-                      className="text-lg sm:text-xl lg:text-2xl font-semibold mb-2 cursor-pointer hover:underline line-clamp-2 text-center sm:text-left w-full"
-                      onClick={() => {
-                        navigate(`/dashboard/forum-detail/${post.id}`, {
-                          state: { post },
-                        });
-                      }}
+                      <div className="flex items-center gap-3 p-3 sm:p-4 bg-base-200 rounded-lg hover:bg-base-300 transition-colors">
+                        <div className="flex-1 ">
+                          <h2 className="text-lg sm:text-xl lg:text-2xl font-bold transition-colors mb-2 ">
+                            General Programming Discussions
+                          </h2>
+                          <p className="text-sm text-gray-500">
+                            Click to view all discussions on "General
+                            Programming"
+                          </p>
+                        </div>
+                        <svg
+                          xmlns="http://www.w3.org/2000/svg"
+                          className="w-5 h-5 text-gray-400 group-hover:text-yellow-400 transition-colors"
+                          fill="none"
+                          viewBox="0 0 24 24"
+                          stroke="currentColor"
+                        >
+                          <path
+                            strokeLinecap="round"
+                            strokeLinejoin="round"
+                            strokeWidth="2"
+                            d="M9 5l7 7-7 7"
+                          />
+                        </svg>
+                      </div>
+                    </div>
+
+                    {/* Daily Challenge Header */}
+                    <div
+                      className="cursor-pointer group border rounded-lg"
+                      onClick={() =>
+                        navigate("/dashboard/forum/daily-challenge")
+                      }
                     >
-                      {post.title}
-                    </h2>
-                  </div>
-
-                  <p className="text-xs sm:text-sm text-gray-500 mb-2 text-center sm:text-left">
-                    By <span className="underline">{post.author_name}</span>{" "}
-                    <br></br>
-                    <span>
-                      {new Date(post.date_created).toLocaleDateString("en-US", {
-                        year: "numeric",
-                        month: "short",
-                        day: "numeric",
-                      })}
-                    </span>
-                  </p>
-                  <p className="mt-2 text-gray-400 text-sm sm:text-base line-clamp-3 text-center sm:text-left flex-grow">
-                    {post.content && post.content.length > 100
-                      ? post.content.slice(0, 100) + "..."
-                      : post.content}
-                  </p>
-                  <div
-                    className="mt-3 sm:mt-4 flex justify-center sm:justify-end items-center gap-2 cursor-pointer"
-                    onClick={(e) => {
-                      navigate(`/dashboard/forum-detail/${post.id}`, {
-                        state: { post },
-                      });
-                    }}
-                  >
-                    <p className="text-sm sm:text-base">{post.comment_count}</p>
-                    <img
-                      src={commentIcon}
-                      alt="Comment"
-                      className="w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 hover:opacity-80"
-                    />
+                      <div className="flex items-center gap-3 p-3 sm:p-4 bg-base-200 rounded-lg hover:bg-base-300 transition-colors">
+                        <div className="flex-1">
+                          <h2 className="text-lg sm:text-xl lg:text-2xl font-bold transition-colors mb-2">
+                            Daily Challenge Discussions
+                          </h2>
+                          <p className="text-sm text-gray-500">
+                            Click to view all discussions on "Daily Challenge"
+                          </p>
+                        </div>
+                        <svg
+                          xmlns="http://www.w3.org/2000/svg"
+                          className="w-5 h-5 text-gray-400 group-hover:text-yellow-400 transition-colors"
+                          fill="none"
+                          viewBox="0 0 24 24"
+                          stroke="currentColor"
+                        >
+                          <path
+                            strokeLinecap="round"
+                            strokeLinejoin="round"
+                            strokeWidth="2"
+                            d="M9 5l7 7-7 7"
+                          />
+                        </svg>
+                      </div>
+                    </div>
                   </div>
                 </div>
-              ))}
+              </div>
+
+              {/* Scrollable Posts Content */}
+              <div className=" overflow-y-auto">
+                <div className="p-4 sm:p-6 sm:pl-12 w-full">
+                  <div className="grid grid-cols-1 xl:grid-cols-2 gap-6 sm:gap-8 items-start">
+                    {/* General Programming Column */}
+                    <div className="flex flex-col ">
+                      <div className="grid grid-cols-1 gap-4 sm:gap-6">
+                        {posts
+                          .filter((post) => post.topic === "general")
+                          .map((post) => (
+                            <div
+                              key={post.id}
+                              className="p-3 sm:p-4 lg:p-6  rounded-lg shadow-sm hover:shadow-md transition relative bg-base-200 h-full flex flex-col"
+                            >
+                              {(post.author_name === user.name ||
+                                post.author_name === user.username ||
+                                user.isModerator) && (
+                                <button
+                                  className="absolute top-2 right-2 p-1.5 cursor-pointer rounded-full hover:bg-gray-600 transition-colors"
+                                  onClick={(e) => {
+                                    e.stopPropagation();
+                                    showModal(
+                                      "Are you sure you want to delete this post? This action cannot be undone.",
+                                      "confirm",
+                                      post.id
+                                    );
+                                  }}
+                                >
+                                  <img
+                                    src={trashIcon}
+                                    alt="Delete"
+                                    className="w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6"
+                                  />
+                                </button>
+                              )}
+
+                              <div className="flex items-center gap-2 sm:gap-4 mt-2 pr-8 sm:pr-10">
+                                <h3
+                                  className="text-lg sm:text-xl lg:text-2xl font-semibold mb-2 cursor-pointer hover:underline line-clamp-2 text-center sm:text-left w-full"
+                                  onClick={() => {
+                                    navigate(
+                                      `/dashboard/forum-detail/${post.id}`,
+                                      {
+                                        state: { post },
+                                      }
+                                    );
+                                  }}
+                                >
+                                  {post.title}
+                                </h3>
+                              </div>
+
+                              <p className="text-xs sm:text-sm text-gray-500 mb-2 flex flex-col sm:flex-row items-center sm:justify-start gap-0 sm:gap-2">
+                                <span>
+                                  By{" "}
+                                  <span className="font-semibold underline">
+                                    {post.author_name}
+                                  </span>
+                                </span>
+                                <span className="hidden sm:inline mx-1 text-gray-400">
+                                  •
+                                </span>
+                                <span className="italic text-gray-400">
+                                  {new Date(
+                                    post.date_created
+                                  ).toLocaleDateString("en-US", {
+                                    year: "numeric",
+                                    month: "short",
+                                    day: "numeric",
+                                  })}
+                                </span>
+                              </p>
+                              <p className="mt-2 text-gray-400 text-sm sm:text-base line-clamp-3 text-center sm:text-left flex-grow">
+                                {post.content && post.content.length > 100
+                                  ? post.content.slice(0, 70) + "..."
+                                  : post.content}
+                              </p>
+                              <div
+                                className="mt-3 sm:mt-4 flex justify-center sm:justify-end items-center gap-2 cursor-pointer"
+                                onClick={(e) => {
+                                  navigate(
+                                    `/dashboard/forum-detail/${post.id}`,
+                                    {
+                                      state: { post },
+                                    }
+                                  );
+                                }}
+                              >
+                                <p className="text-sm sm:text-base">
+                                  {post.comment_count}
+                                </p>
+                                <img
+                                  src={commentIcon}
+                                  alt="Comment"
+                                  className="w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 hover:opacity-80"
+                                />
+                              </div>
+                            </div>
+                          ))}
+                      </div>
+
+                      {posts.filter((post) => post.topic === "general").length >
+                        6 && (
+                        <div className="flex justify-center mt-4 sm:mt-6">
+                          <button
+                            onClick={() => navigate("/dashboard/forum/general")}
+                            className="btn btn-outline"
+                          >
+                            View All General Posts
+                          </button>
+                        </div>
+                      )}
+                    </div>
+
+                    {/* Daily Challenge Column */}
+                    <div className="flex flex-col ">
+                      <div className="grid grid-cols-1 gap-4 sm:gap-6 ">
+                        {posts
+                          .filter((post) => post.topic === "daily-challenge")
+                          .map((post) => (
+                            <div
+                              key={post.id}
+                              className="p-3 sm:p-4 lg:p-6 rounded-lg shadow-sm hover:shadow-md transition relative bg-base-200 h-full flex flex-col"
+                            >
+                              {(post.author_name === user.name ||
+                                post.author_name === user.username ||
+                                user.isModerator) && (
+                                <button
+                                  className="absolute top-2 right-2 p-1.5 cursor-pointer rounded-full hover:bg-gray-600 transition-colors"
+                                  onClick={(e) => {
+                                    e.stopPropagation();
+                                    showModal(
+                                      "Are you sure you want to delete this post? This action cannot be undone.",
+                                      "confirm",
+                                      post.id
+                                    );
+                                  }}
+                                >
+                                  <img
+                                    src={trashIcon}
+                                    alt="Delete"
+                                    className="w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6"
+                                  />
+                                </button>
+                              )}
+
+                              <div className="flex items-center gap-2 sm:gap-4 mt-2 pr-8 sm:pr-10">
+                                <h3
+                                  className="text-lg sm:text-xl lg:text-2xl font-semibold mb-2 cursor-pointer hover:underline line-clamp-2 text-center sm:text-left w-full"
+                                  onClick={() => {
+                                    navigate(
+                                      `/dashboard/forum-detail/${post.id}`,
+                                      {
+                                        state: { post },
+                                      }
+                                    );
+                                  }}
+                                >
+                                  {post.title}
+                                </h3>
+                              </div>
+
+                              {/* Challenge Title Badge */}
+
+                              <p className="text-xs sm:text-sm text-gray-500 mb-2 flex flex-col sm:flex-row items-center sm:justify-start gap-0 sm:gap-2">
+                                <span>
+                                  By{" "}
+                                  <span className="font-semibold underline">
+                                    {post.author_name}
+                                  </span>
+                                </span>
+                                <span className="hidden sm:inline mx-1 text-gray-400">
+                                  •
+                                </span>
+                                <span className="italic text-gray-400">
+                                  {new Date(
+                                    post.date_created
+                                  ).toLocaleDateString("en-US", {
+                                    year: "numeric",
+                                    month: "short",
+                                    day: "numeric",
+                                  })}
+                                </span>{" "}
+                                {/* Left: Challenge Title Badge */}
+                                {post.challengeTitle ? (
+                                  <span className="inline-block bg-yellow-100 text-yellow-800 text-xs font-semibold px-1 py-1 rounded">
+                                    {post.challengeTitle}
+                                  </span>
+                                ) : (
+                                  <span /> // keeps spacing if no badge
+                                )}
+                              </p>
+                              <p className="mt-2 text-gray-400 text-sm sm:text-base line-clamp-3 text-center sm:text-left flex-grow">
+                                {post.content && post.content.length > 100
+                                  ? post.content.slice(0, 100) + "..."
+                                  : post.content}
+                              </p>
+                              <div className="mt-3 sm:mt-4 flex items-center justify-end gap-4">
+                                {/* Right: Comment Count and Icon */}
+                                <div
+                                  className="flex items-center gap-2 cursor-pointer"
+                                  onClick={(e) => {
+                                    navigate(
+                                      `/dashboard/forum-detail/${post.id}`,
+                                      {
+                                        state: { post },
+                                      }
+                                    );
+                                  }}
+                                >
+                                  <p className="text-sm sm:text-base">
+                                    {post.comment_count}
+                                  </p>
+                                  <img
+                                    src={commentIcon}
+                                    alt="Comment"
+                                    className="w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 hover:opacity-80"
+                                  />
+                                </div>
+                              </div>
+                            </div>
+                          ))}
+                      </div>
+
+                      {posts.filter((post) => post.topic === "daily-challenge")
+                        .length > 6 && (
+                        <div className="flex justify-center mt-4 sm:mt-6">
+                          <button
+                            onClick={() =>
+                              navigate("/dashboard/forum/daily-challenge")
+                            }
+                            className="btn btn-outline"
+                          >
+                            View All Challenge Posts
+                          </button>
+                        </div>
+                      )}
+                    </div>
+                  </div>
+                </div>
+              </div>
             </div>
-            {hasMore && (
-              <div className="flex justify-center mt-4 sm:mt-6">
-                <button
-                  onClick={handleLoadMore}
-                  className={`btn btn-outline mb-4 sm:mb-6 ${
-                    loadingMore ? "btn-disabled" : ""
-                  }`}
-                  disabled={loadingMore}
-                >
-                  {loadingMore ? (
-                    <>
-                      <span className="loading loading-spinner loading-sm mr-2"></span>
-                      Loading...
-                    </>
-                  ) : (
-                    "Load More"
-                  )}
-                </button>
-              </div>
-            )}
-          </>
-        )}
+          )}
+        </div>
       </div>
 
Index: client/src/Dashboard/components/ManagePosts.jsx
===================================================================
--- client/src/Dashboard/components/ManagePosts.jsx	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ client/src/Dashboard/components/ManagePosts.jsx	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -110,4 +110,5 @@
   const handleDeletePost = async (postId) => {
     try {
+      console.log(postId.id);
       await deleteReviewPost(postId, user.id);
       fetchPostsData();
@@ -150,4 +151,5 @@
         `Are you sure you want to delete post with title "${item.title}"? This action cannot be undone.`,
         "delete",
+        item.id,
         item
       );
Index: client/src/services/taskService.js
===================================================================
--- client/src/services/taskService.js	(revision f450a5c47cb97738594f034d91b287335c9a505c)
+++ client/src/services/taskService.js	(revision 36394f8075407935dd1e8d3bfa6c6c8784df9254)
@@ -4,5 +4,7 @@
   return await apiClient.get(`/task`);
 };
-
+export const getTasksForForumPost = async () => {
+  return await apiClient.get("/task/forum-post");
+};
 export const getTestCaseForTask = async (taskId) => {
   return await apiClient.get(`/task/${taskId}/test-case`);
