feat: add admin-web application with React and Vite

feat(admin-web): implement basic layout and navigation
feat(admin-web): implement dashboard page with key metrics
feat(admin-web): implement user management page
feat(admin-web): implement analytics page with user stats
feat(admin-web): implement logs explorer page
style(admin-web): add tailwind css and shadcn/ui components
build(admin-web): configure eslint and prettier for code quality

This commit introduces the admin-web application, a React-based
administration console built with Vite.

- The application provides a central interface for managing
 users, monitoring platform health, and troubleshooting issues.
- It includes a basic layout with navigation, a dashboard
 displaying key metrics, a user management page, an analytics
 page with user statistics, and a logs explorer page.
- Tailwind CSS and shadcn/ui components are used for styling.
- ESLint and Prettier are configured to ensure code quality.
This commit is contained in:
bwnyasse
2025-11-15 17:38:48 -05:00
parent edf3dc4042
commit 9db589d43f
23 changed files with 5760 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
import React from "react";
import { Link, useLocation } from "react-router-dom";
import { Building2, Users, BarChart3, Terminal, LayoutDashboard, LogOut } from "lucide-react";
const navigation = [
{ name: "Dashboard", href: "/admin-web/", icon: LayoutDashboard },
{ name: "User Management", href: "/admin-web/user-management", icon: Users },
{ name: "Analytics", href: "/admin-web/analytics", icon: BarChart3 },
{ name: "Logs Explorer", href: "/admin-web/logs", icon: Terminal },
];
export default function Layout({ children }) {
const location = useLocation();
return (
<div className="flex h-screen bg-slate-50">
{/* Sidebar */}
<div className="hidden md:flex md:flex-shrink-0">
<div className="flex flex-col w-64">
{/* Sidebar header */}
<div className="flex items-center h-16 flex-shrink-0 px-4 bg-white border-b border-slate-200">
<Building2 className="h-8 w-8 text-blue-600" />
<span className="ml-3 font-bold text-xl text-slate-800">Krow Admin</span>
</div>
{/* Sidebar content */}
<div className="flex-1 flex flex-col overflow-y-auto bg-white">
<nav className="flex-1 px-4 py-4">
{navigation.map((item) => (
<Link
key={item.name}
to={item.href}
className={`
${
location.pathname === item.href
? "bg-blue-50 text-blue-600"
: "text-slate-600 hover:bg-slate-100 hover:text-slate-900"
}
group flex items-center px-3 py-3 text-sm font-medium rounded-lg
`}
>
<item.icon
className="mr-3 h-6 w-6"
aria-hidden="true"
/>
{item.name}
</Link>
))}
</nav>
<div className="px-4 py-4 border-t border-slate-200">
<Link
to="#"
className="group flex items-center px-3 py-3 text-sm font-medium rounded-lg text-slate-600 hover:bg-slate-100 hover:text-slate-900"
>
<LogOut className="mr-3 h-6 w-6" />
Logout
</Link>
</div>
</div>
</div>
</div>
{/* Main content */}
<div className="flex flex-col w-0 flex-1 overflow-hidden">
<main className="flex-1 relative z-0 overflow-y-auto focus:outline-none">
<div className="py-8">
<div className="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
{children}
</div>
</div>
</main>
</div>
</div>
);
}