Add JWT authentication with animated login page

- Backend: JWT auth with /api/auth/login and /api/auth/verify endpoints
- Middleware: requireAuth protects all /api routes except /api/auth
- Frontend: Animated characters login page with eye-tracking effects
- Auth state persisted in localStorage with token verification on mount
- Sidebar logout button, 401 auto-logout, 30-day token expiry
- shadcn button, input, checkbox, label components added

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 16:35:30 +05:30
parent eb6c097664
commit ed13991515
15 changed files with 1015 additions and 16 deletions

View File

@@ -15,6 +15,9 @@
"vite": "^8.0.1"
},
"dependencies": {
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@tanstack/react-query": "^5.95.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
@@ -25,7 +28,7 @@
"radix-ui": "^1.4.3",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"tailwind-merge": "^3.5.0",
"tailwind-merge": "^3.5.0",
"tailwindcss-animate": "^1.0.7"
}
}