| Camada | Tecnologia | Detalhes |
|---|
| Runtime | Cloudflare Workers | V8 isolate, edge computing, ~200 PoPs globais |
| Framework | Hono | Ultrafast web framework para Workers (TypeScript) |
| Frontend | React + Vite | SPAs por app, build otimizado |
| Language | TypeScript | Strict mode, end-to-end type safety |
| Componente | Tecnologia | Uso |
|---|
| Database | Cloudflare D1 | SQLite distribuído — users, apps, catalog, reviews |
| Realtime | Durable Objects | WebSocket para notificações (Ciclos) e sync (Optimizer) |
| Assets | Workers Assets | Static files serving (HTML, CSS, JS, imagens) |
| Componente | Tecnologia | Detalhes |
|---|
| SSO | Azure AD / Entra ID | OAuth 2.0 + OIDC, domínios restritos |
| Session | JWT | HMAC-SHA256, HttpOnly cookie, 12h TTL |
| Anti-bot | Cloudflare Turnstile | Challenge em login, guest verify, app access |
| WAF | Cloudflare WAF | OWASP CRS, bot protection |
| SSL | Cloudflare SSL | Strict mode, TLS 1.2+ |
| Serviço | Uso |
|---|
| VTEX Commerce | Catalog sync — produtos, SKUs, specs |
| AirOps | Pipeline de enriquecimento via IA (10 steps) |
| RapidAPI | Data enrichment (CNPJ, endereços) |
| Google Maps + BigQuery | Captain — geospatial features |
| Resend | Email transacional |
| Microsoft Graph | Perfil do usuário (nome, email, foto) |
graph TD
subgraph CF["Cloudflare Edge — 200+ PoPs"]
WAF["WAF / Bot<br/>Turnstile"]
SSL["SSL<br/>TLS 1.2+"]
WK["Workers<br/>Hono"]
D1["D1<br/>SQLite"]
subgraph DO["Durable Objects"]
NH["NotificationHub"]
OS["OptimizerSync"]
end
WAF --> SSL --> WK --> D1
WK --> DO
end
WK --> AZ["Azure AD<br/>SSO"]
WK --> VT["VTEX API<br/>Catalog"]
WK --> AI["AirOps<br/>AI Pipeline"]
WK --> RA["RapidAPI<br/>Enrichment"]
WK --> GM["Google Maps<br/>BigQuery"]
WK --> RS["Resend<br/>Email"]
style CF fill:#0a1628,stroke:#00aaaf,stroke-width:2px,color:#e0e6f0
style DO fill:#1a1040,stroke:#3c1469,stroke-width:1px,color:#e0e6f0
style WAF fill:#1a2744,stroke:#00aaaf,color:#e0e6f0
style SSL fill:#1a2744,stroke:#00aaaf,color:#e0e6f0
style WK fill:#00aaaf,stroke:#008a8e,color:#ffffff,stroke-width:2px
style D1 fill:#1a2744,stroke:#00aaaf,color:#e0e6f0
style NH fill:#2a1858,stroke:#3c1469,color:#e0e6f0
style OS fill:#2a1858,stroke:#3c1469,color:#e0e6f0
style AZ fill:#0078d4,stroke:#005a9e,color:#ffffff
style VT fill:#f71963,stroke:#c41450,color:#ffffff
style AI fill:#6c3baa,stroke:#4a2878,color:#ffffff
style RA fill:#0055da,stroke:#003fa0,color:#ffffff
style GM fill:#34a853,stroke:#2a8a43,color:#ffffff
style RS fill:#000000,stroke:#333333,color:#ffffff
O deploy é atômico via Cloudflare Workers:
- 3 camadas de versionamento: local (git stash), Git (commits), Wrangler (deployments)
- Rollback instantâneo:
wrangler rollback reverte em < 30 segundos
- Zero-downtime: cada deploy é uma nova versão isolada
- Sem staging: dev → prod direto (Workers isola por design)
npm run deploy # ou: npx wrangler deploy