chore: scaffold turbo monorepo with hono api and react admin web

This commit is contained in:
Jose Selesan
2026-10-15 15:24:34 -03:00
commit 2b1d2152c4
89 changed files with 4996 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
import { Link, useRouterState } from '@tanstack/react-router'
import { LayoutDashboardIcon, ListTodoIcon, SettingsIcon } from 'lucide-react'
import type { LucideIcon } from 'lucide-react'
import { NavUser } from '@/components/layout/nav-user'
import {
Sidebar,
SidebarContent,
SidebarFooter,
SidebarGroup,
SidebarGroupLabel,
SidebarHeader,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
SidebarRail,
} from '@/components/ui/sidebar'
type NavItem = {
title: string
to: string
icon: LucideIcon
}
const NAV_ITEMS: NavItem[] = [
{ title: 'Dashboard', to: '/', icon: LayoutDashboardIcon },
{ title: 'Tasks', to: '/tasks', icon: ListTodoIcon },
{ title: 'Settings', to: '/settings', icon: SettingsIcon },
]
export function AppSidebar() {
const pathname = useRouterState({ select: (state) => state.location.pathname })
return (
<Sidebar collapsible="icon">
<SidebarHeader>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton size="lg" asChild>
<Link to="/">
<div className="bg-primary text-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg text-sm font-semibold">
SL
</div>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-medium">Superlist</span>
<span className="text-muted-foreground truncate text-xs">Admin</span>
</div>
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarHeader>
<SidebarContent>
<SidebarGroup>
<SidebarGroupLabel>Platform</SidebarGroupLabel>
<SidebarMenu>
{NAV_ITEMS.map((item) => (
<SidebarMenuItem key={item.to}>
<SidebarMenuButton asChild isActive={pathname === item.to} tooltip={item.title}>
<Link to={item.to}>
<item.icon />
<span>{item.title}</span>
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroup>
</SidebarContent>
<SidebarFooter>
<NavUser />
</SidebarFooter>
<SidebarRail />
</Sidebar>
)
}