| Herramienta | Versión mínima | Verificar con |
|---|---|---|
| Node.js | 22.0.0 LTS (Vercel default) | node --version |
| pnpm | 9.0+ | pnpm --version |
| Git | 2.40+ | git --version |
| PowerShell o Bash | 5.1+ / 5.0+ | — |
| Servicio | Para qué | Plan |
|---|---|---|
| GitHub | Repositorio + webhooks de deploy | Free |
| Vercel | Hosting web + CI/CD + dominios | Pro recomendado |
| Supabase | Postgres + Auth + Storage | Pro (backups diarios) |
| Resend | Emails transaccionales | Free (10k emails/mes) |
| Wompi (Bancolombia) | Pagos: Nequi, PSE, tarjeta | Merchant CO |
| Expo (EAS) | Build APK/IPA del mobile | Free / Production |
| Porkbun | Registro del dominio plazi.co | — |
github.com/SebasInvent/plazi es privado. Sebastián M. (CTO) gestiona los accesos vía gh auth.
git clone https://github.com/SebasInvent/plazi.git
cd plazi
pnpm install
Instala todas las deps de apps/web, apps/mobile, apps/api y los 4 packages internos en un solo paso.
cp apps/web/.env.example apps/web/.env.local
cp apps/mobile/.env.example apps/mobile/.env.local
Llená cada variable según la siguiente sección.
Abrí Supabase Studio → SQL Editor y corré, en orden, todos los archivos de supabase/migrations/:
20260516120000_init.sql20260516120100_seed_catalog.sql20260520010000_seed_demo_products.sql20260520195000_order_status_enum_values.sql20260520200000_reviews_coupons_cancellations.sql20260606130000_wishlists_notifications.sql# Sitio web (puerto 3000)
pnpm --filter @plazi/web dev
# Mobile (Expo Dev Server)
pnpm --filter @plazi/mobile dev
# apps/web/.env.local
NEXT_PUBLIC_SUPABASE_URL=https://<project>.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ... # pública por diseño · RLS protege
SUPABASE_SERVICE_ROLE_KEY=eyJ... # SECRETA · solo server-side
# apps/mobile/.env.local
EXPO_PUBLIC_SUPABASE_URL=https://<project>.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJ...
EXPO_PUBLIC_API_BASE_URL=https://plazi.co
EXPO_PUBLIC_SITE_URL=https://plazi.co
# apps/web/.env.local
WOMPI_PUBLIC_KEY=pub_test_xxx # sandbox o producción
WOMPI_PRIVATE_KEY=prv_test_xxx
WOMPI_EVENTS_SECRET=xxx # para validar webhooks
NEXT_PUBLIC_WOMPI_PUBLIC_KEY=pub_test_xxx
RESEND_API_KEY=re_xxx
RESEND_FROM=Plazi <hola@plazi.co>
# apps/web/.env.local
BEEGO_ADMIN_SECRET=xxx # auth header en /api/push/notify
# apps/mobile/.env.local
EXPO_PUBLIC_EAS_PROJECT_ID=00000000-0000-0000-0000-000000000000
# Lo genera `eas init`. Pegarlo también en app.json:expo.extra.eas.projectId
NEXT_PUBLIC_SUPPORT_WHATSAPP=573001234567 # número real de soporte
.env.local. Ya están en .gitignore. Para producción, cargar las variables en Vercel Dashboard → Settings → Environment Variables.
SebasInvent/plazi en vercel.com → Add New → Projectcd ../.. && pnpm turbo build --filter=@plazi/webapps/web/.nextgit push origin master dispara un deploy automáticonpm i -g vercel
cd plazi
vercel --prod
plazi.co# Health check
curl https://plazi.co/
# Endpoint público (debe devolver JSON con productos)
curl https://plazi.co/api/products?limit=5
# Verificación de build status
gh run list --limit 1 --repo SebasInvent/plazi
npm install -g eas-cli
cd apps/mobile
eas login # usa tu cuenta expo.dev
eas init # genera projectId real y lo escribe en app.json
eas env:create --environment preview --name EXPO_PUBLIC_SUPABASE_URL --type string --visibility plaintext
eas env:create --environment preview --name EXPO_PUBLIC_SUPABASE_ANON_KEY --type string --visibility plaintext
eas build --platform android --profile preview
Sube el código a la nube de Expo, compila (~10-15 min) y entrega un link descargable al APK. Ese link se distribuye por WhatsApp a los 5-10 comerciantes piloto del Centro Comercial Lo Nuestro.
Para parches de JS/JSX/TS sin tocar capa nativa:
eas update --branch preview --message "fix: corregir estado vacío pedidos"
Los usuarios reciben el update al abrir la app la próxima vez. No hay que reinstalar.
| Problema | Solución |
|---|---|
eas build falla por assets | Verificar que apps/mobile/assets/icon.png, splash.png y adaptive-icon.png existen |
| Push no llegan en Expo Go | Expo Go solo soporta push limitado. Usar APK preview |
| Cámara devuelve "permission-denied" | Settings del device → Plazi → Permitir cámara |
| Build pide keystore Android | Aceptar opción default "Generate new keystore" |
| Migración SQL falla por dependencias | Aplicar en orden cronológico estricto |
sebastian@inventagency.co/equipo/api-guide.html/equipo/plazi-tests-package.zipgithub.com/SebasInvent/plazi