Files
gruperly/README.md
Jose Selesan 6246bf2341 refactor: migrate monorepo from pnpm to Bun runtime and workspaces
- root: bun workspaces via package.json, packageManager bun@1.4.0, scripts use bun --filter
- backend: Bun.serve, bun test (vitest removed), bun --watch dev script, tsconfig types bun
- tests: migrate 6 test files from vitest to bun:test (mock.module)
- validate: replace @hono/zod-validator with hono validator + zod safeParse (fixes TS2589)
- lockfile: bunfig.toml saveTextLockfile, regenerated bun.lock (text) for turbo
- docs: AGENTS.md, README.md, stack.md updated to Bun stack
2026-09-14 10:58:56 -03:00

1.5 KiB

Gruperly

Monorepo de Gruperly. Consulta stack.md para arquitectura y especificaciones.

Stack

  • Package manager: Bun 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

apps/
  backend/  # Backend (Bun + Hono + Prisma)
  web/      # Frontend (React PWA)
packages/
  shared/   # Esquemas Zod y tipos compartidos
  config/   # tsconfig base compartido

Comandos

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).