Prakhar Singh commited on
Commit
b811a8f
·
1 Parent(s): 6a144bd

Hero section is changed and dashboard basic structure is created

Browse files
Frontend/package-lock.json CHANGED
@@ -8,11 +8,16 @@
8
  "name": "package",
9
  "version": "0.0.0",
10
  "dependencies": {
 
 
11
  "@tailwindcss/vite": "^4.1.17",
 
 
12
  "lucide-react": "^0.553.0",
13
  "react": "^19.2.0",
14
  "react-dom": "^19.2.0",
15
  "react-router-dom": "^7.9.5",
 
16
  "tailwindcss": "^4.1.17"
17
  },
18
  "devDependencies": {
@@ -1313,6 +1318,37 @@
1313
  "win32"
1314
  ]
1315
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1316
  "node_modules/@tailwindcss/node": {
1317
  "version": "4.1.17",
1318
  "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.17.tgz",
@@ -2030,6 +2066,12 @@
2030
  "baseline-browser-mapping": "dist/cli.js"
2031
  }
2032
  },
 
 
 
 
 
 
2033
  "node_modules/brace-expansion": {
2034
  "version": "1.1.12",
2035
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
@@ -2136,6 +2178,15 @@
2136
  "url": "https://github.com/chalk/chalk?sponsor=1"
2137
  }
2138
  },
 
 
 
 
 
 
 
 
 
2139
  "node_modules/color-convert": {
2140
  "version": "2.0.1",
2141
  "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -2621,6 +2672,33 @@
2621
  "dev": true,
2622
  "license": "ISC"
2623
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2624
  "node_modules/fsevents": {
2625
  "version": "2.3.3",
2626
  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@@ -3136,6 +3214,12 @@
3136
  "url": "https://github.com/sponsors/sindresorhus"
3137
  }
3138
  },
 
 
 
 
 
 
3139
  "node_modules/lodash.merge": {
3140
  "version": "4.6.2",
3141
  "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
@@ -3208,6 +3292,21 @@
3208
  "node": "*"
3209
  }
3210
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3211
  "node_modules/ms": {
3212
  "version": "2.1.3",
3213
  "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -3247,6 +3346,18 @@
3247
  "dev": true,
3248
  "license": "MIT"
3249
  },
 
 
 
 
 
 
 
 
 
 
 
 
3250
  "node_modules/optionator": {
3251
  "version": "0.9.4",
3252
  "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@@ -3439,6 +3550,16 @@
3439
  "react": "^19.2.0"
3440
  }
3441
  },
 
 
 
 
 
 
 
 
 
 
3442
  "node_modules/react-refresh": {
3443
  "version": "0.18.0",
3444
  "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz",
@@ -3589,6 +3710,12 @@
3589
  "semver": "bin/semver.js"
3590
  }
3591
  },
 
 
 
 
 
 
3592
  "node_modules/set-cookie-parser": {
3593
  "version": "2.7.2",
3594
  "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
@@ -3653,6 +3780,16 @@
3653
  "node": ">=8"
3654
  }
3655
  },
 
 
 
 
 
 
 
 
 
 
3656
  "node_modules/tailwindcss": {
3657
  "version": "4.1.17",
3658
  "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz",
@@ -3672,6 +3809,12 @@
3672
  "url": "https://opencollective.com/webpack"
3673
  }
3674
  },
 
 
 
 
 
 
3675
  "node_modules/tinyglobby": {
3676
  "version": "0.2.15",
3677
  "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
@@ -3743,6 +3886,12 @@
3743
  "typescript": ">=4.8.4"
3744
  }
3745
  },
 
 
 
 
 
 
3746
  "node_modules/type-check": {
3747
  "version": "0.4.0",
3748
  "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
 
8
  "name": "package",
9
  "version": "0.0.0",
10
  "dependencies": {
11
+ "@splinetool/react-spline": "^4.1.0",
12
+ "@splinetool/runtime": "^1.11.2",
13
  "@tailwindcss/vite": "^4.1.17",
14
+ "clsx": "^2.1.1",
15
+ "framer-motion": "^12.23.24",
16
  "lucide-react": "^0.553.0",
17
  "react": "^19.2.0",
18
  "react-dom": "^19.2.0",
19
  "react-router-dom": "^7.9.5",
20
+ "tailwind-merge": "^3.4.0",
21
  "tailwindcss": "^4.1.17"
22
  },
23
  "devDependencies": {
 
1318
  "win32"
1319
  ]
1320
  },
1321
+ "node_modules/@splinetool/react-spline": {
1322
+ "version": "4.1.0",
1323
+ "resolved": "https://registry.npmjs.org/@splinetool/react-spline/-/react-spline-4.1.0.tgz",
1324
+ "integrity": "sha512-Y379gm17gw+1nxT/YXTCJnVIWuu7tsUH1tp/YxsYb0pZnc9Gljk7Om4Kpq7WPq0bZ4zidVCxf6xn6jgDcbHifQ==",
1325
+ "dependencies": {
1326
+ "blurhash": "2.0.5",
1327
+ "lodash.debounce": "4.0.8",
1328
+ "react-merge-refs": "2.1.1",
1329
+ "thumbhash": "0.1.1"
1330
+ },
1331
+ "peerDependencies": {
1332
+ "@splinetool/runtime": "*",
1333
+ "next": ">=14.2.0",
1334
+ "react": "*",
1335
+ "react-dom": "*"
1336
+ },
1337
+ "peerDependenciesMeta": {
1338
+ "next": {
1339
+ "optional": true
1340
+ }
1341
+ }
1342
+ },
1343
+ "node_modules/@splinetool/runtime": {
1344
+ "version": "1.11.2",
1345
+ "resolved": "https://registry.npmjs.org/@splinetool/runtime/-/runtime-1.11.2.tgz",
1346
+ "integrity": "sha512-rFz3KOQQRHQGzWBvPKRZcI7fZe5qxNYX1FmmCqzsbJkAU/hJdifaxpyN4xESpbkdta6s7riSmoz5lmPGIpZRRQ==",
1347
+ "dependencies": {
1348
+ "on-change": "^4.0.0",
1349
+ "semver-compare": "^1.0.0"
1350
+ }
1351
+ },
1352
  "node_modules/@tailwindcss/node": {
1353
  "version": "4.1.17",
1354
  "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.17.tgz",
 
2066
  "baseline-browser-mapping": "dist/cli.js"
2067
  }
2068
  },
2069
+ "node_modules/blurhash": {
2070
+ "version": "2.0.5",
2071
+ "resolved": "https://registry.npmjs.org/blurhash/-/blurhash-2.0.5.tgz",
2072
+ "integrity": "sha512-cRygWd7kGBQO3VEhPiTgq4Wc43ctsM+o46urrmPOiuAe+07fzlSB9OJVdpgDL0jPqXUVQ9ht7aq7kxOeJHRK+w==",
2073
+ "license": "MIT"
2074
+ },
2075
  "node_modules/brace-expansion": {
2076
  "version": "1.1.12",
2077
  "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
 
2178
  "url": "https://github.com/chalk/chalk?sponsor=1"
2179
  }
2180
  },
2181
+ "node_modules/clsx": {
2182
+ "version": "2.1.1",
2183
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
2184
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
2185
+ "license": "MIT",
2186
+ "engines": {
2187
+ "node": ">=6"
2188
+ }
2189
+ },
2190
  "node_modules/color-convert": {
2191
  "version": "2.0.1",
2192
  "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
 
2672
  "dev": true,
2673
  "license": "ISC"
2674
  },
2675
+ "node_modules/framer-motion": {
2676
+ "version": "12.23.24",
2677
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.24.tgz",
2678
+ "integrity": "sha512-HMi5HRoRCTou+3fb3h9oTLyJGBxHfW+HnNE25tAXOvVx/IvwMHK0cx7IR4a2ZU6sh3IX1Z+4ts32PcYBOqka8w==",
2679
+ "license": "MIT",
2680
+ "dependencies": {
2681
+ "motion-dom": "^12.23.23",
2682
+ "motion-utils": "^12.23.6",
2683
+ "tslib": "^2.4.0"
2684
+ },
2685
+ "peerDependencies": {
2686
+ "@emotion/is-prop-valid": "*",
2687
+ "react": "^18.0.0 || ^19.0.0",
2688
+ "react-dom": "^18.0.0 || ^19.0.0"
2689
+ },
2690
+ "peerDependenciesMeta": {
2691
+ "@emotion/is-prop-valid": {
2692
+ "optional": true
2693
+ },
2694
+ "react": {
2695
+ "optional": true
2696
+ },
2697
+ "react-dom": {
2698
+ "optional": true
2699
+ }
2700
+ }
2701
+ },
2702
  "node_modules/fsevents": {
2703
  "version": "2.3.3",
2704
  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
 
3214
  "url": "https://github.com/sponsors/sindresorhus"
3215
  }
3216
  },
3217
+ "node_modules/lodash.debounce": {
3218
+ "version": "4.0.8",
3219
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
3220
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
3221
+ "license": "MIT"
3222
+ },
3223
  "node_modules/lodash.merge": {
3224
  "version": "4.6.2",
3225
  "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
 
3292
  "node": "*"
3293
  }
3294
  },
3295
+ "node_modules/motion-dom": {
3296
+ "version": "12.23.23",
3297
+ "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.23.tgz",
3298
+ "integrity": "sha512-n5yolOs0TQQBRUFImrRfs/+6X4p3Q4n1dUEqt/H58Vx7OW6RF+foWEgmTVDhIWJIMXOuNNL0apKH2S16en9eiA==",
3299
+ "license": "MIT",
3300
+ "dependencies": {
3301
+ "motion-utils": "^12.23.6"
3302
+ }
3303
+ },
3304
+ "node_modules/motion-utils": {
3305
+ "version": "12.23.6",
3306
+ "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.23.6.tgz",
3307
+ "integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==",
3308
+ "license": "MIT"
3309
+ },
3310
  "node_modules/ms": {
3311
  "version": "2.1.3",
3312
  "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
 
3346
  "dev": true,
3347
  "license": "MIT"
3348
  },
3349
+ "node_modules/on-change": {
3350
+ "version": "4.0.2",
3351
+ "resolved": "https://registry.npmjs.org/on-change/-/on-change-4.0.2.tgz",
3352
+ "integrity": "sha512-cMtCyuJmTx/bg2HCpHo3ZLeF7FZnBOapLqZHr2AlLeJ5Ul0Zu2mUJJz051Fdwu/Et2YW04ZD+TtU+gVy0ACNCA==",
3353
+ "license": "MIT",
3354
+ "engines": {
3355
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
3356
+ },
3357
+ "funding": {
3358
+ "url": "https://github.com/sindresorhus/on-change?sponsor=1"
3359
+ }
3360
+ },
3361
  "node_modules/optionator": {
3362
  "version": "0.9.4",
3363
  "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
 
3550
  "react": "^19.2.0"
3551
  }
3552
  },
3553
+ "node_modules/react-merge-refs": {
3554
+ "version": "2.1.1",
3555
+ "resolved": "https://registry.npmjs.org/react-merge-refs/-/react-merge-refs-2.1.1.tgz",
3556
+ "integrity": "sha512-jLQXJ/URln51zskhgppGJ2ub7b2WFKGq3cl3NYKtlHoTG+dN2q7EzWrn3hN3EgPsTMvpR9tpq5ijdp7YwFZkag==",
3557
+ "license": "MIT",
3558
+ "funding": {
3559
+ "type": "github",
3560
+ "url": "https://github.com/sponsors/gregberge"
3561
+ }
3562
+ },
3563
  "node_modules/react-refresh": {
3564
  "version": "0.18.0",
3565
  "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz",
 
3710
  "semver": "bin/semver.js"
3711
  }
3712
  },
3713
+ "node_modules/semver-compare": {
3714
+ "version": "1.0.0",
3715
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
3716
+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
3717
+ "license": "MIT"
3718
+ },
3719
  "node_modules/set-cookie-parser": {
3720
  "version": "2.7.2",
3721
  "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
 
3780
  "node": ">=8"
3781
  }
3782
  },
3783
+ "node_modules/tailwind-merge": {
3784
+ "version": "3.4.0",
3785
+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz",
3786
+ "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==",
3787
+ "license": "MIT",
3788
+ "funding": {
3789
+ "type": "github",
3790
+ "url": "https://github.com/sponsors/dcastil"
3791
+ }
3792
+ },
3793
  "node_modules/tailwindcss": {
3794
  "version": "4.1.17",
3795
  "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz",
 
3809
  "url": "https://opencollective.com/webpack"
3810
  }
3811
  },
3812
+ "node_modules/thumbhash": {
3813
+ "version": "0.1.1",
3814
+ "resolved": "https://registry.npmjs.org/thumbhash/-/thumbhash-0.1.1.tgz",
3815
+ "integrity": "sha512-kH5pKeIIBPQXAOni2AiY/Cu/NKdkFREdpH+TLdM0g6WA7RriCv0kPLgP731ady67MhTAqrVG/4mnEeibVuCJcg==",
3816
+ "license": "MIT"
3817
+ },
3818
  "node_modules/tinyglobby": {
3819
  "version": "0.2.15",
3820
  "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
 
3886
  "typescript": ">=4.8.4"
3887
  }
3888
  },
3889
+ "node_modules/tslib": {
3890
+ "version": "2.8.1",
3891
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
3892
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
3893
+ "license": "0BSD"
3894
+ },
3895
  "node_modules/type-check": {
3896
  "version": "0.4.0",
3897
  "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
Frontend/package.json CHANGED
@@ -10,11 +10,16 @@
10
  "preview": "vite preview"
11
  },
12
  "dependencies": {
 
 
13
  "@tailwindcss/vite": "^4.1.17",
 
 
14
  "lucide-react": "^0.553.0",
15
  "react": "^19.2.0",
16
  "react-dom": "^19.2.0",
17
  "react-router-dom": "^7.9.5",
 
18
  "tailwindcss": "^4.1.17"
19
  },
20
  "devDependencies": {
 
10
  "preview": "vite preview"
11
  },
12
  "dependencies": {
13
+ "@splinetool/react-spline": "^4.1.0",
14
+ "@splinetool/runtime": "^1.11.2",
15
  "@tailwindcss/vite": "^4.1.17",
16
+ "clsx": "^2.1.1",
17
+ "framer-motion": "^12.23.24",
18
  "lucide-react": "^0.553.0",
19
  "react": "^19.2.0",
20
  "react-dom": "^19.2.0",
21
  "react-router-dom": "^7.9.5",
22
+ "tailwind-merge": "^3.4.0",
23
  "tailwindcss": "^4.1.17"
24
  },
25
  "devDependencies": {
Frontend/src/App.tsx CHANGED
@@ -1,14 +1,72 @@
1
- import { BrowserRouter } from 'react-router-dom'
2
- import Home from './pages/home'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
- function App() {
5
  return (
6
- <BrowserRouter>
7
- <div className="w-full min-h-screen">
8
- <Home />
9
- </div>
10
- </BrowserRouter>
11
- )
12
- }
13
-
14
- export default App
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { useState } from "react";
2
+ import { BrowserRouter as Router, Routes, Route, Navigate } from "react-router-dom";
3
+ import Dashboard from "./pages/dashboard";
4
+ import Notes from "./pages/note";
5
+ import AIInterview from "./pages/AiInterview";
6
+ import Quize from "./pages/quize";
7
+ import Home from "./pages/home";
8
+ import Sidebar from "./components/dashboard/Sidebar";
9
+ import Header from "./components/dashboard/Header";
10
+
11
+ const App: React.FC = () => {
12
+ // Track authentication state
13
+ const [isAuthenticated, setIsAuthenticated] = useState<boolean>(false);
14
+
15
+ // Function to handle successful login
16
+ const handleLogin = () => {
17
+ setIsAuthenticated(true);
18
+ };
19
+
20
+ // Function to handle logout
21
+ const handleLogout = () => {
22
+ setIsAuthenticated(false);
23
+ };
24
 
 
25
  return (
26
+ <Router>
27
+ <Routes>
28
+ {/* Public Route - Home Page */}
29
+ <Route
30
+ path="/"
31
+ element={
32
+ isAuthenticated ? (
33
+ <Navigate to="/dashboard" replace />
34
+ ) : (
35
+ <Home onLogin={handleLogin} />
36
+ )
37
+ }
38
+ />
39
+
40
+ {/* Protected Routes - Dashboard Layout */}
41
+ <Route
42
+ path="/*"
43
+ element={
44
+ isAuthenticated ? (
45
+ <div className="flex h-screen bg-gray-100">
46
+ {/* Sidebar */}
47
+ <Sidebar />
48
+
49
+ {/* Main Content */}
50
+ <div className="flex-1 flex flex-col">
51
+ <Header onLogout={handleLogout} />
52
+ <main className="flex-1 overflow-y-auto p-6">
53
+ <Routes>
54
+ <Route path="/dashboard" element={<Dashboard />} />
55
+ <Route path="/notes" element={<Notes />} />
56
+ <Route path="/AIInterview" element={<AIInterview />} />
57
+ <Route path="/quize" element={<Quize />} />
58
+ </Routes>
59
+ </main>
60
+ </div>
61
+ </div>
62
+ ) : (
63
+ <Navigate to="/" replace />
64
+ )
65
+ }
66
+ />
67
+ </Routes>
68
+ </Router>
69
+ );
70
+ };
71
+
72
+ export default App;
Frontend/src/components/{AuthModal.tsx → auth/AuthModal.tsx} RENAMED
File without changes
Frontend/src/components/auth/SignIn.tsx CHANGED
@@ -1,83 +1,119 @@
1
- // src/components/SignIn.tsx (Modified for Modal)
 
2
 
3
- import React from 'react';
4
- import { Mail, Lock, LogIn, Chrome, X } from 'lucide-react';
5
-
6
- // Added onClose prop to handle form-internal links/closing
7
  interface SignInProps {
8
  onClose: () => void;
9
  onSwitchToSignUp: () => void;
 
10
  }
11
 
12
- const SignIn: React.FC<SignInProps> = ({ onClose, onSwitchToSignUp }) => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  return (
14
- // Note: The outer 'div' styling has been removed, as the modal wrapper provides the background and padding.
15
- // The inner container's styling is now applied by the AuthModal.tsx parent.
16
  <>
17
- <h2 className="text-3xl font-bold mb-8 text-center text-white">
18
- Welcome Back
19
- </h2>
 
 
 
 
 
20
 
21
- {/* --- Sign In Form --- */}
22
- <form className="space-y-5">
23
- {/* Email Input */}
24
- <div>
25
- <label htmlFor="email" className="block text-sm font-medium mb-1 text-gray-300">Email Address</label>
26
- <div className="relative">
27
- <Mail className="w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-blue-400" />
28
- <input
29
- id="email"
30
- type="email"
31
- placeholder="you@example.com"
32
- className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
33
- />
34
- </div>
35
- </div>
36
 
37
- {/* Password Input */}
38
- <div>
39
- <label htmlFor="password" className="block text-sm font-medium mb-1 text-gray-300">Password</label>
40
- <div className="relative">
41
- <Lock className="w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-blue-400" />
42
- <input
43
- id="password"
44
- type="password"
45
- placeholder="••••••••"
46
- className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
47
- />
48
- </div>
49
- </div>
50
-
51
- {/* Sign In Button */}
52
- <button
53
- type="submit"
54
- className="w-full px-5 py-3 rounded-lg bg-gradient-to-r from-blue-500 to-gray-500 hover:from-blue-600 hover:to-blue-500 transition shadow-lg shadow-blue-500/50 text-lg font-semibold flex items-center justify-center gap-2 mt-6 text-white"
55
- >
56
- <LogIn className="w-5 h-5" />
57
- Sign In
58
- </button>
59
- </form>
60
 
61
- <div className="flex items-center my-6">
62
- <div className="flex-grow border-t border-slate-700"></div>
63
- <span className="flex-shrink mx-4 text-sm text-gray-400">OR</span>
64
- <div className="flex-grow border-t border-slate-700"></div>
 
 
 
 
 
 
 
 
 
 
 
65
  </div>
66
 
67
- {/* --- Social Sign In --- */}
68
  <button
69
- className="w-full px-5 py-3 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-semibold flex items-center justify-center gap-3 bg-slate-900"
 
 
70
  >
71
- <Chrome className="w-5 h-5" />
72
- Sign In with Google
73
  </button>
 
74
 
75
- <p className="mt-8 text-center text-sm text-gray-400">
76
- Don't have an account?
77
- <button type="button" onClick={onSwitchToSignUp} className="ml-2 font-medium text-blue-400 hover:text-blue-300 transition-colors">
78
- Sign Up
79
- </button>
80
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  </>
82
  );
83
  };
 
1
+ import React, { type FormEvent } from 'react'; // FIXED: Use 'type' import for FormEvent
2
+ import { Mail, Lock, LogIn, Chrome, X } from 'lucide-react'; // Added 'X' icon for close button
3
 
 
 
 
 
4
  interface SignInProps {
5
  onClose: () => void;
6
  onSwitchToSignUp: () => void;
7
+ onAuthSuccess: () => void; // New prop to handle successful auth
8
  }
9
 
10
+ const SignIn: React.FC<SignInProps> = ({ onClose, onSwitchToSignUp, onAuthSuccess }) => {
11
+
12
+ const handleSubmit = (e: FormEvent) => {
13
+ e.preventDefault();
14
+ // TODO: Add your actual authentication logic here
15
+
16
+ // Simulate successful login
17
+ onAuthSuccess();
18
+ };
19
+
20
+ const handleGoogleSignIn = () => {
21
+ // TODO: Add Google OAuth logic here
22
+ // For now, simulate successful login
23
+ onAuthSuccess();
24
+ };
25
+
26
  return (
 
 
27
  <>
28
+ {/* Close Button - Uses the 'onClose' prop */}
29
+ <button
30
+ onClick={onClose}
31
+ className="absolute top-4 right-4 text-gray-400 hover:text-white transition-colors p-2 rounded-full hover:bg-slate-800"
32
+ aria-label="Close"
33
+ >
34
+ <X className="w-5 h-5" />
35
+ </button>
36
 
37
+ <h2 className="text-3xl font-bold mb-8 text-center text-white">
38
+ Welcome Back
39
+ </h2>
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ {/* Sign In Form */}
42
+ <form className="space-y-5" onSubmit={handleSubmit}>
43
+ {/* Email Input */}
44
+ <div>
45
+ <label htmlFor="email" className="block text-sm font-medium mb-1 text-gray-300">
46
+ Email Address
47
+ </label>
48
+ <div className="relative">
49
+ <Mail className="w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-blue-400" />
50
+ <input
51
+ id="email"
52
+ type="email"
53
+ placeholder="you@example.com"
54
+ className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
55
+ required
56
+ />
57
+ </div>
58
+ </div>
 
 
 
 
 
59
 
60
+ {/* Password Input */}
61
+ <div>
62
+ <label htmlFor="password" className="block text-sm font-medium mb-1 text-gray-300">
63
+ Password
64
+ </label>
65
+ <div className="relative">
66
+ <Lock className="w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-blue-400" />
67
+ <input
68
+ id="password"
69
+ type="password"
70
+ placeholder="••••••••"
71
+ className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
72
+ required
73
+ />
74
+ </div>
75
  </div>
76
 
77
+ {/* Sign In Button */}
78
  <button
79
+ type="submit"
80
+ // FIXED: Changed bg-gradient-to-r to bg-linear-to-r (canonical class)
81
+ className="w-full px-5 py-3 rounded-lg bg-linear-to-r from-blue-500 to-gray-500 hover:from-blue-600 hover:to-blue-500 transition shadow-lg shadow-blue-500/50 text-lg font-semibold flex items-center justify-center gap-2 mt-6 text-white"
82
  >
83
+ <LogIn className="w-5 h-5" />
84
+ Sign In
85
  </button>
86
+ </form>
87
 
88
+ <div className="flex items-center my-6">
89
+ {/* FIXED: Changed flex-grow to grow (canonical class) */}
90
+ <div className="grow border-t border-slate-700"></div>
91
+ {/* FIXED: Changed flex-shrink to shrink (canonical class) */}
92
+ <span className="shrink mx-4 text-sm text-gray-400">OR</span>
93
+ {/* FIXED: Changed flex-grow to grow (canonical class) */}
94
+ <div className="grow border-t border-slate-700"></div>
95
+ </div>
96
+
97
+ {/* Social Sign In */}
98
+ <button
99
+ type="button"
100
+ onClick={handleGoogleSignIn}
101
+ className="w-full px-5 py-3 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-semibold flex items-center justify-center gap-3 bg-slate-900"
102
+ >
103
+ <Chrome className="w-5 h-5" />
104
+ Sign In with Google
105
+ </button>
106
+
107
+ <p className="mt-8 text-center text-sm text-gray-400">
108
+ Don't have an account?
109
+ <button
110
+ type="button"
111
+ onClick={onSwitchToSignUp}
112
+ className="ml-2 font-medium text-blue-400 hover:text-blue-300 transition-colors"
113
+ >
114
+ Sign Up
115
+ </button>
116
+ </p>
117
  </>
118
  );
119
  };
Frontend/src/components/auth/SignUp.tsx CHANGED
@@ -1,23 +1,43 @@
1
- // src/components/SignUp.tsx (Modified for Modal)
2
-
3
  import React from 'react';
4
- import { User, Mail, Lock, UserPlus, Chrome, X } from 'lucide-react';
5
 
6
  // Added onClose prop to handle form-internal links/closing
7
  interface SignUpProps {
8
  onClose: () => void;
9
  onSwitchToSignIn: () => void;
 
10
  }
11
 
12
  const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  return (
14
- // Note: The outer 'div' styling has been removed, as the modal wrapper provides the background and padding.
15
  <>
 
 
 
 
 
 
 
 
 
16
  <h2 className="text-3xl font-bold mb-8 text-center text-white">
17
  Create Your Account
18
  </h2>
19
  {/* --- Sign Up Form --- */}
20
- <form className="space-y-5">
21
  {/* Name Input */}
22
  <div>
23
  <label htmlFor="name" className="block text-sm font-medium mb-1 text-gray-300">Full Name</label>
@@ -28,6 +48,7 @@ const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
28
  type="text"
29
  placeholder="John Doe"
30
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
 
31
  />
32
  </div>
33
  </div>
@@ -42,6 +63,7 @@ const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
42
  type="email"
43
  placeholder="you@example.com"
44
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
 
45
  />
46
  </div>
47
  </div>
@@ -56,6 +78,7 @@ const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
56
  type="password"
57
  placeholder="••••••••"
58
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
 
59
  />
60
  </div>
61
  </div>
@@ -70,6 +93,7 @@ const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
70
  type="password"
71
  placeholder="••••••••"
72
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
 
73
  />
74
  </div>
75
  </div>
@@ -77,7 +101,8 @@ const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
77
  {/* Sign Up Button */}
78
  <button
79
  type="submit"
80
- className="w-full px-5 py-3 rounded-lg bg-gradient-to-r from-blue-500 to-gray-500 hover:from-blue-600 hover:to-blue-500 transition shadow-lg shadow-blue-500/50 text-lg font-semibold flex items-center justify-center gap-2 mt-6 text-white"
 
81
  >
82
  <UserPlus className="w-5 h-5" />
83
  Sign Up
@@ -85,13 +110,18 @@ const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
85
  </form>
86
 
87
  <div className="flex items-center my-6">
88
- <div className="flex-grow border-t border-slate-700"></div>
89
- <span className="flex-shrink mx-4 text-sm text-gray-400">OR</span>
90
- <div className="flex-grow border-t border-slate-700"></div>
 
 
 
91
  </div>
92
 
93
  {/* --- Social Sign Up --- */}
94
  <button
 
 
95
  className="w-full px-5 py-3 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-semibold flex items-center justify-center gap-3 bg-slate-900"
96
  >
97
  <Chrome className="w-5 h-5" />
 
 
 
1
  import React from 'react';
2
+ import { User, Mail, Lock, UserPlus, Chrome, X } from 'lucide-react'; // Added 'X' icon for close button
3
 
4
  // Added onClose prop to handle form-internal links/closing
5
  interface SignUpProps {
6
  onClose: () => void;
7
  onSwitchToSignIn: () => void;
8
+ // You might want to add onAuthSuccess here later, similar to SignIn
9
  }
10
 
11
  const SignUp: React.FC<SignUpProps> = ({ onClose, onSwitchToSignIn }) => {
12
+
13
+ // TODO: Implement actual form submission logic here
14
+ const handleSubmit = (e: React.FormEvent) => {
15
+ e.preventDefault();
16
+ console.log("Sign Up form submitted");
17
+ // Example: If successful, call a prop like onAuthSuccess()
18
+ };
19
+
20
+ // TODO: Implement actual Google OAuth logic here
21
+ const handleGoogleSignUp = () => {
22
+ console.log("Google Sign Up clicked");
23
+ };
24
+
25
  return (
 
26
  <>
27
+ {/* Close Button - Uses the 'onClose' prop */}
28
+ <button
29
+ onClick={onClose}
30
+ className="absolute top-4 right-4 text-gray-400 hover:text-white transition-colors p-2 rounded-full hover:bg-slate-800"
31
+ aria-label="Close"
32
+ >
33
+ <X className="w-5 h-5" />
34
+ </button>
35
+
36
  <h2 className="text-3xl font-bold mb-8 text-center text-white">
37
  Create Your Account
38
  </h2>
39
  {/* --- Sign Up Form --- */}
40
+ <form className="space-y-5" onSubmit={handleSubmit}>
41
  {/* Name Input */}
42
  <div>
43
  <label htmlFor="name" className="block text-sm font-medium mb-1 text-gray-300">Full Name</label>
 
48
  type="text"
49
  placeholder="John Doe"
50
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
51
+ required
52
  />
53
  </div>
54
  </div>
 
63
  type="email"
64
  placeholder="you@example.com"
65
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
66
+ required
67
  />
68
  </div>
69
  </div>
 
78
  type="password"
79
  placeholder="••••••••"
80
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
81
+ required
82
  />
83
  </div>
84
  </div>
 
93
  type="password"
94
  placeholder="••••••••"
95
  className="w-full pl-10 pr-4 py-3 border rounded-lg focus:outline-none focus:ring-2 bg-slate-800 border-slate-700 text-white focus:ring-blue-500 transition-colors"
96
+ required
97
  />
98
  </div>
99
  </div>
 
101
  {/* Sign Up Button */}
102
  <button
103
  type="submit"
104
+ // FIXED: Changed bg-gradient-to-r to bg-linear-to-r (canonical class)
105
+ className="w-full px-5 py-3 rounded-lg bg-linear-to-r from-blue-500 to-gray-500 hover:from-blue-600 hover:to-blue-500 transition shadow-lg shadow-blue-500/50 text-lg font-semibold flex items-center justify-center gap-2 mt-6 text-white"
106
  >
107
  <UserPlus className="w-5 h-5" />
108
  Sign Up
 
110
  </form>
111
 
112
  <div className="flex items-center my-6">
113
+ {/* FIXED: Changed flex-grow to grow (canonical class) */}
114
+ <div className="grow border-t border-slate-700"></div>
115
+ {/* FIXED: Changed flex-shrink to shrink (canonical class) */}
116
+ <span className="shrink mx-4 text-sm text-gray-400">OR</span>
117
+ {/* FIXED: Changed flex-grow to grow (canonical class) */}
118
+ <div className="grow border-t border-slate-700"></div>
119
  </div>
120
 
121
  {/* --- Social Sign Up --- */}
122
  <button
123
+ type="button"
124
+ onClick={handleGoogleSignUp}
125
  className="w-full px-5 py-3 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-semibold flex items-center justify-center gap-3 bg-slate-900"
126
  >
127
  <Chrome className="w-5 h-5" />
Frontend/src/components/dashboard/Header.tsx ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { LogOut, Bell, Settings, User } from 'lucide-react';
3
+
4
+ interface HeaderProps {
5
+ onLogout: () => void;
6
+ }
7
+
8
+ const Header: React.FC<HeaderProps> = ({ onLogout }) => {
9
+ return (
10
+ <header className="bg-white shadow-sm border-b border-gray-200 px-6 py-4">
11
+ <div className="flex items-center justify-between">
12
+ {/* Left side - Title or Search */}
13
+ <div>
14
+ <h1 className="text-2xl font-bold text-gray-800">Dashboard</h1>
15
+ </div>
16
+
17
+ {/* Right side - Actions */}
18
+ <div className="flex items-center space-x-4">
19
+ {/* Notifications */}
20
+ <button className="p-2 rounded-lg hover:bg-gray-100 transition-colors relative">
21
+ <Bell className="w-5 h-5 text-gray-600" />
22
+ <span className="absolute top-1 right-1 w-2 h-2 bg-red-500 rounded-full"></span>
23
+ </button>
24
+
25
+ {/* Settings */}
26
+ <button className="p-2 rounded-lg hover:bg-gray-100 transition-colors">
27
+ <Settings className="w-5 h-5 text-gray-600" />
28
+ </button>
29
+
30
+ {/* User Profile */}
31
+ <div className="flex items-center space-x-3 pl-4 border-l border-gray-200">
32
+ <div className="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center">
33
+ <User className="w-5 h-5 text-white" />
34
+ </div>
35
+ <div className="hidden md:block">
36
+ <p className="text-sm font-medium text-gray-700">John Doe</p>
37
+ <p className="text-xs text-gray-500">john@example.com</p>
38
+ </div>
39
+ </div>
40
+
41
+ {/* Logout Button */}
42
+ <button
43
+ onClick={onLogout}
44
+ className="flex items-center space-x-2 px-4 py-2 rounded-lg bg-red-500 hover:bg-red-600 text-white transition-colors"
45
+ >
46
+ <LogOut className="w-4 h-4" />
47
+ <span className="hidden md:inline">Logout</span>
48
+ </button>
49
+ </div>
50
+ </div>
51
+ </header>
52
+ );
53
+ };
54
+
55
+ export default Header;
Frontend/src/components/dashboard/Sidebar.tsx ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from "react";
2
+ import { Link, useLocation } from "react-router-dom";
3
+ import { Home, FileText, Brain, BookOpen } from "lucide-react";
4
+
5
+ const Sidebar: React.FC = () => {
6
+ const location = useLocation();
7
+
8
+ const navItems = [
9
+ { path: "/", label: "Dashboard", icon: <Home size={18} /> },
10
+ { path: "/notes", label: "Notes", icon: <BookOpen size={18} /> },
11
+ { path: "/ai-interview", label: "AI Interview", icon: <Brain size={18} /> },
12
+ { path: "/quize/resume", label: "Resume Quiz", icon: <FileText size={18} /> },
13
+ ];
14
+
15
+ return (
16
+ <aside className="w-64 bg-gray-900 text-white flex flex-col">
17
+ <div className="text-2xl font-bold text-center py-6 border-b border-gray-700">
18
+ InterviewAI
19
+ </div>
20
+ <nav className="flex-1 p-4 space-y-3">
21
+ {navItems.map((item) => (
22
+ <Link
23
+ key={item.path}
24
+ to={item.path}
25
+ className={`flex items-center space-x-3 p-3 rounded-lg hover:bg-gray-800 transition ${
26
+ location.pathname === item.path ? "bg-gray-800" : ""
27
+ }`}
28
+ >
29
+ {item.icon}
30
+ <span>{item.label}</span>
31
+ </Link>
32
+ ))}
33
+ </nav>
34
+ </aside>
35
+ );
36
+ };
37
+
38
+ export default Sidebar;
Frontend/src/components/ui/card.tsx ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from "react"
2
+ import { cn } from "../../lib/utils"
3
+
4
+ // 1. Corrected forwardRef syntax: <RefType, PropsType>(...)
5
+ // 2. Used modern typing: React.ElementRef<"tag"> and React.ComponentPropsWithoutRef<"tag">
6
+
7
+ const Card = React.forwardRef<
8
+ React.ElementRef<"div">,
9
+ React.ComponentPropsWithoutRef<"div">
10
+ >(({ className, ...props }, ref) => (
11
+ <div
12
+ ref={ref}
13
+ className={cn(
14
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
15
+ className,
16
+ )}
17
+ {...props}
18
+ />
19
+ ))
20
+ Card.displayName = "Card"
21
+
22
+ const CardHeader = React.forwardRef<
23
+ React.ElementRef<"div">,
24
+ React.ComponentPropsWithoutRef<"div">
25
+ >(({ className, ...props }, ref) => (
26
+ <div
27
+ ref={ref}
28
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
29
+ {...props}
30
+ />
31
+ ))
32
+ CardHeader.displayName = "CardHeader"
33
+
34
+ const CardTitle = React.forwardRef<
35
+ React.ElementRef<"h3">, // Corrected to h3 to match the element type
36
+ React.ComponentPropsWithoutRef<"h3">
37
+ >(({ className, ...props }, ref) => (
38
+ <h3
39
+ ref={ref}
40
+ className={cn(
41
+ "text-2xl font-semibold leading-none tracking-tight",
42
+ className,
43
+ )}
44
+ {...props}
45
+ />
46
+ ))
47
+ CardTitle.displayName = "CardTitle"
48
+
49
+ const CardDescription = React.forwardRef<
50
+ React.ElementRef<"p">,
51
+ React.ComponentPropsWithoutRef<"p">
52
+ >(({ className, ...props }, ref) => (
53
+ <p
54
+ ref={ref}
55
+ className={cn("text-sm text-muted-foreground", className)}
56
+ {...props}
57
+ />
58
+ ))
59
+ CardDescription.displayName = "CardDescription"
60
+
61
+ const CardContent = React.forwardRef<
62
+ React.ElementRef<"div">,
63
+ React.ComponentPropsWithoutRef<"div">
64
+ >(({ className, ...props }, ref) => (
65
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
66
+ ))
67
+ CardContent.displayName = "CardContent"
68
+
69
+ const CardFooter = React.forwardRef<
70
+ React.ElementRef<"div">,
71
+ React.ComponentPropsWithoutRef<"div">
72
+ >(({ className, ...props }, ref) => (
73
+ <div
74
+ ref={ref}
75
+ className={cn("flex items-center p-6 pt-0", className)}
76
+ {...props}
77
+ />
78
+ ))
79
+ CardFooter.displayName = "CardFooter"
80
+
81
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
Frontend/src/components/ui/splite.tsx ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use client'
2
+
3
+ import { Suspense, lazy } from 'react'
4
+ const Spline = lazy(() => import('@splinetool/react-spline'))
5
+
6
+ interface SplineSceneProps {
7
+ scene: string
8
+ className?: string
9
+ }
10
+
11
+ export function SplineScene({ scene, className }: SplineSceneProps) {
12
+ return (
13
+ <Suspense
14
+ fallback={
15
+ <div className="w-full h-full flex items-center justify-center">
16
+ <div className="w-12 h-12 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"></div>
17
+ </div>
18
+ }
19
+ >
20
+ <Spline
21
+ scene={scene}
22
+ className={className}
23
+ />
24
+ </Suspense>
25
+ )
26
+ }
Frontend/src/components/ui/spotlight.tsx ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { cn } from "../../lib/utils";
2
+
3
+ type SpotlightProps = {
4
+ className?: string;
5
+ fill?: string;
6
+ };
7
+
8
+ export const Spotlight = ({ className, fill }: SpotlightProps) => {
9
+ return (
10
+ <svg
11
+ className={cn(
12
+ "animate-spotlight pointer-events-none absolute z-[1] h-[169%] w-[138%] lg:w-[84%] opacity-0",
13
+ className
14
+ )}
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ viewBox="0 0 3787 2842"
17
+ fill="none"
18
+ >
19
+ <g filter="url(#filter)">
20
+ <ellipse
21
+ cx="1924.71"
22
+ cy="273.501"
23
+ rx="1924.71"
24
+ ry="273.501"
25
+ transform="matrix(-0.822377 -0.568943 -0.568943 0.822377 3631.88 2291.09)"
26
+ fill={fill || "white"}
27
+ fillOpacity="0.21"
28
+ ></ellipse>
29
+ </g>
30
+ <defs>
31
+ <filter
32
+ id="filter"
33
+ x="0.860352"
34
+ y="0.838989"
35
+ width="3785.16"
36
+ height="2840.26"
37
+ filterUnits="userSpaceOnUse"
38
+ colorInterpolationFilters="sRGB"
39
+ >
40
+ <feFlood floodOpacity="0" result="BackgroundImageFix"></feFlood>
41
+ <feBlend
42
+ mode="normal"
43
+ in="SourceGraphic"
44
+ in2="BackgroundImageFix"
45
+ result="shape"
46
+ ></feBlend>
47
+ <feGaussianBlur
48
+ stdDeviation="151"
49
+ result="effect1_foregroundBlur_1065_8"
50
+ ></feGaussianBlur>
51
+ </filter>
52
+ </defs>
53
+ </svg>
54
+ );
55
+ };
Frontend/src/lib/utils.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import { type ClassValue, clsx } from "clsx"
2
+ import { twMerge } from "tailwind-merge"
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
Frontend/src/pages/AiInterview.tsx ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from "react";
2
+
3
+ const AIInterview: React.FC = () => {
4
+ return (
5
+ <div>
6
+ <h2 className="text-3xl font-bold mb-4">AI Interview Practice</h2>
7
+ <p className="text-gray-600 mb-4">
8
+ Practice live AI interviews with real-time feedback and adaptive questions.
9
+ </p>
10
+ <button className="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
11
+ Start AI Interview
12
+ </button>
13
+ </div>
14
+ );
15
+ };
16
+
17
+ export default AIInterview;
Frontend/src/pages/dashboard.tsx ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from "react";
2
+
3
+ const Dashboard: React.FC = () => {
4
+ return (
5
+ <div className="text-gray-800">
6
+ <h2 className="text-3xl font-bold mb-4">Welcome to InterviewAI Dashboard</h2>
7
+ <p className="text-gray-600">
8
+ Manage your AI interview sessions, quizzes, and notes all in one place.
9
+ </p>
10
+ </div>
11
+ );
12
+ };
13
+
14
+ export default Dashboard;
Frontend/src/pages/home.tsx CHANGED
@@ -1,351 +1,376 @@
1
  import React, { useState, useEffect } from 'react';
2
  import { Sparkles, Zap, Target, Clock, Award, ChevronRight, Menu, X } from 'lucide-react';
3
- import AuthModal from '../components/AuthModal';
4
- import SignIn from '../components/auth/SignIn';
5
  import SignUp from '../components/auth/SignUp';
 
 
 
6
 
7
  interface Feature {
8
-   icon: React.ReactNode;
9
-   title: string;
10
-   description: string;
11
  }
12
 
13
  interface Step {
14
-   step: string;
15
-   title: string;
16
-   desc: string;
17
  }
18
 
19
- const AIInterviewPlatform: React.FC = () => {
20
-   const [isMenuOpen, setIsMenuOpen] = useState<boolean>(false);
21
-   const [scrolled, setScrolled] = useState<boolean>(false);
 
22
 
23
-   const [modalType, setModalType] = useState<'none' | 'signIn' | 'signUp'>('none');
 
 
 
24
 
25
-     // Handlers for opening/closing modals, now with mobile menu closing logic
26
-     const openSignInModal = () => {
27
  setModalType('signIn');
28
- setIsMenuOpen(false); // Close mobile menu when opening modal
29
  };
30
-     const openSignUpModal = () => {
 
31
  setModalType('signUp');
32
- setIsMenuOpen(false); // Close mobile menu when opening modal
 
 
 
 
 
 
 
 
33
  };
34
-     const closeModal = () => setModalType('none');
35
 
36
-   useEffect(() => {
37
-     const handleScroll = (): void => {
38
-       setScrolled(window.scrollY > 50);
39
-     };
40
-     window.addEventListener('scroll', handleScroll);
41
-     return () => window.removeEventListener('scroll', handleScroll);
42
-   }, []);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
-   const features: Feature[] = [
45
-     {
46
-       icon: <Sparkles className="w-8 h-8" />,
47
-       title: "AI-Powered Questions",
48
-       description: "Dynamic questions adapted to your skill level and role"
49
-     },
50
-     {
51
-       icon: <Zap className="w-8 h-8" />,
52
-       title: "Instant Feedback",
53
-       description: "Get real-time analysis and improvement suggestions"
54
-     },
55
-     {
56
-       icon: <Target className="w-8 h-8" />,
57
-       title: "Role-Specific Prep",
58
-       description: "Tailored scenarios for your target position"
59
-     },
60
-     {
61
-       icon: <Clock className="w-8 h-8" />,
62
-       title: "Practice Anytime",
63
-       description: "24/7 access to unlimited mock interviews"
64
-     },
65
-     {
66
-       icon: <Award className="w-8 h-8" />,
67
-       title: "Performance Analytics",
68
-       description: "Track your progress with detailed insights"
69
-     }
70
-   ];
71
 
72
-   const steps: Step[] = [
73
-     { step: "01", title: "Choose Your Role", desc: "Select the job position you're preparing for" },
74
-     { step: "02", title: "Practice Interview", desc: "Answer AI-generated questions in real-time" },
75
-     { step: "03", title: "Get Feedback", desc: "Receive detailed analysis and improvement tips" }
76
-   ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
-   return (
79
- <div className="w-full min-h-screen bg-gradient-to-br from-blue-900 to-gray-400 from-blue-900 text-white **overflow-x-hidden**">
80
-       {/* Navigation Bar */}
81
-       <nav className={`fixed top-0 left-0 right-0 w-full z-50 transition-all duration-300 ${scrolled ? 'bg-slate-900/95 backdrop-blur-md shadow-xl' : 'bg-slate-900/80 backdrop-blur-sm'}`}>
82
-         <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
83
-           <div className="flex justify-between items-center h-20">
84
-             {/* Logo */}
85
-             <div className="flex items-center space-x-3">
86
-               <div className="bg-gradient-to-br from-blue-500 to-gray-400 p-2 rounded-lg">
87
-                 <Sparkles className="w-6 h-6 text-white" />
88
-               </div>
89
- <span className="text-2xl font-bold bg-gradient-to-r from-blue-500 to-gray-400 bg-clip-text text-transparent">
90
-                 InterviewAI
91
-               </span>
92
-             </div>
93
-                        
94
- {/* Desktop Navigation */}
95
-             <div className="hidden lg:flex items-center space-x-8">
96
-               <a href="#home" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
97
-                 Home
98
-               </a>
99
-               <a href="#about" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
100
-                 About
101
-               </a>
102
-               <a href="#features" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
103
-                 Features
104
-               </a>
105
-               <a href="#how-it-works" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
106
-                 How It Works
107
-               </a>
108
-               <button onClick={openSignInModal} className="px-6 py-2.5 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-medium">
109
-                 Sign In
110
-               </button>
111
-               <button onClick={openSignUpModal} className="px-6 py-2.5 rounded-lg bg-gradient-to-r from-blue-500 to-blue-500 hover:from-blue-600 hover:to-blue-900 transition-all shadow-lg shadow-blue-500/30 font-medium">
112
-                 Sign Up
113
-               </button>
114
-             </div>
115
-             {/* Mobile Menu Button */}
116
-             <button
117
-               className="lg:hidden p-2 rounded-lg hover:bg-white/10 transition-colors"
118
-               onClick={() => setIsMenuOpen(!isMenuOpen)}
119
-             >
120
-               {isMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
121
-             </button>
122
-           </div>
123
-         </div>
124
- {/* Mobile Menu */}
125
-         {isMenuOpen && (
126
-           <div className="lg:hidden border-t border-white/10 bg-slate-900/98 backdrop-blur-md">
127
-             <div className="px-4 py-4 space-y-3 max-w-7xl mx-auto">
128
-               <a
129
-                 href="#home"
130
-                 className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
131
-                 onClick={() => setIsMenuOpen(false)}
132
-               >
133
-                 Home
134
-               </a>
135
-               <a
136
-                 href="#about"
137
-                 className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
138
-                 onClick={() => setIsMenuOpen(false)}
139
-               >
140
-                 About
141
-               </a>
142
-               <a
143
-                 href="#features"
144
-                 className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
145
-                 onClick={() => setIsMenuOpen(false)}
146
-               >
147
-                 Features
148
-               </a>
149
-               <a
150
-                 href="#how-it-works"
151
-                 className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
152
-                 onClick={() => setIsMenuOpen(false)}
153
-               >
154
-                 How It Works
155
-               </a>
156
-               <button onClick={openSignInModal} className="w-full py-3 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-medium">
157
-                 Sign In
158
-               </button>
159
-               <button onClick={openSignUpModal} className="w-full py-3 rounded-lg bg-gradient-to-r from-blue-500 to-blue-500 hover:from-blue-600 hover:to-blue-900 transition-all font-medium">
160
-                 Sign Up
161
-               </button>
162
-             </div>
163
-           </div>
164
-         )}
165
-       </nav>
166
-       <AuthModal isOpen={modalType === 'signIn'} onClose={closeModal}>
167
-                 <SignIn
168
-                     onClose={closeModal}
169
-                     onSwitchToSignUp={openSignUpModal}
170
-                 />
171
-             </AuthModal>
172
 
173
-             <AuthModal isOpen={modalType === 'signUp'} onClose={closeModal}>
174
-                 <SignUp
175
-                     onClose={closeModal}
176
-                     onSwitchToSignIn={openSignInModal}
177
-                 />
178
-       </AuthModal>
179
-       {/* Hero Section */}
180
-       <section id="home" className="min-h-screen flex items-center pt-20 pb-20 px-4 sm:px-6 lg:px-8 bg-black">
181
-         <div className="max-w-7xl mx-auto text-center">
182
-           <div className="inline-block mb-4 px-4 py-2 bg-blue-500/20 rounded-full border border-blue-500/50">
183
-             <span className="text-sm font-semibold text-blue-300">✨ AI-Powered Interview Practice</span>
184
-           </div>
185
-                    
186
-           <h1 className="text-5xl sm:text-6xl lg:text-7xl font-bold mb-6 leading-tight">
187
-             Master Your Next
188
-             <span className="block bg-gradient-to-r from-blue-500 via-gray-400 to-blue-500 bg-clip-text text-transparent">
189
-               Interview with AI
190
-             </span>
191
-           </h1>
192
-                    
193
-           <p className="text-xl text-gray-300 mb-10 max-w-3xl mx-auto">
194
-             Practice with our intelligent AI interviewer, get instant feedback, and land your dream job with confidence.
195
-           </p>
196
-                    
197
-           <div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
198
-             <button className="px-8 py-4 rounded-lg bg-gradient-to-r from-blue-500 to-gray-500 hover:from-blue-600 hover:to-blue-500 transition shadow-lg shadow-blue-500/50 flex items-center gap-2 text-lg font-semibold">
199
-               Start Free Trial
200
-               <ChevronRight className="w-5 h-5" />
201
-             </button>
202
-             <button className="px-8 py-4 rounded-lg border-2 border-blue-400 hover:bg-blue-400/10 transition text-lg font-semibold">
203
-               Watch Demo
204
-             </button>
205
-           </div>
206
-           {/* Stats */}
207
-           <div className="mt-20 grid grid-cols-1 sm:grid-cols-3 gap-8 max-w-4xl mx-auto">
208
-             <div className="bg-white/5 backdrop-blur-sm rounded-xl p-6 border border-white/10">
209
-               <div className="text-4xl font-bold text-blue-600 mb-2">50K+</div>
210
-               <div className="text-gray-400">Successful Interviews</div>
211
-             </div>
212
-             <div className="bg-white/5 backdrop-blur-sm rounded-xl p-6 border border-white/10">
213
-               <div className="text-4xl font-bold text-blue-600 mb-2">95%</div>
214
-               <div className="text-gray-400">Success Rate</div>
215
-             </div>
216
-             <div className="bg-white/5 backdrop-blur-sm rounded-xl p-6 border border-white/10">
217
-               <div className="text-4xl font-bold text-blue-600 mb-2">24/7</div>
218
-               <div className="text-gray-400">AI Availability</div>
219
-             </div>
220
-           </div>
221
-         </div>
222
-       </section>
223
-       {/* About Section */}
224
-       <section id="about" className="py-20 px-4 sm:px-6 lg:px-8 bg-black/40">
225
-         <div className="max-w-6xl mx-auto">
226
-           <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
227
-             <div>
228
-               <h2 className="text-4xl sm:text-5xl font-bold mb-6">
229
-                 About InterviewAI
230
-               </h2>
231
-               <p className="text-lg text-gray-300 mb-6">
232
-                 We're revolutionizing interview preparation with cutting-edge AI technology. Our platform helps candidates practice, learn, and succeed in their job interviews.
233
-               </p>
234
-               <p className="text-lg text-gray-300 mb-6">
235
-                 Founded by industry experts and powered by advanced machine learning, InterviewAI provides personalized interview experiences that adapt to your unique needs and goals.
236
-               </p>
237
-               <div className="space-y-4">
238
-                 <div className="flex items-center gap-3">
239
-                   <div className="w-2 h-2 bg-blue-400 rounded-full"></div>
240
-                   <span className="text-gray-300">Advanced AI interview simulations</span>
241
-                 </div>
242
-                 <div className="flex items-center gap-3">
243
-                   <div className="w-2 h-2 bg-blue-600 rounded-full"></div>
244
-                   <span className="text-gray-300">Personalized feedback and coaching</span>
245
-                 </div>
246
-                 <div className="flex items-center gap-3">
247
-                   <div className="w-2 h-2 bg-blue-400 rounded-full"></div>
248
-                   <span className="text-gray-300">Industry-leading success rates</span>
249
-                 </div>
250
-               </div>
251
-             </div>
252
-             <div className="bg-gradient-to-br from-blue-900/50 to-gray-900/50 rounded-2xl p-8 border border-gray-200/30">
253
-               <div className="space-y-6">
254
-                 <div className="bg-white/5 backdrop-blur-sm rounded-lg p-6">
255
-                   <div className="text-3xl font-bold text-blue-400 mb-2">2020</div>
256
-                   <div className="text-gray-400">Founded</div>
257
-                 </div>
258
-                 <div className="bg-white/5 backdrop-blur-sm rounded-lg p-6">
259
-                   <div className="text-3xl font-bold text-blue-500 mb-2">50K+</div>
260
-                   <div className="text-gray-400">Happy Users</div>
261
-                 </div>
262
-                 <div className="bg-white/5 backdrop-blur-sm rounded-lg p-6">
263
-                   <div className="text-3xl font-bold text-blue-400 mb-2">500+</div>
264
-                   <div className="text-gray-400">Companies Trust Us</div>
265
-                 </div>
266
-               </div>
267
-             </div>
268
-           </div>
269
-         </div>
270
-       </section>
271
-       {/* Features Section */}
272
-       <section id="features" className="py-20 px-4 sm:px-6 lg:px-8 bg-black">
273
-         <div className="max-w-7xl mx-auto">
274
-           <div className="text-center mb-16">
275
-             <h2 className="text-4xl sm:text-5xl font-bold mb-4">
276
-               Why Choose InterviewAI?
277
-             </h2>
278
-             <p className="text-xl text-gray-400">
279
-               Everything you need to ace your next interview
280
-             </p>
281
-           </div>
282
-           <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
283
-             {features.map((feature: Feature, index: number) => (
284
-               <div
285
-                 key={index}
286
-                 className="bg-gradient-to-br from-blue-900/50 to-gray-900/50 backdrop-blur-sm rounded-xl p-8 border border-blue-500/20 hover:border-gray-500/50 transition-all duration-300 hover:transform hover:scale-105"
287
-               >
288
-                 <div className="bg-gradient-to-br from-blue-500 to-gray-400 w-16 h-16 rounded-lg flex items-center justify-center mb-4 shadow-lg shadow-blue-500/50">
289
-                   {feature.icon}
290
-                 </div>
291
-                 <h3 className="text-xl font-bold mb-3">{feature.title}</h3>
292
-                 <p className="text-gray-400">{feature.description}</p>
293
-               </div>
294
-             ))}
295
-           </div>
296
-         </div>
297
-       </section>
298
-       {/* How It Works */}
299
-       <section id="how-it-works" className="py-20 px-4 sm:px-6 lg:px-8 bg-black/40">
300
-         <div className="max-w-7xl mx-auto">
301
-           <div className="text-center mb-16">
302
-             <h2 className="text-4xl sm:text-5xl font-bold mb-4">
303
-               How It Works
304
-             </h2>
305
-             <p className="text-xl text-gray-400">
306
-               Get started in three simple steps
307
-             </p>
308
-           </div>
309
-           <div className="grid grid-cols-1 md:grid-cols-3 gap-8">
310
-             {steps.map((item: Step, index: number) => (
311
-               <div key={index} className="relative text-center">
312
-                 <div className="text-7xl font-bold text-blue-500/20 mb-4">{item.step}</div>
313
-                 <h3 className="text-2xl font-bold mb-3">{item.title}</h3>
314
-                 <p className="text-gray-400">{item.desc}</p>
315
-                 {index < 2 && (
316
-                   <ChevronRight className="hidden md:block absolute top-12 -right-12 w-8 h-8 text-blue-500/50" />
317
-                 )}
318
-               </div>
319
-             ))}
320
-           </div>
321
-         </div>
322
-       </section>
323
-       {/* CTA Section */}
324
-       <section className="py-20 px-4 sm:px-6 lg:px-8 bg-gradient-to-r from-gray-900/50 to-blue-700/50">
325
-         <div className="max-w-4xl mx-auto text-center">
326
-           <h2 className="text-4xl sm:text-5xl font-bold mb-6">
327
-             Ready to Ace Your Interview?
328
-           </h2>
329
-           <p className="text-xl text-gray-300 mb-10">
330
-             Join thousands of successful candidates who prepared with InterviewAI
331
-           </p>
332
-           <button className="px-10 py-5 rounded-lg bg-gradient-to-r from-blue-400 to-blue-700 hover:from-blue-600 hover:to-blue-900 transition shadow-lg shadow-blue-500/50 text-lg font-semibold">
333
-             Start Your Free Trial Today
334
-           </button>
335
-         </div>
336
-       </section>
337
-       {/* Footer */}
338
-       <footer className="py-12 px-4 sm:px-6 lg:px-8 bg-black">
339
-         <div className="max-w-7xl mx-auto text-center text-gray-400">
340
-           <div className="flex items-center justify-center space-x-2 mb-4">
341
-             <Sparkles className="w-6 h-6 text-blue-400" />
342
-             <span className="text-xl font-bold text-white">InterviewAI</span>
343
-           </div>
344
-           <p>&copy; 2025 InterviewAI. All rights reserved.</p>
345
-         </div>
346
-       </footer>
347
-     </div>
348
-   );
349
  };
350
 
351
  export default AIInterviewPlatform;
 
1
  import React, { useState, useEffect } from 'react';
2
  import { Sparkles, Zap, Target, Clock, Award, ChevronRight, Menu, X } from 'lucide-react';
3
+ import AuthModal from '../components/auth/AuthModal';
4
+ import SignIn from '../components/auth/SignIn';
5
  import SignUp from '../components/auth/SignUp';
6
+ import { SplineScene } from '../components/ui/splite';
7
+ import { Spotlight } from '../components/ui/spotlight';
8
+ import { Card } from '../components/ui/card';
9
 
10
  interface Feature {
11
+ icon: React.ReactNode;
12
+ title: string;
13
+ description: string;
14
  }
15
 
16
  interface Step {
17
+ step: string;
18
+ title: string;
19
+ desc: string;
20
  }
21
 
22
+ // Add onLogin prop
23
+ interface AIInterviewPlatformProps {
24
+ onLogin: () => void;
25
+ }
26
 
27
+ const AIInterviewPlatform: React.FC<AIInterviewPlatformProps> = ({ onLogin }) => {
28
+ const [isMenuOpen, setIsMenuOpen] = useState<boolean>(false);
29
+ const [scrolled, setScrolled] = useState<boolean>(false);
30
+ const [modalType, setModalType] = useState<'none' | 'signIn' | 'signUp'>('none');
31
 
32
+ // Handlers for opening/closing modals
33
+ const openSignInModal = () => {
34
  setModalType('signIn');
35
+ setIsMenuOpen(false);
36
  };
37
+
38
+ const openSignUpModal = () => {
39
  setModalType('signUp');
40
+ setIsMenuOpen(false);
41
+ };
42
+
43
+ const closeModal = () => setModalType('none');
44
+
45
+ // Handle successful authentication
46
+ const handleAuthSuccess = () => {
47
+ closeModal();
48
+ onLogin(); // Call the parent function to update auth state
49
  };
 
50
 
51
+ useEffect(() => {
52
+ const handleScroll = (): void => {
53
+ setScrolled(window.scrollY > 50);
54
+ };
55
+ window.addEventListener('scroll', handleScroll);
56
+ return () => window.removeEventListener('scroll', handleScroll);
57
+ }, []);
58
+
59
+ const features: Feature[] = [
60
+ {
61
+ icon: <Sparkles className="w-8 h-8" />,
62
+ title: "AI-Powered Questions",
63
+ description: "Dynamic questions adapted to your skill level and role"
64
+ },
65
+ {
66
+ icon: <Zap className="w-8 h-8" />,
67
+ title: "Instant Feedback",
68
+ description: "Get real-time analysis and improvement suggestions"
69
+ },
70
+ {
71
+ icon: <Target className="w-8 h-8" />,
72
+ title: "Role-Specific Prep",
73
+ description: "Tailored scenarios for your target position"
74
+ },
75
+ {
76
+ icon: <Clock className="w-8 h-8" />,
77
+ title: "Practice Anytime",
78
+ description: "24/7 access to unlimited mock interviews"
79
+ },
80
+ {
81
+ icon: <Award className="w-8 h-8" />,
82
+ title: "Performance Analytics",
83
+ description: "Track your progress with detailed insights"
84
+ }
85
+ ];
86
+
87
+ const steps: Step[] = [
88
+ { step: "01", title: "Choose Your Role", desc: "Select the job position you're preparing for" },
89
+ { step: "02", title: "Practice Interview", desc: "Answer AI-generated questions in real-time" },
90
+ { step: "03", title: "Get Feedback", desc: "Receive detailed analysis and improvement tips" }
91
+ ];
92
+
93
+ return (
94
+ <div className="w-full min-h-screen bg-gradient-to-br from-blue-900 to-gray-400 text-white overflow-x-hidden">
95
+ {/* Navigation Bar */}
96
+ <nav className={`fixed top-0 left-0 right-0 w-full z-50 transition-all duration-300 ${scrolled ? 'bg-slate-900/95 backdrop-blur-md shadow-xl' : 'bg-slate-900/80 backdrop-blur-sm'}`}>
97
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
98
+ <div className="flex justify-between items-center h-20">
99
+ {/* Logo */}
100
+ <div className="flex items-center space-x-3">
101
+ <div className="bg-gradient-to-br from-blue-500 to-gray-400 p-2 rounded-lg">
102
+ <Sparkles className="w-6 h-6 text-white" />
103
+ </div>
104
+ <span className="text-2xl font-bold bg-gradient-to-r from-blue-500 to-gray-400 bg-clip-text text-transparent">
105
+ InterviewAI
106
+ </span>
107
+ </div>
108
+
109
+ {/* Desktop Navigation */}
110
+ <div className="hidden lg:flex items-center space-x-8">
111
+ <a href="#home" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
112
+ Home
113
+ </a>
114
+ <a href="#about" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
115
+ About
116
+ </a>
117
+ <a href="#features" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
118
+ Features
119
+ </a>
120
+ <a href="#how-it-works" className="text-gray-200 hover:text-blue-400 transition-colors font-medium">
121
+ How It Works
122
+ </a>
123
+ <button onClick={openSignInModal} className="px-6 py-2.5 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-medium">
124
+ Sign In
125
+ </button>
126
+ <button onClick={openSignUpModal} className="px-6 py-2.5 rounded-lg bg-gradient-to-r from-blue-500 to-blue-500 hover:from-blue-600 hover:to-blue-900 transition-all shadow-lg shadow-blue-500/30 font-medium">
127
+ Sign Up
128
+ </button>
129
+ </div>
130
+
131
+ {/* Mobile Menu Button */}
132
+ <button
133
+ className="lg:hidden p-2 rounded-lg hover:bg-white/10 transition-colors"
134
+ onClick={() => setIsMenuOpen(!isMenuOpen)}
135
+ >
136
+ {isMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
137
+ </button>
138
+ </div>
139
+ </div>
140
+
141
+ {/* Mobile Menu */}
142
+ {isMenuOpen && (
143
+ <div className="lg:hidden border-t border-white/10 bg-slate-900/98 backdrop-blur-md">
144
+ <div className="px-4 py-4 space-y-3 max-w-7xl mx-auto">
145
+ <a
146
+ href="#home"
147
+ className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
148
+ onClick={() => setIsMenuOpen(false)}
149
+ >
150
+ Home
151
+ </a>
152
+ <a
153
+ href="#about"
154
+ className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
155
+ onClick={() => setIsMenuOpen(false)}
156
+ >
157
+ About
158
+ </a>
159
+ <a
160
+ href="#features"
161
+ className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
162
+ onClick={() => setIsMenuOpen(false)}
163
+ >
164
+ Features
165
+ </a>
166
+ <a
167
+ href="#how-it-works"
168
+ className="block py-3 px-4 rounded-lg text-gray-200 hover:bg-blue-500/10 hover:text-blue-400 transition-all font-medium"
169
+ onClick={() => setIsMenuOpen(false)}
170
+ >
171
+ How It Works
172
+ </a>
173
+ <button onClick={openSignInModal} className="w-full py-3 rounded-lg border-2 border-blue-400 text-blue-400 hover:bg-blue-400/10 transition-all font-medium">
174
+ Sign In
175
+ </button>
176
+ <button onClick={openSignUpModal} className="w-full py-3 rounded-lg bg-gradient-to-r from-blue-500 to-blue-500 hover:from-blue-600 hover:to-blue-900 transition-all font-medium">
177
+ Sign Up
178
+ </button>
179
+ </div>
180
+ </div>
181
+ )}
182
+ </nav>
183
+
184
+ {/* Auth Modals */}
185
+ <AuthModal isOpen={modalType === 'signIn'} onClose={closeModal}>
186
+ <SignIn
187
+ onClose={closeModal}
188
+ onSwitchToSignUp={openSignUpModal}
189
+ onAuthSuccess={handleAuthSuccess}
190
+ />
191
+ </AuthModal>
192
+
193
+ <AuthModal isOpen={modalType === 'signUp'} onClose={closeModal}>
194
+ <SignUp
195
+ onClose={closeModal}
196
+ onSwitchToSignIn={openSignInModal}
197
+ onAuthSuccess={handleAuthSuccess}
198
+ />
199
+ </AuthModal>
200
+
201
+ {/* Hero Section */}
202
+ <section id="home" className="min-h-[calc(100vh-68px)] flex items-center pt-10 pb-20 px-4 sm:px-6 lg:px-8 relative overflow-hidden bg-black">
203
+ <div className="max-w-7xl mx-auto w-full relative z-10">
204
+ {/* Spotlight applied directly to the container as per the demo structure */}
205
+ <Spotlight
206
+ className="-top-40 left-0 md:left-60 md:-top-20"
207
+ fill="white"
208
+ />
209
+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
210
+ {/* Left side - Text content */}
211
+ <div>
212
+ <h1 className="text-5xl sm:text-6xl lg:text-7xl font-bold mb-6 leading-tight">
213
+ Master Your Next
214
+ <span className="block bg-gradient-to-r from-blue-500 via-gray-400 to-blue-500 bg-clip-text text-transparent">
215
+ Interview with AI
216
+ </span>
217
+ </h1>
218
+ <p className="text-xl text-gray-300 mb-10 max-w-lg">
219
+ Practice with our intelligent AI interviewer, get instant feedback, and land your dream job with confidence.
220
+ </p>
221
+ <button
222
+ onClick={openSignUpModal}
223
+ className="px-8 py-4 rounded-xl bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 transition duration-300 shadow-xl shadow-blue-600/30 flex items-center gap-2 text-lg font-semibold transform hover:scale-[1.03]"
224
+ >
225
+ Start Free Trial
226
+ <ChevronRight className="w-5 h-5" />
227
+ </button>
228
+ </div>
229
+
230
+ {/* Right side - 3D Scene */}
231
+ <div className="h-[500px] lg:h-[600px] relative">
232
+ <SplineScene
233
+ scene="https://prod.spline.design/kZDDjO5HuC9GJUM2/scene.splinecode"
234
+ className="w-full h-full"
235
+ />
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </section>
240
+
241
+ {/* About Section */}
242
+ <section id="about" className="py-20 px-4 sm:px-6 lg:px-8 bg-black/40">
243
+ <div className="max-w-6xl mx-auto">
244
+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
245
+ <div>
246
+ <h2 className="text-4xl sm:text-5xl font-bold mb-6">
247
+ About InterviewAI
248
+ </h2>
249
+ <p className="text-lg text-gray-300 mb-6">
250
+ We're revolutionizing interview preparation with cutting-edge AI technology. Our platform helps candidates practice, learn, and succeed in their job interviews.
251
+ </p>
252
+ <p className="text-lg text-gray-300 mb-6">
253
+ Founded by industry experts and powered by advanced machine learning, InterviewAI provides personalized interview experiences that adapt to your unique needs and goals.
254
+ </p>
255
+ <div className="space-y-4">
256
+ <div className="flex items-center gap-3">
257
+ <div className="w-2 h-2 bg-blue-400 rounded-full"></div>
258
+ <span className="text-gray-300">Advanced AI interview simulations</span>
259
+ </div>
260
+ <div className="flex items-center gap-3">
261
+ <div className="w-2 h-2 bg-blue-600 rounded-full"></div>
262
+ <span className="text-gray-300">Personalized feedback and coaching</span>
263
+ </div>
264
+ <div className="flex items-center gap-3">
265
+ <div className="w-2 h-2 bg-blue-400 rounded-full"></div>
266
+ <span className="text-gray-300">Industry-leading success rates</span>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ <div className="bg-gradient-to-br from-blue-900/50 to-gray-900/50 rounded-2xl p-8 border border-gray-200/30">
271
+ <div className="space-y-6">
272
+ <div className="bg-white/5 backdrop-blur-sm rounded-lg p-6">
273
+ <div className="text-3xl font-bold text-blue-400 mb-2">2020</div>
274
+ <div className="text-gray-400">Founded</div>
275
+ </div>
276
+ <div className="bg-white/5 backdrop-blur-sm rounded-lg p-6">
277
+ <div className="text-3xl font-bold text-blue-500 mb-2">50K+</div>
278
+ <div className="text-gray-400">Happy Users</div>
279
+ </div>
280
+ <div className="bg-white/5 backdrop-blur-sm rounded-lg p-6">
281
+ <div className="text-3xl font-bold text-blue-400 mb-2">500+</div>
282
+ <div className="text-gray-400">Companies Trust Us</div>
283
+ </div>
284
+ </div>
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </section>
289
 
290
+ {/* Features Section */}
291
+ <section id="features" className="py-20 px-4 sm:px-6 lg:px-8 bg-black">
292
+ <div className="max-w-7xl mx-auto">
293
+ <div className="text-center mb-16">
294
+ <h2 className="text-4xl sm:text-5xl font-bold mb-4">
295
+ Why Choose InterviewAI?
296
+ </h2>
297
+ <p className="text-xl text-gray-400">
298
+ Everything you need to ace your next interview
299
+ </p>
300
+ </div>
301
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
302
+ {features.map((feature: Feature, index: number) => (
303
+ <div
304
+ key={index}
305
+ className="bg-gradient-to-br from-blue-900/50 to-gray-900/50 backdrop-blur-sm rounded-xl p-8 border border-blue-500/20 hover:border-gray-500/50 transition-all duration-300 hover:transform hover:scale-105"
306
+ >
307
+ <div className="bg-gradient-to-br from-blue-500 to-gray-400 w-16 h-16 rounded-lg flex items-center justify-center mb-4 shadow-lg shadow-blue-500/50">
308
+ {feature.icon}
309
+ </div>
310
+ <h3 className="text-xl font-bold mb-3">{feature.title}</h3>
311
+ <p className="text-gray-400">{feature.description}</p>
312
+ </div>
313
+ ))}
314
+ </div>
315
+ </div>
316
+ </section>
317
 
318
+ {/* How It Works */}
319
+ <section id="how-it-works" className="py-20 px-4 sm:px-6 lg:px-8 bg-black/40">
320
+ <div className="max-w-7xl mx-auto">
321
+ <div className="text-center mb-16">
322
+ <h2 className="text-4xl sm:text-5xl font-bold mb-4">
323
+ How It Works
324
+ </h2>
325
+ <p className="text-xl text-gray-400">
326
+ Get started in three simple steps
327
+ </p>
328
+ </div>
329
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-8">
330
+ {steps.map((item: Step, index: number) => (
331
+ <div key={index} className="relative text-center">
332
+ <div className="text-7xl font-bold text-blue-500/20 mb-4">{item.step}</div>
333
+ <h3 className="text-2xl font-bold mb-3">{item.title}</h3>
334
+ <p className="text-gray-400">{item.desc}</p>
335
+ {index < 2 && (
336
+ <ChevronRight className="hidden md:block absolute top-12 -right-12 w-8 h-8 text-blue-500/50" />
337
+ )}
338
+ </div>
339
+ ))}
340
+ </div>
341
+ </div>
342
+ </section>
343
 
344
+ {/* CTA Section */}
345
+ <section className="py-20 px-4 sm:px-6 lg:px-8 bg-gradient-to-r from-gray-900/50 to-blue-700/50">
346
+ <div className="max-w-4xl mx-auto text-center">
347
+ <h2 className="text-4xl sm:text-5xl font-bold mb-6">
348
+ Ready to Ace Your Interview?
349
+ </h2>
350
+ <p className="text-xl text-gray-300 mb-10">
351
+ Join thousands of successful candidates who prepared with InterviewAI
352
+ </p>
353
+ <button
354
+ onClick={openSignUpModal}
355
+ className="px-10 py-5 rounded-lg bg-gradient-to-r from-blue-400 to-blue-700 hover:from-blue-600 hover:to-blue-900 transition shadow-lg shadow-blue-500/50 text-lg font-semibold"
356
+ >
357
+ Start Your Free Trial Today
358
+ </button>
359
+ </div>
360
+ </section>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
 
362
+ {/* Footer */}
363
+ <footer className="py-12 px-4 sm:px-6 lg:px-8 bg-black">
364
+ <div className="max-w-7xl mx-auto text-center text-gray-400">
365
+ <div className="flex items-center justify-center space-x-2 mb-4">
366
+ <Sparkles className="w-6 h-6 text-blue-400" />
367
+ <span className="text-xl font-bold text-white">InterviewAI</span>
368
+ </div>
369
+ <p>&copy; 2025 InterviewAI. All rights reserved.</p>
370
+ </div>
371
+ </footer>
372
+ </div>
373
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  };
375
 
376
  export default AIInterviewPlatform;
Frontend/src/pages/note.tsx ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from "react";
2
+
3
+ const Notes: React.FC = () => {
4
+ return (
5
+ <div>
6
+ <h2 className="text-3xl font-bold mb-4">My Notes</h2>
7
+ <p className="text-gray-600">Save and organize your interview preparation notes.</p>
8
+ </div>
9
+ );
10
+ };
11
+
12
+ export default Notes;
Frontend/src/pages/quize.tsx ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from "react";
2
+
3
+ const ResumeGeneratedQuize: React.FC = () => {
4
+ return (
5
+ <div>
6
+ <h2 className="text-3xl font-bold mb-4">AI Generated Quiz</h2>
7
+ <p className="text-gray-600">
8
+ Create intelligent quizzes using AI-generated questions based on your learning progress.
9
+ </p>
10
+ <h2 className="text-3xl font-bold mb-4">Resume-Based Quiz</h2>
11
+ <p className="text-gray-600">Generate quizzes automatically based on your uploaded resume.</p>
12
+ <h2 className="text-3xl font-bold mb-4">PDF-Based Quiz</h2>
13
+ <p className="text-gray-600">
14
+ Generate quizzes from your uploaded PDF documents to test topic understanding.
15
+ </p>
16
+ </div>
17
+ );
18
+ };
19
+
20
+ export default ResumeGeneratedQuize;
Frontend/tailwind.config.cjs CHANGED
@@ -4,7 +4,23 @@ module.exports = {
4
  "./src/**/*.{js,jsx,ts,tsx}",
5
  ],
6
  theme: {
7
- extend: {},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  },
9
  plugins: [],
10
  }
 
4
  "./src/**/*.{js,jsx,ts,tsx}",
5
  ],
6
  theme: {
7
+ extend: {
8
+ animation: {
9
+ spotlight: "spotlight 2s ease .75s 1 forwards",
10
+ },
11
+ keyframes: {
12
+ spotlight: {
13
+ "0%": {
14
+ opacity: 0,
15
+ transform: "translate(-72%, -62%) scale(0.5)",
16
+ },
17
+ "100%": {
18
+ opacity: 1,
19
+ transform: "translate(-50%,-40%) scale(1)",
20
+ },
21
+ },
22
+ },
23
+ },
24
  },
25
  plugins: [],
26
  }
Frontend/tsconfig.json CHANGED
@@ -3,5 +3,11 @@
3
  "references": [
4
  { "path": "./tsconfig.app.json" },
5
  { "path": "./tsconfig.node.json" }
6
- ]
7
- }
 
 
 
 
 
 
 
3
  "references": [
4
  { "path": "./tsconfig.app.json" },
5
  { "path": "./tsconfig.node.json" }
6
+ ],
7
+ "compilerOptions": {
8
+ "baseUrl": ".",
9
+ "paths": {
10
+ "@/*": ["./src/*"]
11
+ }
12
+ }
13
+ }
Frontend/vite.config.ts CHANGED
@@ -1,11 +1,25 @@
1
  import { defineConfig } from 'vite'
2
  import tailwindcss from '@tailwindcss/vite'
3
  import react from '@vitejs/plugin-react'
 
 
4
 
5
- // https://vite.dev/config/
 
 
 
 
6
  export default defineConfig({
7
  plugins: [
8
  react(),
9
  tailwindcss()
10
  ],
11
- })
 
 
 
 
 
 
 
 
 
1
  import { defineConfig } from 'vite'
2
  import tailwindcss from '@tailwindcss/vite'
3
  import react from '@vitejs/plugin-react'
4
+ import { fileURLToPath } from 'url'; // Required for path resolution
5
+ import path from 'path'; // Required for path resolution
6
 
7
+ // Define the root directory helper function
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+
11
+ // https://vitejs.dev/config/
12
  export default defineConfig({
13
  plugins: [
14
  react(),
15
  tailwindcss()
16
  ],
17
+ // Explicitly configure path aliases for Vite's module resolution
18
+ // This resolves the "Cannot find module '@/lib/utils'" error during runtime
19
+ resolve: {
20
+ alias: {
21
+ // Maps the '@/...' import path to the absolute path of the './src' directory
22
+ '@': path.resolve(__dirname, './src'),
23
+ },
24
+ },
25
+ })