Stack

Deployment

PoetryHub este configurat pentru deploy pe Vercel cu funcții serverless Nitro și PostgreSQL extern.

Vercel

  • Preset Nitro: vercel în nuxt.config.ts
  • Build: prisma generate && nuxt build
  • Node engines: ^20.19.0 || >=22.12.0
  • CLI helpers: npm run vercel:link, npm run env:pull:prod

Variabile de mediu

VariabilăScop
DATABASE_URLConexiune PostgreSQL
JWT_SECRETSemnare token sesiune
NUXT_PUBLIC_APP_URLURL public aplicație
NUXT_OAUTH_GOOGLE_*OAuth Google
ANTHROPIC_API_KEYEnrichment AI opțional
ADMIN_EMAIL / ADMIN_PASSWORDSeed admin inițial

CI (GitHub Actions)

Workflow .github/workflows/ci.yml:

  1. npm test — Vitest (unit, API, component)
  2. npm run test:e2e — Playwright cu Postgres de test
  3. Verificare tokeni legacy CSS (check:legacy-tokens)

Cache & performanță

  • Assets /_nuxt/** — cache immutable 1 an
  • API publice — defineCachedEventHandler cu invalidare pe tag
  • Home payload agregat în server/utils/homePagePayload.ts

Storybook (static)

npm run build-storybook   # Output: storybook-static/

Poate fi hostat separat sau ca preview static; nu face parte din deploy-ul principal Nuxt.