Platform Docs · Engineering
Deployment Architecture
Infrastructure topology, environment separation, release policy, and data refresh schedule for the Entrestate platform.
01
Environment Separation
Production
Preview / Staging
Development
02
Infrastructure Stack
| Layer | Component | Notes |
|---|---|---|
Compute | Next.js 15 (App Router) | Server components, streaming RSC, edge runtime for API routes |
Hosting | Vercel | Global edge CDN, instant rollback, PR preview deployments, ISR |
Database | Neon (PostgreSQL 16) | Serverless Postgres with branching; Prisma ORM for schema + queries |
Auth | Clerk | Managed auth, JWT session tokens, role-based access (free/pro/enterprise) |
AI / LLM | Anthropic Claude + AI SDK | claude-sonnet-4-6 for decision copilot; streaming via Vercel AI SDK |
Storage | Vercel Blob / Neon JSONB | Report artifacts in Blob; evidence payloads in Neon JSONB columns |
03
Release Policy & Rollback
Feature branch
Developer opens PR against main. Vercel creates an isolated preview deployment with a Neon DB branch.
Preview review
Stakeholder verifies the preview URL. Automated build checks (type-check, lint) must pass before merge is unblocked.
Merge to main
PR is squash-merged. Vercel triggers a production build. Zero-downtime deployment with atomic swap.
Smoke check
Post-deploy smoke script hits /api/health, /api/market-pulse, and /api/copilot/sessions to verify live service integrity.
Rollback (if needed)
Vercel dashboard: one-click 'Promote to production' on the previous deployment. RTO < 60 seconds.
Rollback policy
Vercel preserves the last 10 production deployments. Any can be instantly promoted back. Database schema rollbacks require Prisma migration down-steps — run before promoting if schema changed. Target RTO: <60 seconds for compute. RPO: zero (Neon PITR to any point within 30 days).
04
Data Refresh Schedule
Pipeline cadence
Daily (off-peak UAE, ~02:00 GST)
L1 Canonical refresh
Weekly batch + triggered on RERA/DLD delta
L3 Dynamic signals
Hourly recalculation (BUY/HOLD/WAIT timing)
Market pulse
Realtime query at request time (force-dynamic)
Report artifacts
Immutable once generated; re-generated on demand
AI session history
Persisted per-user in Neon on every completion
05
Health Check Endpoints
GET /api/healthBasic liveness probe — returns 200 OK when compute is healthy
LivenessGET /api/market-pulseVerifies database connectivity and data freshness
ReadinessGET /api/copilot/sessionsAuth + DB read path — confirms Clerk + Neon integration
ReadinessGET /propertiesFull render path including decision-infrastructure query
Smoke