2.2 KiB
2.2 KiB
Admin Dashboard — Vercel Deployment Roadmap
App:
@bytelyst/admin-webRepo:learning_ai_common_plat→dashboards/admin-web/Status: ✅ Ready
Current State
- Framework: Next.js 16.1.6, React 19.2.3, TailwindCSS v4, shadcn/ui
- Output: Vercel-aware (
process.env.VERCEL ? {} : { output: 'standalone' }) - Dependencies: 13
@bytelyst/*packages viaworkspace:*(monorepo — Vercel resolves automatically) - Build:
next build --webpack - Server-side: Azure Cosmos DB, AKV, JWT, bcryptjs
- No
file:references — all deps are workspace or npm
Deployment Steps
Step 1: Create Vercel Project (~5 min)
- Connect
learning_ai_common_platrepo to Vercel - Set Root Directory to
dashboards/admin-web - Framework preset: Next.js
- Build command:
pnpm build(auto-detected) - Output directory:
.next(auto-detected)
Step 2: Configure Environment Variables (~10 min)
COSMOS_ENDPOINT— Azure Cosmos DB endpointCOSMOS_KEY— Azure Cosmos DB keyJWT_SECRET— JWT signing secretSEED_SECRET— Seed endpoint secretAZURE_KEYVAULT_URL— Azure Key Vault URL (optional — for AKV secret resolution)NODE_ENV=production
Step 3: Verify Build (~5 min)
- Trigger first deploy
- Verify security headers are applied (CSP, HSTS, X-Frame-Options)
- Test login flow with JWT auth
- Verify Cosmos DB connectivity from Vercel serverless functions
Step 4: Domain Configuration (~5 min)
- Add custom domain (e.g.,
admin.bytelyst.com) - Verify SSL certificate auto-provisioning
Risks & Notes
- Cosmos DB latency: Vercel serverless functions run in specific regions. Ensure Cosmos DB region matches Vercel deployment region (recommend
iad1for eastus). - Cold starts: Server-side pages that hit Cosmos will have cold start latency (~1-2s). Consider ISR for static-friendly pages.
- CSP headers: Current CSP allows
connect-srcto*.documents.azure.com— correct for Cosmos. - Webpack flag: Build uses
--webpack— Vercel respects this via the build command override.