From 99c353c6f397aaee56d8b16dcc503a19520c27a8 Mon Sep 17 00:00:00 2001 From: Rivka Weiss Date: Mon, 26 Jan 2026 01:05:49 +0200 Subject: [PATCH 1/3] docs: revise project title and description for clarity Updated project title and added hackathon details. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d20ca59..8f7c389 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -# SafeForest - Cybersecurity Education Game +# SafeForest - BeSafe Hackathon 2026 馃弳 2nd Place Winner ## QueenB X AppsFlyer - BeSafe Hackathon 2026 +### SafeForest - Cybersecurity Education Game **SafeForest** is an interactive 3D educational cybersecurity game designed to teach digital safety and online security concepts through engaging gameplay. From dc166cbfef8a480ed589f29b99000e0620da7f07 Mon Sep 17 00:00:00 2001 From: Rivka Weiss Date: Tue, 27 Jan 2026 00:19:58 +0200 Subject: [PATCH 2/3] chore: remove comments --- client/.gitignore | 11 +---------- client/src/pages/Login.jsx | 13 ------------- client/src/styles/modules/App.module.css | 7 ++----- client/vite.config.js | 2 -- db/db.js | 1 - 5 files changed, 3 insertions(+), 31 deletions(-) diff --git a/client/.gitignore b/client/.gitignore index 981208c..351b7a9 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,13 +1,8 @@ -# 讗诇 转注诇讬 讗转 拽讜讘抓 讛住讘讬讘讛 注诐 讛诪驻转讞 诇讙讬讟讛讗讘 .env # Logs logs *.log npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* node_modules dist @@ -19,8 +14,4 @@ dist-ssr !.vscode/extensions.json .idea .DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? + diff --git a/client/src/pages/Login.jsx b/client/src/pages/Login.jsx index 0f9a716..491570f 100644 --- a/client/src/pages/Login.jsx +++ b/client/src/pages/Login.jsx @@ -11,10 +11,8 @@ const Login = ({ onClose, onLoginSuccess }) => { const navigate = useNavigate(); const { handleLogin } = useContext(GameContext); - // Check if Google OAuth is available const hasGoogleAuth = Boolean(import.meta.env.VITE_GOOGLE_CLIENT_ID); - // Always call the hook, but conditionally use it const googleLogin = useGoogleLogin({ onSuccess: async (tokenResponse) => { try { @@ -38,16 +36,13 @@ const Login = ({ onClose, onLoginSuccess }) => { const userData = serverResponse.data.user; const googlePicture = userInfo.data.picture; - // Store user picture in localStorage if (googlePicture) { localStorage.setItem('userPicture', googlePicture); } - // Call onLoginSuccess if provided (for backward compatibility) if (onLoginSuccess) { onLoginSuccess(userData, googlePicture); } else { - // Otherwise, handle login directly handleLogin(userData); } @@ -58,7 +53,6 @@ const Login = ({ onClose, onLoginSuccess }) => { if (onClose) { onClose(); } else { - // Redirect to game page navigate('/game'); } }, 1000); @@ -117,11 +111,9 @@ const Login = ({ onClose, onLoginSuccess }) => { console.log('馃幃 Guest login:', guestUser); - // Call onLoginSuccess if provided (for backward compatibility) if (onLoginSuccess) { onLoginSuccess(guestUser, ''); } else { - // Otherwise, handle login directly handleLogin(guestUser); } @@ -130,7 +122,6 @@ const Login = ({ onClose, onLoginSuccess }) => { if (onClose) { onClose(); } else { - // Redirect to game page navigate('/game'); } }, 1000); @@ -138,16 +129,13 @@ const Login = ({ onClose, onLoginSuccess }) => { return (
- {/* LEFT SIDE: Visual Branding */}
- {/* Animated gradient background */}
- {/* Branding Content */}

SafeForest

Your Cybersecurity Sanctuary

@@ -158,7 +146,6 @@ const Login = ({ onClose, onLoginSuccess }) => {
- {/* RIGHT SIDE: Login Form */}
{onClose && ( diff --git a/client/src/styles/modules/App.module.css b/client/src/styles/modules/App.module.css index f2ac1e1..c4250c2 100644 --- a/client/src/styles/modules/App.module.css +++ b/client/src/styles/modules/App.module.css @@ -1,4 +1,3 @@ -/* App.module.css */ .appWrap { position: relative; min-height: 100vh; @@ -63,7 +62,6 @@ align-items: center; gap: 12px; - /* 专拽注 讝讻讜讻讬转 注讚讬谉 注诐 驻讬谞讜转 诪注讜讙诇讜转 拽诇讜转 (讻诪讜 讘-Side Panel) */ background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 6px 14px; @@ -73,11 +71,10 @@ } .userAvatar { - /* 转诪讜谞讛 注讙讜诇讛 诪讜砖诇诪转 */ width: 32px; height: 32px; - border-radius: 50%; /* 讝讛 诪讛 砖讛讜驻讱 讗转 讛转诪讜谞讛 诇注讬讙讜诇 */ - border: 2px solid #00f2ff; /* 诪住讙专转 谞讬讗讜谉 讚拽讛 住讘讬讘 讛注讬讙讜诇 */ + border-radius: 50%; + border: 2px solid #00f2ff; object-fit: cover; display: block; } diff --git a/client/vite.config.js b/client/vite.config.js index 8ed1f85..efd9c05 100644 --- a/client/vite.config.js +++ b/client/vite.config.js @@ -8,13 +8,11 @@ export default defineConfig({ port: 5173, strictPort: true, proxy: { - // 讻诇 讘拽砖讛 砖诪转讞讬诇讛 讘-api 转讜驻谞讛 诇砖专转 讛-Node.js '/api': { target: 'http://127.0.0.1:5000', changeOrigin: true, secure: false, }, - // 讛驻谞讬讬转 讘拽砖讜转 诇转诪讜谞讜转 (讗诐 讬砖 转讬拽讬讬讛 讻讝讜 讘砖专转) '/images': { target: 'http://127.0.0.1:5000', changeOrigin: true, diff --git a/db/db.js b/db/db.js index e0f1321..8aee89a 100644 --- a/db/db.js +++ b/db/db.js @@ -6,7 +6,6 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -// 讟注讬谞转 讛-env 诪讛转讬拽讬讬讛 砖诪注诇 (server) dotenv.config({ path: path.resolve(__dirname, '../server/.env') }); console.log("--- DB Connection Test ---"); From 51938c9864068a2b6a9e9a5fbdede38dfa7776af Mon Sep 17 00:00:00 2001 From: Rivka Weiss Date: Tue, 27 Jan 2026 01:29:24 +0200 Subject: [PATCH 3/3] docs: update project title in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f7c389..8e259de 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SafeForest - BeSafe Hackathon 2026 馃弳 2nd Place Winner +# BeSafe Hackathon 2026 馃弳 2nd Place Winner ## QueenB X AppsFlyer - BeSafe Hackathon 2026 ### SafeForest - Cybersecurity Education Game