Index: backend/node_modules/.package-lock.json
===================================================================
--- backend/node_modules/.package-lock.json	(revision e3021178a63ede5edcf38a17716c15f33e319eba)
+++ backend/node_modules/.package-lock.json	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -603,4 +603,16 @@
       "engines": {
         "node": ">=6.6.0"
+      }
+    },
+    "node_modules/cron-parser": {
+      "version": "4.9.0",
+      "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz",
+      "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "luxon": "^3.2.1"
+      },
+      "engines": {
+        "node": ">=12.0.0"
       }
     },
@@ -1380,4 +1392,19 @@
       "license": "MIT"
     },
+    "node_modules/long-timeout": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz",
+      "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==",
+      "license": "MIT"
+    },
+    "node_modules/luxon": {
+      "version": "3.6.1",
+      "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.6.1.tgz",
+      "integrity": "sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=12"
+      }
+    },
     "node_modules/math-intrinsics": {
       "version": "1.1.0",
@@ -1531,4 +1558,18 @@
         "node-gyp-build-optional": "optional.js",
         "node-gyp-build-test": "build-test.js"
+      }
+    },
+    "node_modules/node-schedule": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz",
+      "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==",
+      "license": "MIT",
+      "dependencies": {
+        "cron-parser": "^4.2.0",
+        "long-timeout": "0.1.1",
+        "sorted-array-functions": "^1.3.0"
+      },
+      "engines": {
+        "node": ">=6"
       }
     },
@@ -2015,4 +2056,10 @@
       }
     },
+    "node_modules/sorted-array-functions": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz",
+      "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==",
+      "license": "MIT"
+    },
     "node_modules/statuses": {
       "version": "2.0.1",
Index: backend/package-lock.json
===================================================================
--- backend/package-lock.json	(revision e3021178a63ede5edcf38a17716c15f33e319eba)
+++ backend/package-lock.json	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -20,4 +20,5 @@
         "jsonwebtoken": "^9.0.2",
         "leo-profanity": "^1.7.0",
+        "node-schedule": "^2.1.1",
         "openai": "^5.1.1",
         "supabase": "^2.24.3"
@@ -627,4 +628,16 @@
       "engines": {
         "node": ">=6.6.0"
+      }
+    },
+    "node_modules/cron-parser": {
+      "version": "4.9.0",
+      "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz",
+      "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "luxon": "^3.2.1"
+      },
+      "engines": {
+        "node": ">=12.0.0"
       }
     },
@@ -1404,4 +1417,19 @@
       "license": "MIT"
     },
+    "node_modules/long-timeout": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz",
+      "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==",
+      "license": "MIT"
+    },
+    "node_modules/luxon": {
+      "version": "3.6.1",
+      "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.6.1.tgz",
+      "integrity": "sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=12"
+      }
+    },
     "node_modules/math-intrinsics": {
       "version": "1.1.0",
@@ -1555,4 +1583,18 @@
         "node-gyp-build-optional": "optional.js",
         "node-gyp-build-test": "build-test.js"
+      }
+    },
+    "node_modules/node-schedule": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz",
+      "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==",
+      "license": "MIT",
+      "dependencies": {
+        "cron-parser": "^4.2.0",
+        "long-timeout": "0.1.1",
+        "sorted-array-functions": "^1.3.0"
+      },
+      "engines": {
+        "node": ">=6"
       }
     },
@@ -2039,4 +2081,10 @@
       }
     },
+    "node_modules/sorted-array-functions": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz",
+      "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==",
+      "license": "MIT"
+    },
     "node_modules/statuses": {
       "version": "2.0.1",
Index: backend/package.json
===================================================================
--- backend/package.json	(revision e3021178a63ede5edcf38a17716c15f33e319eba)
+++ backend/package.json	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -23,4 +23,5 @@
     "jsonwebtoken": "^9.0.2",
     "leo-profanity": "^1.7.0",
+    "node-schedule": "^2.1.1",
     "openai": "^5.1.1",
     "supabase": "^2.24.3"
Index: backend/prisma/schema.prisma
===================================================================
--- backend/prisma/schema.prisma	(revision e3021178a63ede5edcf38a17716c15f33e319eba)
+++ backend/prisma/schema.prisma	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -53,6 +53,4 @@
   rank                 String?          @default("Novice")
   points               BigInt?          @default(0)
-  commentCounter       Int?             @default(3) @db.SmallInt
-  commentCheckCounter  Int?             @default(0) @db.SmallInt
   postCounter          Int?             @default(3) @db.SmallInt
   postCheckCounter     Int?             @default(0) @db.SmallInt
@@ -60,4 +58,6 @@
   attempts             Int?             @default(0) @db.SmallInt
   solvedDailyChallenge Boolean?
+  daily_test_case_id   String?          @default(dbgenerated("gen_random_uuid()")) @db.Uuid
+  daily_points         Int?             @default(0) @db.SmallInt
   comments             comments[]
   forum_posts          forum_posts[]
Index: backend/scripts/dailyResets.js
===================================================================
--- backend/scripts/dailyResets.js	(revision e3021178a63ede5edcf38a17716c15f33e319eba)
+++ backend/scripts/dailyResets.js	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -1,4 +1,4 @@
-const prisma = require('../lib/prisma');
-const schedule = require('node-schedule');
+const prisma = require("../lib/prisma");
+const schedule = require("node-schedule");
 
 async function dailyResets() {
@@ -10,16 +10,4 @@
 
   try {
-    const userUpdateResult = await prisma.users.updateMany({
-      data: {
-        attempts: 0,
-        solvedDailyChallenge: false,
-      },
-    });
-    console.log(
-      `[${scriptExecutionTime.toISOString()}] Reset status for ${
-        userUpdateResult.count
-      } users.`
-    );
-
     const dateToProcess = new Date(scriptExecutionTime);
     dateToProcess.setUTCDate(scriptExecutionTime.getUTCDate() - 1);
@@ -35,10 +23,10 @@
     console.log(
       `[${scriptExecutionTime.toISOString()}] Current script execution UTC date: ${
-        scriptExecutionTime.toISOString().split('T')[0]
+        scriptExecutionTime.toISOString().split("T")[0]
       }`
     );
     console.log(
       `[${scriptExecutionTime.toISOString()}] Target date for challenge expiry (YYYY-MM-DD UTC): ${
-        targetDateForQuery.toISOString().split('T')[0]
+        targetDateForQuery.toISOString().split("T")[0]
       }`
     );
@@ -57,4 +45,7 @@
       data: {
         solvedDailyChallenge: false,
+        daily_test_case_id: null,
+        daily_points: 0,
+        attempts: 0,
       },
     });
@@ -63,5 +54,5 @@
         challengeUpdateResult.count
       } challenges from ${
-        targetDateForQuery.toISOString().split('T')[0]
+        targetDateForQuery.toISOString().split("T")[0]
       } as expired.`
     );
@@ -88,12 +79,12 @@
 }
 
-const job = schedule.scheduleJob('0 7 * * *', function () {
+const job = schedule.scheduleJob("0 7 * * *", function () {
   console.log(`Running scheduled daily reset at ${new Date().toISOString()}`);
   dailyResets();
 });
 
-process.on('SIGINT', function () {
+process.on("SIGINT", function () {
   job.cancel();
-  console.log('Daily reset scheduler stopped.');
+  console.log("Daily reset scheduler stopped.");
   process.exit(0);
 });
Index: backend/scripts/resetDailyTaskId.js
===================================================================
--- backend/scripts/resetDailyTaskId.js	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
+++ backend/scripts/resetDailyTaskId.js	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -0,0 +1,27 @@
+const prisma = require("../lib/prisma");
+
+async function resetDailyTestCaseIds() {
+  try {
+    // IMPORTANT: Replace 'user' with the actual name of your user model in schema.prisma
+    // (e.g., if your model is `model Users { ... }`, use `prisma.users.updateMany`)
+    // IMPORTANT: Ensure 'daily_test_case_id' is the correct field name.
+    const result = await prisma.users.updateMany({
+      where: {}, // An empty where clause applies the update to all records
+      data: {
+        daily_test_case_id: null, // Set the field to an empty string
+      },
+    });
+
+    console.log(
+      `Successfully reset daily_test_case_id for ${result.count} users.`
+    );
+  } catch (error) {
+    console.error("Error resetting daily_test_case_id:", error);
+    process.exitCode = 1; // Indicate an error occurred
+  } finally {
+    await prisma.$disconnect();
+    console.log("Disconnected from database.");
+  }
+}
+
+resetDailyTestCaseIds();
Index: backend/scripts/resetPostCounters.js
===================================================================
--- backend/scripts/resetPostCounters.js	(revision e3021178a63ede5edcf38a17716c15f33e319eba)
+++ backend/scripts/resetPostCounters.js	(revision 6a77e371c27b38ff6e9971c5affeaae4a44ff849)
@@ -1,4 +1,4 @@
-const prisma = require('../lib/prisma');
-const schedule = require('node-schedule');
+const prisma = require("../lib/prisma");
+const schedule = require("node-schedule");
 
 async function resetPostCounters() {
@@ -29,5 +29,5 @@
 }
 
-const job = schedule.scheduleJob('0 0 * * *', function () {
+const job = schedule.scheduleJob("0 0 * * *", function () {
   console.log(
     `[${new Date().toISOString()}] Running scheduled post counter reset at midnight.`
@@ -41,5 +41,5 @@
 );
 
-process.on('SIGINT', function () {
+process.on("SIGINT", function () {
   job.cancel();
   console.log(
