liveBook · Manning

Deployment

As explained in Build AI-Enhanced Web Apps

Deployment is the process of making an application or service available to run in an operational environment.

Deployment makes a web application available in a production environment, typically at a public URL. Shipping the application alone is not enough: production databases and external services, such as authentication and rate limiting, must also be configured for security and the expected traffic. Infrastructure, resource allocation, and load balancing affect whether the application stays available during spikes. section 9.6.1 section 1.2.1

Choose a hosting approach, then check the operational requirements against expected load:

  • Vercel offers a streamlined path for Next.js applications, with CDN integration, monitoring, and Git-based build and deployment workflows. Docker packages an application with its dependencies and configuration for consistency across environments; Docker and Kubernetes are options for more advanced deployment needs. section 9.6.1
  • For fewer than 10,000 requests per day, establish uptime and response-time monitoring, basic alerting and error tracking, HTTPS and input validation, a way to add application instances, and daily backups. section 9.6.2
  • As traffic rises, revisit performance, security, and reliability. At 10,000–100,000 requests per day, a CDN can distribute static assets and reduce latency; some hosts provide one by default. section 9.6.2

Deploy a chat application to Vercel

Configure production credentials for Google AI, Upstash Redis, and Clerk through environment variables rather than hard-coding keys. The example also restricts testing access and limits model interactions to 10 messages per user per day. After creating a Vercel account, install its CLI with `npm install -g vercel` and run `vercel` for a preview deployment. A successful deployment reports dashboard and preview URLs; use `vercel --prod` to promote it to production. If deployment fails, inspect the dashboard or `vercel logs`. section 9.6.3

// .env
GEMINI_API_KEY=<GEMINI_AI_SECRET_KEY>
UPSTASH_REDIS_REST_URL=<UPSTASH_REDIS_REST_URL>
UPSTASH_REDIS_REST_TOKEN=<UPSTASH_REDIS_REST_TOKEN>
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY>
CLERK_SECRET_KEY=<CLERK_SECRET_KEY>

The example environment-variable template identifies the Google AI, Upstash Redis, and Clerk credentials that must be configured for the deployment. section 9.6.3

How Build AI-Enhanced Web Apps covers it

How deep it goes
Provides traffic-based checks and a Vercel CLI walkthrough, while treating Docker and Kubernetes as alternatives rather than worked deployments.
Examples
Uses a chat application with Google AI, Upstash Redis, Clerk, environment variables, and Vercel preview and production deployments.
What it assumes
Assumes a working web application and access to the credentials for any external services it uses.
What you can do after
Operate/configure a Vercel deployment with production credentials, a preview release, and a traffic-appropriate readiness checklist.
How it connects
Connects deployment to scaling, load balancing, databases, authentication, rate limiting, monitoring, backups, and CI/CD.

Also explained in

Compare how 23 books explain deployment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI-Enhanced Web Apps. The section links point to the parts of the book it draws on.