aspire-samples is a free, open source monitoring & observability project written in C# and released under MIT. It has 1,191 GitHub stars, 345 forks and 112 open issues, and was last pushed 3 hours ago. On this registry it ranks #208 of 271 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available.

What is aspire-samples?

Aspire Samples is a browsable catalogue of runnable reference applications that demonstrate how to wire front-ends, APIs, containers, and databases together with Aspire, written for developers building distributed and polyglot applications who learn best from working code.

What it is

Aspire Samples is the official sample repository for Aspire, which its README describes as a developer-first toolset that streamlines integrating front-ends, APIs, containers, and databases with your apps. It lives in the .NET ecosystem, is written primarily in C#, and is organised as a catalogue of self-contained applications rather than a library or a framework. Each entry pairs workloads in one or more languages with an AppHost that models the composition and a deployment path. Scenarios are grouped into full-stack JavaScript and TypeScript, polyglot full-stack, backend integrations by language, and cloud, AI, and event-driven.

The concrete problem is orchestration. A React front-end, a FastAPI backend, PostgreSQL, and Redis normally require hand-written Compose files, connection strings, port wiring, and service discovery before anything runs. Aspire's AppHost replaces that manual glue, and these samples are worked examples of the replacement: Express and Redis behind YARP, FastAPI with PostgreSQL and pgAdmin, a Go Gin app built from a Dockerfile, RabbitMQ worker topologies, and an Azure Functions app alongside ASP.NET Core and Blazor. The repository is a reference to copy from, not a package to install.

Key capabilities

  • JavaScript, TypeScript, Python, Go, and C# workloads inside one Aspire application, with the AppHost written in C# or TypeScript (aspire-with-javascript, vite-react-fastapi, polyglot-task-queue).
  • Front-end integration for React, Vue, Angular, Vite, and Svelte, including Vite static assets served through YARP in both run and publish modes (vite-yarp-static).
  • Reverse-proxy patterns with YARP in front of Express, FastAPI, and static front-ends (node-express-redis, aspire-with-node).
  • Backend samples by language: Go with Gin and chi (container-build, golang-api), Python with FastAPI (python-fastapi-postgres), and C# APIs (vite-csharp-postgres).
  • Data and messaging wiring for Redis, PostgreSQL with pgAdmin, RabbitMQ, Qdrant, and Azure Blob, Queues, and SQL (polyglot-task-queue, rag-document-qa-svelte, image-gallery).
  • Observability through OpenTelemetry, demonstrated by the Node.js Weather Explorer, whose Express API instruments calls to the external Open-Meteo service (aspire-with-node).
  • Custom integration authoring with ATS-generated TypeScript APIs, shown by the MailDev and MailKit sample (maildev-mailkit).

Who uses it and how

  • Polyglot teams assembling one distributed app from mixed runtimes, as in the Polyglot Task Queue sample, where React and a Node API run beside Python and C# workers coordinated through RabbitMQ.
  • Front-end developers who need to see how a React, Vue, or Angular application attaches to an Aspire AppHost.
  • Python developers building API and AI workloads: FastAPI with PostgreSQL, a FastAPI OpenAI agent, and FastAPI with Qdrant behind a Svelte front-end for RAG document Q&A.
  • Teams targeting Azure, using the Azure Functions sample that integrates Azure Functions, ASP.NET Core, and Blazor, or the Image Gallery that processes uploads through Azure Blob, Queues, and SQL.

Getting started

Browse the scenarios at https://aspire.dev/reference/samples/ and run each sample from its own directory; every sample is either run only or deployed with Docker Compose, and the Azure-targeted ones publish to Azure. The README links to Aspire's own introduction at https://aspire.dev/get-started/what-is-aspire/.

How it compares

No paid products that this project replaces are named in the facts, and no comparable tool appears in the topics or README either — YARP, Aspire, and the language runtimes are components the samples use rather than alternatives to them. It stands alone in this registry as the reference sample catalogue for Aspire.

When to use it — and when not to

Use it to learn Aspire from working code; do not depend on it as a library or treat it as production scaffolding, because it is a sample catalogue with no packaged release of its own. A self-hoster must operate whatever each sample needs — Docker Compose, PostgreSQL, Redis, RabbitMQ, Qdrant, or Azure services — and nothing here manages that for you. The README is a scenario index of tables rather than prose guidance, and it defers to aspire.dev for anything beyond the sample list.

project readme (upstream, from github) — read inline

Aspire Samples

CI (main)

Samples for Aspire.

Aspire is a developer-first toolset that streamlines integrating front-ends, APIs, containers, and databases with your apps. Learn more about Aspire here.

Browse by scenario

Full-stack JavaScript / TypeScript

Sample Workload languages AppHost Deploy Description
Integrating Frontend Apps JavaScript, TypeScript C# AppHost Run only React, Vue, and Angular frontends integrated with Aspire.
Node + Redis + Vite JavaScript, TypeScript TypeScript AppHost Docker Compose Express API + React/Vite frontend + Redis behind YARP.
Node.js Weather Explorer JavaScript, TypeScript TypeScript AppHost Run only Interactive Leaflet weather map; Express + OpenTelemetry API over the Open-Meteo external service.
Vite + YARP Static Files JavaScript, TypeScript TypeScript AppHost Docker Compose Vite frontend served through YARP in run and publish modes.

Polyglot full-stack

Sample Workload languages AppHost Deploy Description
Integrating Python Apps Python, JavaScript C# AppHost Run only FastAPI backend + React frontend integrated with Aspire.
Vite + C# + PostgreSQL C#, JavaScript, TypeScript TypeScript AppHost Docker Compose React frontend + C# API + PostgreSQL in a single Aspire app.
Vite + React + FastAPI Python, JavaScript, TypeScript TypeScript AppHost Docker Compose React frontend + FastAPI backend behind YARP.
Polyglot Task Queue JavaScript, Python, C# TypeScript AppHost Docker Compose React + Node API + Python/C# workers coordinated through RabbitMQ.
RAG Document Q&A Python, JavaScript TypeScript AppHost Run only Svelte frontend + FastAPI + Qdrant + OpenAI.

Backend integrations by language

Sample Workload languages AppHost Deploy Description
Integrating a Go App Go C# AppHost Docker Compose Builds and runs a Go Gin app from a Dockerfile with Aspire.
Custom MailDev and MailKit integrations C#, TypeScript TypeScript AppHost Run only Authors custom hosting and client integrations with ATS-generated TypeScript APIs.
Go API Go TypeScript AppHost Docker Compose Go + chi API with Aspire-managed run and publish flows.
Python FastAPI + PostgreSQL Python TypeScript AppHost Docker Compose FastAPI CRUD API wired to PostgreSQL and pgAdmin.
Python OpenAI Agent Python TypeScript AppHost Docker Compose FastAPI AI agent sample with OpenAI integration.
Python Script Python TypeScript AppHost Run only Minimal Python script sample using a file-based AppHost.

Cloud / AI / event-driven

Sample Workload languages AppHost Deploy Description
Azure Functions C# C# AppHost Azure Integrates Azure Functions, ASP.NET Core, and Blazor with Aspire.
Image Gallery C#, JavaScript, TypeScript C# AppHost Azure Upload and process images with Azure Blob, Queues, SQL, and Container Apps Jobs.
Custom Metrics Visualization C# C# AppHost Run only Collects and visualizes custom metrics with Prometheus and Grafana.
Standalone Aspire dashboard C# C# AppHost Run only Runs the Aspire dashboard container against any OpenTelemetry source.

.NET + frontend and platform

Sample Workload languages AppHost Deploy Description
Aspire Shop C# C# AppHost Run only Distributed e-commerce sample app demonstrating Aspire integration.
HealthChecksUI C# C# AppHost Docker Compose Demonstrates isolated health endpoints with HealthChecksUI.
Integrating Client Apps C# C# AppHost Run only Integrates Windows Forms and WPF apps with Aspire.
Integrating Orleans C# C# AppHost Run only Distributed actor model sample built with Orleans.
Working with Database Containers C#, SQL C# AppHost Run only Initializes and uses PostgreSQL, MongoDB, and SQL Server containers.
Running EF Core Migrations C# C# AppHost Run only Runs Entity Framework Core migrations inside Aspire workflows.
Persisting Data with Volume Mounts C# C# AppHost Run only Demonstrates data persistence with containers, Azure Storage, and SQL Server.
Custom Aspire hosting resources C# C# AppHost Run only Demonstrates authoring custom hosting resources with Aspire.

eShop

eShop is a reference application implementing an eCommerce web site on a services-based architecture using Aspire.

Aspire Links

License

These samples are licensed under the MIT license.

Disclaimer

The sample applications provided in this repository are intended to illustrate individual concepts that may be beneficial in understanding the underlying technology and its potential uses. These samples may not illustrate best practices for production environments.

The code is not intended for operational deployment. Users should exercise caution and not rely on the samples as a foundation for any commercial or production use.

See the following links for more information on best practices and security considerations when hosting applications:

Contributing

We welcome contributions to this repository of samples related to official Aspire features and integrations (i.e. those pieces whose code lives in the Aspire repo and that ship from the Aspire NuGet account). It's generally a good idea to log an issue first to discuss any idea for a sample with the team before sending a pull request.

Code of conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

Using Devcontainer and Codespaces

This repository includes a devcontainer configuration to help you quickly set up a development environment using Visual Studio Code and GitHub Codespaces.

Setting up Devcontainer

  1. Install Visual Studio Code: If you haven't already, download and install Visual Studio Code.

  2. Install Dev Containers extension: Open Visual Studio Code and go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. Search for "Dev Containers" and install the extension.

  3. Clone the repository: Clone this repository to your local machine.

  4. Open the repository in Visual Studio Code: Open Visual Studio Code and use the File > Open Folder menu to open the folder where you cloned this repository.

  5. Reopen in Container: Once the repository is open, you should see a notification prompting you to reopen the folder in a container. Click the "Reopen in Container" button. If you don't see the notificatio

readme truncated — read the full docs on github

Frequently asked questions

Is aspire-samples free to use?

aspire-samples is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does aspire-samples do?

Browse the sample apps demonstrating Aspire integration across C#, JavaScript, TypeScript, Python, Go, containers, databases, cloud, AI, and observability scena

What is aspire-samples written in?

aspire-samples is primarily written in C#. Its source is publicly available at https://github.com/microsoft/aspire-samples, and it has 1,191 GitHub stars.