Vercel Logo

What You Built

It's 5:47am and Grand Targhee just got 14 inches overnight. Your streaming chat parses "powder at Targhee" into a structured alert. The background workflow evaluates conditions across five resorts without blocking. Every skier refreshing the cached dashboard gets a page that loads in milliseconds.

What You Learned by Section

Deployment Foundations. You configured adapter-vercel, set up environment variables across three scopes, used preview deployments for safe iteration, and pinned your Node.js runtime version.

AI Gateway. You built streaming chat with streamText(), created tools with Valibot schemas for type-safe AI interactions, extracted structured data with Output.object(), and centralized your provider with usage tracking middleware.

Workflows. You built durable workflows with the Workflow SDK, ran parallel steps with independent retries, scheduled re-checks with sleep(), and classified errors as FatalError or RetryableError with exponential backoff.

Production. You configured ISR for fast cached pages, added structured logging with request IDs for observability, and set Cache-Control headers for CDN-level caching on API routes.

Keep Building

Choose a feature to add next:

  • Swap localStorage for Vercel KV or Postgres so alerts survive across devices.
  • Use Vercel Cron Jobs to start the workflow on a schedule so alerts evaluate automatically.
  • Connect triggered alert IDs to email or push notifications.
  • Add wind speed, visibility, or lift status conditions using resort APIs.

Where to Go Next

  • SvelteKit docs: Hooks, form actions, and advanced routing
  • AI SDK docs: Agents, MCP tool integration, and the Chat class from @ai-sdk/svelte
  • Workflow SDK docs: Hooks, webhooks, streaming, and the @workflow/ai agent integration
  • Vercel docs: Cron Jobs, KV storage, and Fluid compute
  • Svelte 5 runes: $state, $derived, $effect, and the reactivity model

Implement your new feature's failure path, then deploy the next iteration of the ski-alerts app.

Was this helpful?

supported.