← Volver al portal
01 / 14
PresentaciΓ³n TΓ©cnica Β· jun 2026

Plazi

Stack, arquitectura, modelo de datos y operaciΓ³n. Para CTOs e integradores.

github.com/SebasInvent/plazi
02 / 14
Stack frontend

Web + Mobile compartiendo design system.

Web

Next.js 15

App Router Β· React 19 Β· RSC

Mobile

Expo SDK 52

React Native 0.76 Β· Expo Router 4

Design

Tamagui 1.112

Tokens compartidos web↔mobile

Estado

TanStack Query v5

Cache + mutations Β· React 19 compatible

ValidaciΓ³n

Zod 3.23

Schemas compartidos con backend

Fonts

Sora + Instrument Serif + JetBrains Mono

Google Fonts
03 / 14
Stack backend

Supabase + Vercel Fluid Compute. Sin servidores que mantener.

BD

Postgres (Supabase)

13 tablas Β· RLS Β· ES256 JWT

API

Next.js Route Handlers

22 endpoints Β· Bearer JWT

Auth

Supabase Auth

OTP correo Β· sesiones cookie/JWT

Storage

Supabase Storage

Bucket product-images Β· RLS upload

Pagos

Wompi

Nequi Β· Daviplata Β· PSE Β· tarjeta Β· contraentrega

Email

Resend

Free 10k/mes Β· DKIM/SPF

Push

Expo Push API

Server-side wrapper Β· best-effort

LogΓ­stica

Servientrega Β· Coordinadora

Configurable por seller

DevOps

Vercel Β· EAS Β· pnpm + Turborepo

Auto-deploy desde GitHub master
04 / 14
Arquitectura

Diagrama de capas end-to-end.

β”Œβ”€ Usuario ─────────────────────────────────────────────┐
β”‚  Comprador  Β·  Vendedor  Β·  Admin (en cualquier role) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β–Ό                             β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚  Mobile      β”‚               β”‚  Web + PWA   β”‚
   β”‚  Expo SDK 52 β”‚               β”‚  Next.js 15  β”‚
   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
          β”‚ Bearer JWT                    β”‚ Cookies
          β–Ό                               β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚       API REST (Next.js Route Handlers)    β”‚
   β”‚  /api/{products,orders,push,wishlist,...}  β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   Supabase Postgres  Β·  13 tablas  Β·  RLS  β”‚
   β”‚   profiles Β· sellers Β· orders Β· wishlists  β”‚
   β”‚   notifications Β· outbox_events Β· …        β”‚
   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”œβ”€β–Ί Wompi (pagos)
        β”œβ”€β–Ί Resend (emails)
        └─► Expo Push API (notifs)
05 / 14
Modelo de datos

13 tablas core con Row Level Security.

CatΓ‘logo

  • profiles Β· 1:1 auth.users
  • cities Β· CO seed
  • categories Β· 12 seed
  • sellers Β· KYC verificado
  • products Β· status + images JSONB
  • product_variants Β· precio + inventario

Transacciones

  • orders Β· status enum + snapshot
  • order_items Β· seller_id por item
  • reviews Β· UNIQUE(order_item)
  • coupons + coupon_redemptions
  • addresses Β· default ΓΊnico
  • wishlists Β· UNIQUE(user, product)
  • notifications Β· inbox + read_at
  • outbox_events Β· audit trail
06 / 14
Flujo de compra

7 pasos Β· trazables 100% en outbox_events.

[1] Buyer navega /api/products
[2] addToCart() β†’ cookie httpOnly
[3] POST /api/orders/place
    β”œβ”€β–Ί insert orders + order_items
    β”œβ”€β–Ί insert outbox_events (order.created)
    β”œβ”€β–Ί notifySellersNewOrder() β†’ push + inbox
    └─► sendOrderConfirmationEmail()
[4] Wompi procesa pago β†’ /api/wompi/webhook
[5] Seller: PATCH /orders/[number]/status
    β”œβ”€β–Ί validate transition (graph)
    β”œβ”€β–Ί insert outbox_events
    β”œβ”€β–Ί notifyBuyerOrderStatusInbox()
    β”œβ”€β–Ί notifyBuyerOrderStatus() β†’ push
    └─► sendOrderStatusEmail()
[6] Buyer recibe push + inbox
[7] delivered β†’ review habilitado
07 / 14
Auth Β· Seguridad

RLS + Bearer JWT + service role server-side.

08 / 14
API Β· 22 endpoints

REST con Bearer JWT. Documentado en /equipo/api-guide.html.

PΓΊblicos (3)
GET /api/products
GET /api/products/[slug]
GET /api/sitemap.xml

Γ“rdenes (3)
POST /api/orders/place
GET /api/orders/[number]
PATCH /api/orders/[number]/status

Productos seller (3)
POST /api/products
PATCH /api/products/[id]
DELETE /api/products/[id]
Buyer (8)
GET POST /api/wishlist
GET POST PATCH DELETE /api/addresses
GET PATCH /api/notifications

Push (3)
POST DELETE /api/push/register
POST /api/push/notify

Admin (3)
GET /api/admin/stats
GET PATCH /api/admin/sellers
GET /api/admin/orders

Otros (2)
POST /api/reviews
POST /api/coupons/validate
09 / 14
Mobile Β· features nativos

5 nativos crΓ­ticos Β· cada uno wireado end-to-end.

FeatureLibBackend wiring
Push notificationsexpo-notificationsPOST /api/push/register Β· server-side Expo Push API
CΓ‘mara + galerΓ­aexpo-image-pickerUpload directo a Supabase Storage (RLS por seller_id)
BiomΓ©tricoexpo-local-authenticationSession-lock in-memory Β· pantalla /lock
Share WhatsAppexpo-sharingDeep link whatsapp://send + fallback wa.me
OTA updateseas-cli updateCanal preview/production Β· sin App Store re-review
10 / 14
DevOps Β· CI/CD

Auto-deploy desde GitHub master. Sin pipeline custom.

git push origin master
  ↓
Vercel webhook
  ↓
pnpm install Β· turbo build --filter=@plazi/web
  ↓
Next.js build Β· Edge CDN + Fluid Compute
  ↓
Live en plazi.co (~2 min)

# Mobile (separado de Vercel)
eas build --platform android --profile preview
  ↓
EAS Cloud (~10 min)
  ↓
APK descargable desde expo.dev
11 / 14
Observabilidad

Logs Vercel + outbox_events para auditorΓ­a completa.

12 / 14
Escala

Costo objetivo: $0 a 100 sellers Β· $500 USD/mes a 10k.

TierSellersCosto infra (USD/mes)
Bootstrap0 – 100$0 (Vercel Hobby Β· Supabase Free)
MVP100 – 1.000~$45 (Vercel Pro Β· Supabase Pro)
Crecimiento1.000 – 10.000~$500 (Compute add-ons Β· Supabase Team)
Escala10.000+~$2.500 (dedicated Postgres Β· CDN paid)

Modelo serverless: el costo escala lineal con trΓ‘fico. Sin sorpresas.

13 / 14
Roadmap tΓ©cnico

Pendientes operativos y evoluciones.

Inmediato (0-30 dΓ­as, operativo)

Mediano plazo (30-90 dΓ­as, tΓ©cnico)

14 / 14

ΒΏPreguntas tΓ©cnicas?

Acceso al repo + due diligence completo bajo NDA.

CTO: SebastiΓ‘n MartΓ­nez Β· sebastian@inventagency.co

Repo: github.com/SebasInvent/plazi (privado)

Docs: plazi.co/equipo/portal-documentacion.html