# Gruperly Monorepo de Gruperly. Consulta [stack.md](./stack.md) para arquitectura y especificaciones. ## Stack - Package manager: [Bun](https://bun.sh/) 1.4 - Monorepo: bun workspaces + Turborepo - Backend (`apps/backend`): Bun + Hono (`Bun.serve`) + Prisma + PostgreSQL + Better Auth - Frontend (`apps/web`): React 19 + TypeScript + TanStack Router + TanStack Query + Tailwind v4 - Shared (`packages/shared`): esquemas Zod, tipos, `Result` y Problem Details compartidos ## Estructura ```text apps/ backend/ # Backend (Bun + Hono + Prisma) web/ # Frontend (React PWA) packages/ shared/ # Esquemas Zod y tipos compartidos config/ # tsconfig base compartido ``` ## Comandos ```bash bun install # Instala dependencias de todos los workspaces bun dev # Levanta la API (4000) y la web (6173) vía Turborepo bun run typecheck # tsc --noEmit en todos los paquetes bun run lint # biome check (backend y shared) bun --filter @gruperly/backend test # bun test (backend) bun --filter @gruperly/backend db:push # Aplica el esquema de Prisma a la base de datos bun --filter @gruperly/backend db:studio # Abre Prisma Studio ``` ## Setup de base de datos 1. Crea una base PostgreSQL y copia `apps/backend/.env.example` → `apps/backend/.env`, ajustando `DATABASE_URL`. 2. Ejecuta `bun --filter @gruperly/backend db:generate` y `bun --filter @gruperly/backend db:push` (o `bun --filter @gruperly/backend db:migrate` en desarrollo).