diff --git a/debug-login.js b/debug-login.js new file mode 100644 index 0000000..0e5d8b7 --- /dev/null +++ b/debug-login.js @@ -0,0 +1,17 @@ +// Debug script to check password hashes +const { createHash } = require('crypto'); + +function hashPassword(password) { + return createHash('sha256').update(password).digest('hex'); +} + +console.log('Testing password hashes:'); +console.log('password -> ', hashPassword('password')); +console.log('123456 -> ', hashPassword('123456')); +console.log('test -> ', hashPassword('test')); + +// Known hashes from users.json: +console.log('\nExpected hashes from users.json:'); +console.log('admin1 (password): 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8'); +console.log('student1 (123456): 8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92'); +console.log('nate: 5a2a558c78d3717db731600c4f354fa1d9c84b556f108091a891f444f1bdec40'); diff --git a/migrateResults.js b/migrateResults.js deleted file mode 100644 index 62b082b..0000000 --- a/migrateResults.js +++ /dev/null @@ -1,16 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const resultsPath = path.join(__dirname, 'data', 'results.json'); -const existingData = JSON.parse(fs.readFileSync(resultsPath)); - -for (const username in existingData) { - const singleResult = existingData[username]; - existingData[username] = [{ - ...singleResult, - timestamp: new Date().toISOString() - }]; -} - -fs.writeFileSync(resultsPath, JSON.stringify(existingData, null, 2)); -console.log("โ Migration complete. Results are now session arrays."); \ No newline at end of file diff --git a/package.json b/package.json index 004722c..fb5199d 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,27 @@ { - "name": "spelling", - "version": "1.0.0", + "name": "modern-spelling-practice", + "version": "2.0.0", + "description": "A modern, multi-user spelling practice application with admin controls, customizable themes, and analytics", "main": "server.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "start": "node server.js" + "start": "node server.js", + "dev": "node server.js", + "test": "echo \"No tests specified\" && exit 0" }, "repository": { "type": "git", "url": "https://git.necloud.us/nmemmert/Spelling.git" }, - "keywords": [], - "author": "", + "keywords": [ + "spelling", + "education", + "practice", + "nodejs", + "express", + "learning" + ], + "author": "NateEmmert", "license": "ISC", - "description": "", "dependencies": { "express": "^5.1.0" } diff --git a/public/index.html b/public/index.html index 1bbb8d8..99d5622 100644 --- a/public/index.html +++ b/public/index.html @@ -1,200 +1,304 @@ -
- - -Type the word...
- - - -Word will appear here...