Back to templates

Template details

Turbo Hybrid Astro on Vercel

Astro 2.0 / turbo monorepo project template featuring hybrid rendering (SSG + SSR). Configured to deploy on Vercel.

About this template

Turbo Hybrid Astro on Vercel is an Astro 2.0 boilerplate template that uses Astro's hybrid output to combine static site generation (SSG) and server-side rendering (SSR) in one project, with Turborepo handling the monorepo and Vercel as the deployment target.

What is Turbo Hybrid Astro on Vercel?

Turbo Hybrid Astro on Vercel is a public GitHub repository template that scaffolds an Astro 2.0 project with hybrid rendering enabled. It takes application code, pages, and API routes as input and produces a deployable Vercel project that supports both static pages and serverless or edge functions. The template includes a Turborepo setup with apps/server as the primary Astro deployment target, and it has been starred 55 times on GitHub.

Key Features

  • Hybrid rendering with Astro 2.0 — Uses the new hybrid output mode to decide per-page whether to render statically or on the server, all within a single Astro app.
  • Turborepo monorepo management — Orchestrates apps and packages with Turborepo, enabling local and remote build caching plus shared eslint, prettier, and tsconfig bases.
  • Vercel-first deployment — Contains a vercel.json inside apps/server that forces turbo builds; you deploy by setting the root directory to apps/server.
  • Pre-configured integrations — Ships with @vercel/analytics, preact, astrojs-service-worker, @astrojs/image, astro-robots-txt, astro-sitemap, and astro-webmanifest already wired in.
  • Image optimization with sharp — Includes the sharp package pre-configured for local image processing; the README also gives a brew/vips troubleshooting workaround if sharp fails to install.
  • Shared package structure — Reusable Astro components, layouts, and Preact components live in packages/*, alongside centralized tsconfig, prettier, and eslint configs.
  • Measured build performance — The project reports a 40-second no-cache build and a 6-second cached full-turbo build on Vercel, and a 3.79-second full build locally on a 2021 Apple M1 Max.

Who should use Turbo Hybrid Astro on Vercel?

  • Astro developers who need both SSG and SSR — They can create static content pages and dynamic, server-rendered routes or APIs without maintaining separate projects.
  • Teams working in a monorepo — The layout separates apps and packages so multiple applications can reuse components and configuration through Turborepo.
  • Developers deploying to Vercel — Those who want serverless/edge functions and remote caching can follow the documented deploy steps (set root directory to apps/server) and get a working pipeline.
  • Prototypers wanting a batteries-included stack — Pre-installed analytics, sitemap, robots, manifest, service worker, and Preact support reduce setup time.

What can you do with this template?

  • Build a hybrid marketing site: Combine fast static landing pages with dynamic SSR pages such as dashboards or personalized views.
  • Expose API microservices: Add serverless or edge API routes within the Astro app and deploy them to Vercel alongside the site.
  • Share components across apps: Use packages/astro-components and packages/preact-components to keep the UI consistent across multiple apps in the monorepo.
  • Take advantage of remote caching: With Turborepo remote caching enabled, CI/CD builds can reuse cached artifacts, dropping the build time from 40 seconds to 6 seconds when nothing changed.

screenshot of Turbo Hybrid Astro on Vercel on template0.com