Run locally

Prerequisites

  • .NET 10 SDK
  • Docker Desktop (SQL Server and the Service Bus emulator run as containers)
  • Aspire CLI: dotnet tool install -g Aspire.Cli
  • Azure Functions Core Tools v4
  • Repository tools: dotnet tool restore (EF Core tools, DocFX)

Secrets

Secrets are AppHost user secrets, kept outside the repository. Set them once from the repository root:

aspire secret set "Parameters:admin-email" "you@example.com"
aspire secret set "Parameters:admin-password" "<at least 12 characters>"
aspire secret set "Parameters:anthropic-api-key" "<Claude API key>"
aspire secret set "Parameters:mailgun-api-key" "<Mailgun sending key>"
aspire secret set "Parameters:mailgun-domain" "<sending domain>"
aspire secret set "Parameters:mailgun-region" "us"
aspire secret set "Parameters:mailgun-from" "Digest <no-reply@your-domain>"
Parameter Used by To switch off
admin-email, admin-password Web Required
anthropic-api-key Summarizer Set to a single space: the offline summarizer is used
mailgun-* Web Set to a single space: each email is logged instead of sent

A parameter with no value is asked for when the app starts.

Run

aspire run

The dashboard opens with every resource. The web resource has three buttons:

Button What it shows
Submit sample links Three real articles summarized end to end
Submit broken link A link that can't be fetched, marked Failed
Submit poison message A malformed message retried three times, then dead-lettered

Sample and broken links go to the admin account's digest. The admin is asked to set up an authenticator app on first sign-in.

Accounts

Digest is invite-only. The admin account is created from the admin-email and admin-password parameters. To add someone, sign in as the admin, open Invites and enter their email. The invite link lets them set a password.

Styles

The CSS is Tailwind CSS with daisyUI, built by src/Digest.Web/Tailwind.targets on every build. The first build downloads the Tailwind standalone CLI and the daisyUI plugin into obj/tailwind and checks their SHA-256 hashes. No Node.js is needed.

Edit src/Digest.Web/Styles/site.css. The file in wwwroot/css is generated.

The light theme is cupcake and the dark theme is halloween. The navbar toggle saves the choice in a cookie. Without one, the device setting decides.

Tests

dotnet test Digest.slnx

Unit tests cover text extraction, SSRF checks, summary validation and email encoding.

Integration tests start the whole app with Aspire, so Docker must be running. Claude and Mailgun are switched off. They cover the queue-to-function path, login messages, invites, rate limiting, lockout, access to other users' links and the admin panel.

Migrations

dotnet ef migrations add <Name> --project src/Digest.Data --startup-project src/Digest.Web