+
+
Dashboard
+
+ {data?.currentUser ? `Welcome back, ${data.currentUser.full_name || data.currentUser.email}!` : 'Welcome back!'} Here's what's happening with your application.
+
+
+
+ {/* Stats Cards */}
+
+ {/* Total Users */}
+
+
+
+ Total Users
+
+
+
+ {loading ? (
+
+ ) : (
+
+ {data?.users.length || 0}
+
+ )}
+
+ Registered users
+
+
+
+
+
+ {/* Total Items */}
+
+
+
+ Total Items
+
+
+
+ {loading ? (
+
+ ) : (
+
+ {data?.items.length || 0}
+
+ )}
+
+ Items in database
+
+
+
+
+
+ {/* Active User */}
+
+
+
+ Current User
+
+
+
+ {loading ? (
+
+ ) : (
+
+ {data?.currentUser?.full_name || data?.currentUser?.email || 'Unknown'}
+
+ )}
+
+ Logged in user
+
+
+
+
+
+ {/* System Health */}
+
+
+
+ System Health
+
+
+
+ {loading ? (
+
+ ) : (
+
+ {data?.systemHealth ? (
+
+ ) : (
+
+ )}
+
+ {data?.systemHealth ? 'Healthy' : 'Issues'}
+
+
+ )}
+
+ API status
+
+
+
+
+
+
+ {/* Recent Activity and System Status */}
+
+ {/* Recent Users */}
+
+
+
+
+
+ Recent Users
+
+
+
+ {loading ? (
+
+ {[...Array(3)].map((_, i) => (
+
+ ))}
+
+ ) : data?.users.length ? (
+
+ {data.users.slice(0, 5).map((user, index) => (
+
+
+
+ {(user.full_name || user.email).charAt(0).toUpperCase()}
+
+
+
+
+ {user.full_name || user.email}
+
+
+ {user.email}
+
+
+
+ {user.is_active ? "Active" : "Inactive"}
+
+
+ ))}
+ {data.users.length === 0 && (
+
+ No users found
+
+ )}
+
+ ) : (
+
+ No users found
+
+ )}
+
+
+
+
+ {/* Recent Items */}
+
+
+
+
+
+ Recent Items
+
+
+
+ {loading ? (
+
+ {[...Array(3)].map((_, i) => (
+
+ ))}
+
+ ) : data?.items.length ? (
+
+ {data.items.slice(0, 5).map((item, index) => (
+
+
+
+
+ {item.title}
+
+
+ {item.description || 'No description'}
+
+
+
+ ID: {item.id}
+
+
+ ))}
+ {data.items.length === 0 && (
+
+ No items found
+
+ )}
+
+ ) : (
+
+ No items found
+
+ )}
+
+
+
+
+
+ {/* System Status */}
+
+
+
+
+
+ System Status
+
+
+
+ {loading ? (
+
+ {[...Array(3)].map((_, i) => (
+
+ ))}
+
+ ) : (
+
+
+
+ {data?.systemHealth ? (
+
+ ) : (
+
+ )}
+
API Server
+
+
+
+ {data?.systemHealth ? 'Online' : 'Offline'}
+
+
+ {data?.systemHealth ? 'Responding' : 'Not responding'}
+
+
+
+
+
+
+
+
+
+
Complete
+
+ {data?.users.length || 0} users, {data?.items.length || 0} items
+
+
+
+
+ )}
+
+
+
+
+ )
+}
diff --git a/frontend-nextjs/src/app/dashboard/settings/page.tsx b/frontend-nextjs/src/app/dashboard/settings/page.tsx
new file mode 100644
index 0000000000..cb727ad0b6
--- /dev/null
+++ b/frontend-nextjs/src/app/dashboard/settings/page.tsx
@@ -0,0 +1,184 @@
+"use client"
+
+import { useState } from "react"
+import { motion } from "framer-motion"
+import { Button } from "@/components/ui/button"
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
+import { Input } from "@/components/ui/input"
+import { Label } from "@/components/ui/label"
+import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
+import { Switch } from "@/components/ui/switch"
+import { useToast } from "@/hooks/use-toast"
+
+export default function SettingsPage() {
+ const [fullName, setFullName] = useState("Admin")
+ const [email, setEmail] = useState("admin@example.com")
+ const [currentPassword, setCurrentPassword] = useState("")
+ const [newPassword, setNewPassword] = useState("")
+ const [confirmPassword, setConfirmPassword] = useState("")
+ const [darkMode, setDarkMode] = useState(false)
+ const [notifications, setNotifications] = useState(true)
+ const { toast } = useToast()
+
+ const handleSaveProfile = () => {
+ toast({
+ title: "Profile updated",
+ description: "Your profile has been successfully updated.",
+ })
+ }
+
+ const handleSavePassword = () => {
+ if (newPassword !== confirmPassword) {
+ toast({
+ title: "Error",
+ description: "New passwords do not match.",
+ variant: "destructive",
+ })
+ return
+ }
+ toast({
+ title: "Password updated",
+ description: "Your password has been successfully updated.",
+ })
+ }
+
+ const handleSaveAppearance = () => {
+ toast({
+ title: "Appearance updated",
+ description: "Your appearance preferences have been saved.",
+ })
+ }
+
+ return (
+