Index: backend/controllers/apiController.js
===================================================================
--- backend/controllers/apiController.js	(revision 2a81efaa39e7aa62e33ab8ef3b1debd0d99c707f)
+++ backend/controllers/apiController.js	(revision b69991ede47fec8697cb0066d1395ee768112ee1)
@@ -83,4 +83,6 @@
         postCheckCounter: studentInstance.postCheckCounter || 0,
         isModerator: studentInstance.isModerator || false,
+        solvedDailyChallenge: studentInstance.solvedDailyChallenge || false,
+
       },
     });
@@ -143,5 +145,4 @@
       }
 
-      // Convert BigInt fields to string
       const safeUserData = convertBigIntToString(userData);
 
Index: backend/controllers/taskController.js
===================================================================
--- backend/controllers/taskController.js	(revision 2a81efaa39e7aa62e33ab8ef3b1debd0d99c707f)
+++ backend/controllers/taskController.js	(revision b69991ede47fec8697cb0066d1395ee768112ee1)
@@ -57,5 +57,5 @@
                     input: testCase.input || '',
                     output: testCase.output || '',
-                    post_id: testCase.post_id
+                    challenge_id: testCase.challenge_id
                 }));
             }
@@ -155,7 +155,39 @@
 }
 
+const fetchTestCaseForToday = async (req, res) => {
+    const { id } = req.params;
+
+    try {
+        const testCases = await prisma.test_cases.findMany({
+            where: {
+                challenge_id: id,
+            },
+            select: {
+                id: true,
+                input: true,
+                output: true,
+                challenge_id: true,
+            },
+        });
+
+        if (testCases.length === 0) {
+            return res.status(404).json({ message: 'No test cases found for today' });
+        }
+
+        const randomTestCase = testCases[Math.floor(Math.random() * testCases.length)];
+
+        res.setHeader('Content-Type', 'application/json');
+        res.status(200).json(randomTestCase);
+
+    } catch (error) {
+        console.error('Error fetching test cases:', error);
+        res.status(500).json({ message: 'Internal server error', error: error.message });
+    }
+}
+
 module.exports = {
     getTaskByDate,
     updateAttemptsTask,
     updateSolvedTask,
+    fetchTestCaseForToday,
 };
Index: backend/routers/taskRouter.js
===================================================================
--- backend/routers/taskRouter.js	(revision 2a81efaa39e7aa62e33ab8ef3b1debd0d99c707f)
+++ backend/routers/taskRouter.js	(revision b69991ede47fec8697cb0066d1395ee768112ee1)
@@ -4,4 +4,5 @@
 
 router.get('/:date', taskController.getTaskByDate);
+router.get('/:id/test-case', taskController.fetchTestCaseForToday);
 router.put('/:id/attempts', taskController.updateAttemptsTask);
 router.put('/:id/solved', taskController.updateSolvedTask);
Index: client/src/Dashboard/components/Task.jsx
===================================================================
--- client/src/Dashboard/components/Task.jsx	(revision 2a81efaa39e7aa62e33ab8ef3b1debd0d99c707f)
+++ client/src/Dashboard/components/Task.jsx	(revision b69991ede47fec8697cb0066d1395ee768112ee1)
@@ -1,3 +1,3 @@
-import React, { useState } from "react";
+import React, { useEffect, useState } from "react";
 import Navbar from "./Navbar";
 import { useNavigate } from "react-router-dom";
@@ -6,8 +6,14 @@
   const [showTask, setShowTask] = useState(false);
   const [task, setTask] = useState(null);
+  const [testCase, setTestCase] = useState(null);
   const today = new Date().toLocaleDateString();
   const user = JSON.parse(localStorage.getItem("user")) || { attempts: 0 };
   const navigate = useNavigate();
-  const userOutput = document.getElementById("userOutput")?.value || "";
+
+  useEffect(() => {
+    if (task && task.id) {
+      fetchTestCaseForToday(task.id);
+    }
+  }, [task]);
 
   async function fetchTaskForToday(date) {
@@ -32,6 +38,6 @@
       try {
         data = JSON.parse(responseText);
-      } catch (parseError) {
-        throw new Error("Failed to parse server response as JSON");
+      } catch (error) {
+        throw new Error("Failed to parse server response as JSON" + error);
       }
 
@@ -47,5 +53,5 @@
         });
 
-        console.log("Fetched task:", taskData);
+        console.log("Fetched task:", task);
       } else {
         console.error("No tasks found for the date");
@@ -67,8 +73,53 @@
   }
 
+  function toggleSolvedDailyChallenge(user) {
+    const updatedUser = {
+      ...user,
+      solvedDailyChallenge: true,
+    };
+    localStorage.setItem("user", JSON.stringify(updatedUser));
+    return updatedUser;
+  }
+
+  async function fetchTestCaseForToday(id) {
+    try {
+      console.log("Fetching test case for task ID:", id);
+      const response = await fetch(`/task/${id}/test-case`, {
+        headers: {
+          Accept: "application/json",
+          "Cache-Control": "no-cache",
+        },
+      });
+
+      if (!response.ok) {
+        throw new Error(`HTTP error! status: ${response.status}`);
+      }
+
+      const data = await response.json();
+      console.log("Fetched test case:", data);
+
+      if (data && data.input && data.output) {
+        setTestCase({
+          input: data.input,
+          output: data.output,
+        });
+      } else {
+        console.error("No test case found for the task");
+        setTestCase(null);
+      }
+    } catch (error) {
+      console.error("Error fetching test case:", error);
+      setTestCase(null);
+    }
+  }
+
   const handleStart = () => {
     fetchTaskForToday(Date.now());
+
+    // toggleSolvedDailyChallenge(user);
+
     setShowTask(true);
   };
+
   function incrementAttempts(user) {
     const updatedUser = {
@@ -120,5 +171,12 @@
 
   function calculateTotalScore(user) {
-    return getTimeBonus() + getAttemptScore(user);
+    const score = parseInt(getTimeBonus()) + parseInt(getAttemptScore(user));
+    const updatedUser = {
+      ...user,
+      points: score + (parseInt(user.points) || 0),
+    };
+    localStorage.setItem("user", JSON.stringify(updatedUser));
+
+    return score;
   }
 
@@ -171,6 +229,5 @@
     const userOutputElement = document.getElementById("userOutput");
     const userOutputValue = userOutputElement ? userOutputElement.value : "";
-
-    const expectedOutput = task.examples[0].output;
+    console.log(typeof userOutputValue);
 
     let currentUser = JSON.parse(localStorage.getItem("user")) || {
@@ -181,5 +238,9 @@
     await updateTaskAttempts();
 
-    if (userOutputValue === expectedOutput) {
+    if (
+      userOutputValue == testCase.output ||
+      parseInt(userOutputValue) == testCase.output ||
+      `{userOutputValue}` == testCase.output
+    ) {
       currentUser = incrementAttempts(currentUser);
 
@@ -259,22 +320,45 @@
                 </div>
               </div>
-              <div className="card-actions justify-center mt-8">
-                <button
-                  onClick={handleStart}
-                  className="btn btn-lg border-amber-400 gap-2"
-                >
-                  <svg
-                    xmlns="http://www.w3.org/2000/svg"
-                    className="w-6 h-6"
-                    viewBox="0 0 24 24"
-                    fill="none"
-                    stroke="currentColor"
-                    strokeWidth="2"
+              {!user.solvedDailyChallenge && (
+                <div className="card-actions justify-center mt-8">
+                  <button
+                    onClick={handleStart}
+                    className="btn btn-lg border-amber-400 gap-2"
                   >
-                    <path d="M5 3l14 9-14 9V3z" />
-                  </svg>
-                  Start Challenge
-                </button>
-              </div>
+                    <svg
+                      xmlns="http://www.w3.org/2000/svg"
+                      className="w-6 h-6"
+                      viewBox="0 0 24 24"
+                      fill="none"
+                      stroke="currentColor"
+                      strokeWidth="2"
+                    >
+                      <path d="M5 3l14 9-14 9V3z" />
+                    </svg>
+                    Start Challenge
+                  </button>
+                </div>
+              )}
+
+              {user.solvedDailyChallenge && (
+                <div className="card-actions justify-center mt-8">
+                  <button
+                    className="btn btn-lg border-amber-400 gap-2"
+                    disabled
+                  >
+                    <svg
+                      xmlns="http://www.w3.org/2000/svg"
+                      className="w-6 h-6"
+                      viewBox="0 0 24 24"
+                      fill="none"
+                      stroke="currentColor"
+                      strokeWidth="2"
+                    >
+                      <path d="M5 3l14 9-14 9V3z" />
+                    </svg>
+                    Come back tomorrow at 7 AM
+                  </button>
+                </div>
+              )}
             </div>
           </div>
@@ -311,9 +395,11 @@
                   </div>
 
-                  <div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
+                  <div className="space-y-6 mb-8">
                     <div className="card bg-primary/5">
                       <div className="card-body">
                         <h3 className="card-title text-primary">Your Input</h3>
-                        <div className="text-2xl font-mono mt-2">"ANDREJ"</div>
+                        <div className="text-xl font-mono mt-2 break-all whitespace-normal font-bold">
+                          {testCase && testCase.input}
+                        </div>
                         <p className="text-sm mt-2 text-base-content/70">
                           Use this input in your local editor
@@ -329,5 +415,5 @@
                             console.log("Rendering example:", element);
                             return (
-                              <p className="font-mono" key={index}>
+                              <p className="font-mono break-all" key={index}>
                                 Input: "{element.input}" → Output: "
                                 {element.output}"
@@ -355,5 +441,20 @@
                     className="input input-bordered input-lg w-full mb-4"
                   />
-                  <div className="card-actions justify-end">
+                  <div className="card-actions justify-end gap-4">
+                    <button
+                      onClick={() => {
+                        if (
+                          window.confirm(
+                            "Are you sure you want to go back? You won't be able to reattempt."
+                          )
+                        ) {
+                          toggleSolvedDailyChallenge(user);
+                          navigate("/dashboard/forum");
+                        }
+                      }}
+                      className="btn border-amber-400 btn-lg"
+                    >
+                      Go Back
+                    </button>
                     <button
                       onClick={() => handleSubmitSolution()}
