Courier MFT

Getting Started

Install and run Courier MFT locally with Docker and Aspire in minutes.

Quick Start (Aspire)

Prerequisites: .NET 10 SDK, Docker Desktop, Node.js 20+.

# Install frontend dependencies (first time only)
cd src/Courier.Frontend
npm install
cd ../..

# Start everything with Aspire
cd src/Courier.AppHost
dotnet run

This single command starts:

ServiceURLDescription
Aspire Dashboardhttps://localhost:15888Service orchestration dashboard
APIhttp://localhost:5000 (assigned by Aspire)REST API (Swagger at /swagger)
WorkerBackground job processor
Frontendhttp://localhost:3000Next.js UI
Seqhttp://localhost:5341Structured log viewer
PostgreSQLlocalhost:5432Database (managed by Aspire)

Actual ports may differ — check the Aspire dashboard for the assigned endpoints.

Build & Test

# Build everything
dotnet build Courier.slnx

# Run all tests
dotnet test Courier.slnx

# Run specific test suites
dotnet test tests/Courier.Tests.Unit            # Fast, no Docker needed
dotnet test tests/Courier.Tests.Architecture    # Dependency rule enforcement
dotnet test tests/Courier.Tests.Integration     # Requires Docker (Testcontainers)

Example API Usage

# Create a job
curl -X POST http://localhost:5000/api/v1/jobs \
  -H "Content-Type: application/json" \
  -d '{"name": "Daily SFTP Upload", "description": "Transfers reports to partner"}'

# List jobs
curl http://localhost:5000/api/v1/jobs

# Get a specific job
curl http://localhost:5000/api/v1/jobs/{id}

# Health checks
curl http://localhost:5000/health        # Liveness
curl http://localhost:5000/health/ready  # Readiness (includes PostgreSQL)

All endpoints return an ApiResponse<T> envelope:

{
  "data": { "id": "...", "name": "Daily SFTP Upload", ... },
  "success": true,
  "timestamp": "2026-02-21T12:00:00Z"
}

Project Structure

src/
  Courier.AppHost/          Aspire orchestrator (start here)
  Courier.Api/              ASP.NET Core Web API host
  Courier.Worker/           .NET Worker Service host
  Courier.Features/         Vertical slices (Jobs, etc.)
  Courier.Domain/           Entities, value objects, envelopes (BCL-only)
  Courier.Infrastructure/   EF Core DbContext, data access
  Courier.Migrations/       DbUp SQL scripts + MigrationRunner
  Courier.ServiceDefaults/  Shared Aspire defaults (OTel, health, resilience)
  Courier.Frontend/         Next.js TypeScript UI

tests/
  Courier.Tests.Unit/           xUnit + Shouldly unit tests
  Courier.Tests.Integration/    Testcontainers + WebApplicationFactory
  Courier.Tests.Architecture/   NetArchTest dependency enforcement