feat: initialize monorepo structure with Bun and Turborepo

- Add package.json for the root with workspace configuration and scripts
- Create @gruperly/config package with TypeScript configuration
- Establish shared package @gruperly/shared with Zod schemas for validation
- Implement group, student, and payment schemas using Zod
- Set up TypeScript configuration for shared package
- Document stack architecture and technical specifications in stack.md
- Configure Turborepo with build, dev, lint, and typecheck tasks
This commit is contained in:
Jose Selesan
2026-08-28 17:03:53 -03:00
parent 52b3074631
commit ed8d280995
50 changed files with 1660 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
import { Link, useLocation } from '@tanstack/react-router'
import { cn } from '../../lib/utils'
import { NAV_ITEMS } from './nav-items'
export function BottomNav() {
const location = useLocation()
return (
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-border bg-white/95 backdrop-blur lg:hidden">
<div className="mx-auto grid max-w-md grid-cols-4">
{NAV_ITEMS.map(({ label, to, icon: Icon }) => {
const isActive = location.pathname === to
return (
<Link
key={to}
to={to}
className={cn(
'flex flex-col items-center gap-0.5 py-2.5 text-[11px] font-medium transition-colors',
isActive ? 'text-accent' : 'text-foreground/50 hover:text-primary',
)}
>
<Icon
className={cn('size-6', isActive && 'fill-accent/15 stroke-accent')}
strokeWidth={isActive ? 2.2 : 2}
/>
{label}
</Link>
)
})}
</div>
</nav>
)
}

View File

@@ -0,0 +1,44 @@
import { Outlet } from '@tanstack/react-router'
import { Bell } from 'lucide-react'
import { Logo, LogoIcon } from '../brand'
import { Avatar, Button } from '../ui'
import { Sidebar } from './Sidebar'
import { BottomNav } from './BottomNav'
export function RootLayout() {
return (
<div className="mx-auto flex min-h-dvh w-full max-w-6xl gap-6 lg:px-6">
<Sidebar />
<div className="flex min-h-dvh w-full flex-col lg:min-w-0">
<header className="sticky top-0 z-30 border-b border-border bg-background/90 backdrop-blur">
<div className="mx-auto flex h-14 w-full max-w-md items-center justify-between px-4 lg:max-w-none lg:px-0">
<a
href="/"
className="flex items-center gap-2 lg:hidden"
aria-label="Gruperly inicio"
>
<LogoIcon className="size-8" />
<Logo className="text-lg tracking-tight" />
</a>
<div className="ml-auto flex items-center gap-1 lg:ml-0">
<Button size="icon" variant="ghost" aria-label="Notificaciones" className="relative">
<Bell className="size-5" />
<span className="absolute right-1.5 top-1.5 size-2 rounded-full bg-accent" />
</Button>
<Button size="icon" variant="ghost" aria-label="Perfil">
<Avatar name="Gruperly User" />
</Button>
</div>
</div>
</header>
<main className="mx-auto w-full max-w-md flex-1 px-4 pb-24 pt-4 lg:max-w-none lg:px-0 lg:pb-8 lg:pt-6">
<Outlet />
</main>
<BottomNav />
</div>
</div>
)
}

View File

@@ -0,0 +1,38 @@
import { Link, useLocation } from '@tanstack/react-router'
import { cn } from '../../lib/utils'
import { Logo, LogoIcon } from '../brand'
import { NAV_ITEMS } from './nav-items'
export function Sidebar() {
const location = useLocation()
return (
<aside className="sticky top-0 hidden h-dvh w-60 shrink-0 flex-col border-r border-border bg-white px-4 py-6 lg:flex">
<a href="/" className="mb-8 flex items-center gap-2 px-1" aria-label="Gruperly inicio">
<LogoIcon className="size-8" />
<Logo className="text-lg tracking-tight" />
</a>
<nav className="flex flex-col gap-1">
{NAV_ITEMS.map(({ label, to, icon: Icon }) => {
const isActive = location.pathname === to
return (
<Link
key={to}
to={to}
className={cn(
'flex items-center gap-3 rounded-xl px-3 py-2.5 text-sm font-medium transition-colors',
isActive
? 'bg-accent-soft text-accent'
: 'text-foreground/60 hover:bg-primary-soft hover:text-primary',
)}
>
<Icon className="size-5" strokeWidth={isActive ? 2.2 : 2} />
{label}
</Link>
)
})}
</nav>
</aside>
)
}

View File

@@ -0,0 +1,4 @@
export { RootLayout } from './RootLayout'
export { Sidebar } from './Sidebar'
export { BottomNav } from './BottomNav'
export { NAV_ITEMS, type NavItem } from './nav-items'

View File

@@ -0,0 +1,14 @@
import { Home, Users, Wallet, Settings, type LucideIcon } from 'lucide-react'
export type NavItem = {
label: string
to: string
icon: LucideIcon
}
export const NAV_ITEMS: NavItem[] = [
{ label: 'Inicio', to: '/', icon: Home },
{ label: 'Grupos', to: '/groups', icon: Users },
{ label: 'Cobros', to: '/payments', icon: Wallet },
{ label: 'Ajustes', to: '/settings', icon: Settings },
]