Skip to content

Aspire Overview

Aspire streamlines building, running, and debugging distributed apps. Picture your app as a set of services, databases, and frontends—all working together seamlessly. With Aspire, you get a unified toolchain that eliminates complex configs and makes local debugging effortless. Instantly launch and debug your entire app with a single F5 F5 F5 . Ready to deploy? Aspire lets you publish anywhere—Kubernetes, the cloud, or your own servers. It’s also fully extensible, so you can integrate your favorite tools and services with ease.

Aspire’s AppHost lets you define your app’s services and dependencies in code—no complex configs required. Easily map out your architecture and let Aspire handle the local orchestration, so you can focus on building features.

A simple example might represent a common three-tier architecture with a frontend that depends on an API, which in turn connects to a database:

FrontendAPI ServicePostgres

This could be represented in the AppHost as shown in the following code:

index.ts
import { createBuilder } from "./.modules/distributed-application";
const builder = createBuilder();
// Add database service to orbit
const postgres = builder.addPostgres("db").addDatabase("appdata");
// Add API service and reference the database
const api = builder.addProject("api", "../api/ApiService")
.withReference(postgres);
// Add frontend service and reference the API
const frontend = builder.addNpmApp("frontend", "../frontend")
.withHttpEndpoint({ env: "PORT", targetPort: 3000 })
.withNpmPackageInstallation()
.withReference(api);
builder.build().run();

Regardless of the language you choose, Aspire provides a consistent way to define your app’s architecture. You can easily add services, set up dependencies, and configure how they interact—all in a straightforward, code-first manner.

Aspire makes it easy to define everything your app needs—frontends, APIs, databases, and more—using a unified AppHost model. Just describe your resources in code, and Aspire handles the connections for you. Resources can include:

  • AI Services
  • Caches
  • Containers
  • Databases
  • Executables
  • Frameworks
  • Messaging Services
  • Projects
  • Storage

One resource can depend on another, and Aspire automatically wires them together. This means you can focus on building your app without worrying about the underlying infrastructure.

When you compose your distributed app in Aspire’s AppHost, you’re not just defining services for local development and orchestration—you’re also setting up the foundation for deployment. The same composition you use to run and debug locally is leveraged when you publish your app, ensuring consistency from development through to production. Likewise, Aspire doesn’t get in the way of your existing deployment workflows.

Ask & Answer Collaborate Community Discuss Watch